diff --git a/llvm/benchmarks/FormatVariadicBM.cpp b/llvm/benchmarks/FormatVariadicBM.cpp index c03ead400d0d5..3e851f0975e8b 100644 --- a/llvm/benchmarks/FormatVariadicBM.cpp +++ b/llvm/benchmarks/FormatVariadicBM.cpp @@ -1,17 +1,16 @@ -//===- FormatVariadicBM.cpp - formatv() benchmark ---------- --------------===// -// -// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -// See https://llvm.org/LICENSE.txt for license information. -// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -// -//===----------------------------------------------------------------------===// - -#include "benchmark/benchmark.h" -#include "llvm/Support/FormatVariadic.h" -#include -#include -#include - +//===- FormatVariadicBM.cpp - formatv() benchmark ---------- --------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +#include "benchmark/benchmark.h" +#include "llvm/Support/FormatVariadic.h" +#include +#include + using namespace llvm; using namespace std; diff --git a/llvm/include/llvm/AsmParser/SlotMapping.h b/llvm/include/llvm/AsmParser/SlotMapping.h index 2d2b8d8400bd7..aae2a863babd9 100644 --- a/llvm/include/llvm/AsmParser/SlotMapping.h +++ b/llvm/include/llvm/AsmParser/SlotMapping.h @@ -17,7 +17,6 @@ #include "llvm/AsmParser/NumberedValues.h" #include "llvm/IR/TrackingMDRef.h" #include -#include namespace llvm { diff --git a/llvm/include/llvm/CGData/OutlinedHashTree.h b/llvm/include/llvm/CGData/OutlinedHashTree.h index d994b68f33ee4..8cbc50bc1b9ee 100644 --- a/llvm/include/llvm/CGData/OutlinedHashTree.h +++ b/llvm/include/llvm/CGData/OutlinedHashTree.h @@ -22,7 +22,6 @@ #include "llvm/Support/raw_ostream.h" #include -#include namespace llvm { diff --git a/llvm/include/llvm/ExecutionEngine/Orc/EHFrameRegistrationPlugin.h b/llvm/include/llvm/ExecutionEngine/Orc/EHFrameRegistrationPlugin.h index 7b5d0f0eaba26..9dda1f94c75c7 100644 --- a/llvm/include/llvm/ExecutionEngine/Orc/EHFrameRegistrationPlugin.h +++ b/llvm/include/llvm/ExecutionEngine/Orc/EHFrameRegistrationPlugin.h @@ -18,7 +18,6 @@ #include #include -#include namespace llvm::orc { diff --git a/llvm/include/llvm/ExecutionEngine/Orc/SectCreate.h b/llvm/include/llvm/ExecutionEngine/Orc/SectCreate.h index e6384eb4b6d26..a30890aa17c60 100644 --- a/llvm/include/llvm/ExecutionEngine/Orc/SectCreate.h +++ b/llvm/include/llvm/ExecutionEngine/Orc/SectCreate.h @@ -18,7 +18,6 @@ #include "llvm/Support/Compiler.h" #include -#include namespace llvm::orc { diff --git a/llvm/include/llvm/MC/MCAssembler.h b/llvm/include/llvm/MC/MCAssembler.h index bbb8bee515258..144f2118e715c 100644 --- a/llvm/include/llvm/MC/MCAssembler.h +++ b/llvm/include/llvm/MC/MCAssembler.h @@ -27,7 +27,6 @@ #include #include #include -#include namespace llvm { diff --git a/llvm/include/llvm/ObjectYAML/GOFFYAML.h b/llvm/include/llvm/ObjectYAML/GOFFYAML.h index f9bf45e95bd3a..74aeade54b8f9 100644 --- a/llvm/include/llvm/ObjectYAML/GOFFYAML.h +++ b/llvm/include/llvm/ObjectYAML/GOFFYAML.h @@ -17,7 +17,6 @@ #include "llvm/BinaryFormat/GOFF.h" #include "llvm/ObjectYAML/YAML.h" #include -#include namespace llvm { diff --git a/llvm/include/llvm/PassInfo.h b/llvm/include/llvm/PassInfo.h index 380d6698d0c80..5734eb8bfb47e 100644 --- a/llvm/include/llvm/PassInfo.h +++ b/llvm/include/llvm/PassInfo.h @@ -15,7 +15,6 @@ #include "llvm/ADT/StringRef.h" #include -#include namespace llvm { diff --git a/llvm/include/llvm/Support/Mustache.h b/llvm/include/llvm/Support/Mustache.h index 83047f2aafff6..76a83f26deab6 100644 --- a/llvm/include/llvm/Support/Mustache.h +++ b/llvm/include/llvm/Support/Mustache.h @@ -78,7 +78,6 @@ #include "llvm/Support/JSON.h" #include "llvm/Support/StringSaver.h" #include -#include namespace llvm::mustache { diff --git a/llvm/include/llvm/TargetParser/XtensaTargetParser.h b/llvm/include/llvm/TargetParser/XtensaTargetParser.h index 828b4079ef328..41369b1d64499 100644 --- a/llvm/include/llvm/TargetParser/XtensaTargetParser.h +++ b/llvm/include/llvm/TargetParser/XtensaTargetParser.h @@ -15,7 +15,6 @@ #define LLVM_TARGETPARSER_XTENSATARGETPARSER_H #include "llvm/TargetParser/Triple.h" -#include namespace llvm { class StringRef; diff --git a/llvm/lib/CodeGen/DFAPacketizer.cpp b/llvm/lib/CodeGen/DFAPacketizer.cpp index c16166a1d5e1c..edbd380eb827b 100644 --- a/llvm/lib/CodeGen/DFAPacketizer.cpp +++ b/llvm/lib/CodeGen/DFAPacketizer.cpp @@ -39,7 +39,6 @@ #include #include #include -#include using namespace llvm; diff --git a/llvm/lib/DebugInfo/CodeView/TypeRecordMapping.cpp b/llvm/lib/DebugInfo/CodeView/TypeRecordMapping.cpp index 0bc65f8d0359a..49b7df98957af 100644 --- a/llvm/lib/DebugInfo/CodeView/TypeRecordMapping.cpp +++ b/llvm/lib/DebugInfo/CodeView/TypeRecordMapping.cpp @@ -28,7 +28,6 @@ #include #include #include -#include using namespace llvm; using namespace llvm::codeview; diff --git a/llvm/lib/ObjCopy/DXContainer/DXContainerObject.h b/llvm/lib/ObjCopy/DXContainer/DXContainerObject.h index cbb09f5ec8e0d..710ae95e57495 100644 --- a/llvm/lib/ObjCopy/DXContainer/DXContainerObject.h +++ b/llvm/lib/ObjCopy/DXContainer/DXContainerObject.h @@ -12,7 +12,6 @@ #include "llvm/ADT/ArrayRef.h" #include "llvm/ADT/StringRef.h" #include "llvm/Object/DXContainer.h" -#include namespace llvm { namespace objcopy { diff --git a/llvm/lib/Target/AMDGPU/AMDGPUIGroupLP.h b/llvm/lib/Target/AMDGPU/AMDGPUIGroupLP.h index aff7096f26d67..0688f07873493 100644 --- a/llvm/lib/Target/AMDGPU/AMDGPUIGroupLP.h +++ b/llvm/lib/Target/AMDGPU/AMDGPUIGroupLP.h @@ -11,7 +11,6 @@ #include "llvm/CodeGen/ScheduleDAGMutation.h" #include -#include namespace llvm { diff --git a/llvm/lib/Target/ARC/ARCMachineFunctionInfo.h b/llvm/lib/Target/ARC/ARCMachineFunctionInfo.h index cace92a2b8fb6..9c21121b382b4 100644 --- a/llvm/lib/Target/ARC/ARCMachineFunctionInfo.h +++ b/llvm/lib/Target/ARC/ARCMachineFunctionInfo.h @@ -14,7 +14,6 @@ #define LLVM_LIB_TARGET_ARC_ARCMACHINEFUNCTIONINFO_H #include "llvm/CodeGen/MachineFunction.h" -#include namespace llvm { diff --git a/llvm/lib/Target/Hexagon/HexagonQFPOptimizer.cpp b/llvm/lib/Target/Hexagon/HexagonQFPOptimizer.cpp index 8801f698effe5..6d66237730ded 100644 --- a/llvm/lib/Target/Hexagon/HexagonQFPOptimizer.cpp +++ b/llvm/lib/Target/Hexagon/HexagonQFPOptimizer.cpp @@ -77,7 +77,6 @@ #include "llvm/Support/Debug.h" #include "llvm/Support/raw_ostream.h" #include -#include #define DEBUG_TYPE "hexagon-qfp-optimizer" diff --git a/llvm/lib/Target/NVPTX/NVPTXAsmPrinter.cpp b/llvm/lib/Target/NVPTX/NVPTXAsmPrinter.cpp index 14ca867023e2a..e1b37fd88f44d 100644 --- a/llvm/lib/Target/NVPTX/NVPTXAsmPrinter.cpp +++ b/llvm/lib/Target/NVPTX/NVPTXAsmPrinter.cpp @@ -90,7 +90,6 @@ #include #include #include -#include using namespace llvm; diff --git a/llvm/lib/Target/NVPTX/NVPTXUtilities.h b/llvm/lib/Target/NVPTX/NVPTXUtilities.h index 4b5cb30fd3036..d92ae8d7199b0 100644 --- a/llvm/lib/Target/NVPTX/NVPTXUtilities.h +++ b/llvm/lib/Target/NVPTX/NVPTXUtilities.h @@ -27,7 +27,6 @@ #include #include #include -#include namespace llvm { diff --git a/llvm/tools/llc/NewPMDriver.h b/llvm/tools/llc/NewPMDriver.h index c8a60223cb296..0dbd46797dabc 100644 --- a/llvm/tools/llc/NewPMDriver.h +++ b/llvm/tools/llc/NewPMDriver.h @@ -22,7 +22,6 @@ #include "llvm/IR/DiagnosticHandler.h" #include "llvm/Support/CodeGen.h" #include -#include namespace llvm { class Module; diff --git a/llvm/tools/llvm-exegesis/lib/X86/X86Counter.cpp b/llvm/tools/llvm-exegesis/lib/X86/X86Counter.cpp index 05b6562a57dc6..9dc6c764599cd 100644 --- a/llvm/tools/llvm-exegesis/lib/X86/X86Counter.cpp +++ b/llvm/tools/llvm-exegesis/lib/X86/X86Counter.cpp @@ -27,7 +27,6 @@ #include #include #include -#include #include #include diff --git a/llvm/tools/llvm-ifs/ErrorCollector.cpp b/llvm/tools/llvm-ifs/ErrorCollector.cpp index 04daa848548e2..7417060a664cc 100644 --- a/llvm/tools/llvm-ifs/ErrorCollector.cpp +++ b/llvm/tools/llvm-ifs/ErrorCollector.cpp @@ -11,7 +11,6 @@ #include "llvm/Support/Error.h" #include "llvm/Support/WithColor.h" #include "llvm/Support/raw_ostream.h" -#include using namespace llvm; using namespace llvm::ifs; diff --git a/llvm/tools/llvm-reduce/TestRunner.h b/llvm/tools/llvm-reduce/TestRunner.h index 930c3248ff105..0218dad263b05 100644 --- a/llvm/tools/llvm-reduce/TestRunner.h +++ b/llvm/tools/llvm-reduce/TestRunner.h @@ -16,7 +16,6 @@ #include "llvm/Support/Path.h" #include "llvm/Support/Program.h" #include "llvm/Target/TargetMachine.h" -#include namespace llvm { diff --git a/llvm/unittests/ADT/ConcurrentHashtableTest.cpp b/llvm/unittests/ADT/ConcurrentHashtableTest.cpp index 1b82df1fbffd0..05c480959142b 100644 --- a/llvm/unittests/ADT/ConcurrentHashtableTest.cpp +++ b/llvm/unittests/ADT/ConcurrentHashtableTest.cpp @@ -14,7 +14,6 @@ #include "gtest/gtest.h" #include #include -#include using namespace llvm; using namespace parallel; diff --git a/llvm/unittests/DebugInfo/LogicalView/StringPoolTest.cpp b/llvm/unittests/DebugInfo/LogicalView/StringPoolTest.cpp index 27ff449c98e64..e4dc77bb72c1c 100644 --- a/llvm/unittests/DebugInfo/LogicalView/StringPoolTest.cpp +++ b/llvm/unittests/DebugInfo/LogicalView/StringPoolTest.cpp @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include "llvm/DebugInfo/LogicalView/Core/LVStringPool.h" -#include #include "gtest/gtest.h" diff --git a/llvm/unittests/DebugInfo/PDB/NativeSessionTest.cpp b/llvm/unittests/DebugInfo/PDB/NativeSessionTest.cpp index b010b5fce8675..cffaf7c9543fb 100644 --- a/llvm/unittests/DebugInfo/PDB/NativeSessionTest.cpp +++ b/llvm/unittests/DebugInfo/PDB/NativeSessionTest.cpp @@ -19,8 +19,6 @@ #include "gtest/gtest.h" -#include - using namespace llvm; using namespace llvm::pdb; diff --git a/llvm/unittests/ExecutionEngine/Orc/MapperJITLinkMemoryManagerTest.cpp b/llvm/unittests/ExecutionEngine/Orc/MapperJITLinkMemoryManagerTest.cpp index a5269f79fc1e9..566fdb8194852 100644 --- a/llvm/unittests/ExecutionEngine/Orc/MapperJITLinkMemoryManagerTest.cpp +++ b/llvm/unittests/ExecutionEngine/Orc/MapperJITLinkMemoryManagerTest.cpp @@ -13,8 +13,6 @@ #include "llvm/ExecutionEngine/Orc/MemoryMapper.h" #include "llvm/Testing/Support/Error.h" -#include - using namespace llvm; using namespace llvm::jitlink; using namespace llvm::orc; diff --git a/llvm/unittests/ExecutionEngine/Orc/SimpleExecutorMemoryManagerTest.cpp b/llvm/unittests/ExecutionEngine/Orc/SimpleExecutorMemoryManagerTest.cpp index 9c6f19c82c998..005c67bcaa0ca 100644 --- a/llvm/unittests/ExecutionEngine/Orc/SimpleExecutorMemoryManagerTest.cpp +++ b/llvm/unittests/ExecutionEngine/Orc/SimpleExecutorMemoryManagerTest.cpp @@ -11,7 +11,6 @@ #include "gtest/gtest.h" #include -#include using namespace llvm; using namespace llvm::orc; diff --git a/llvm/unittests/Support/DynamicLibrary/PipSqueak.cpp b/llvm/unittests/Support/DynamicLibrary/PipSqueak.cpp index 8ff2c30f4925a..8f115ae9095b8 100644 --- a/llvm/unittests/Support/DynamicLibrary/PipSqueak.cpp +++ b/llvm/unittests/Support/DynamicLibrary/PipSqueak.cpp @@ -8,6 +8,8 @@ #include "PipSqueak.h" +#include + struct Global { std::string *Str; std::vector *Vec; diff --git a/llvm/unittests/Support/DynamicLibrary/PipSqueak.h b/llvm/unittests/Support/DynamicLibrary/PipSqueak.h index dc069ca3d876b..f69c7bfab5531 100644 --- a/llvm/unittests/Support/DynamicLibrary/PipSqueak.h +++ b/llvm/unittests/Support/DynamicLibrary/PipSqueak.h @@ -15,11 +15,9 @@ #pragma warning(disable: 4530) #pragma warning(disable: 4577) #include -#include #pragma warning(pop) #else #include -#include #endif #if defined(_WIN32) || defined(__CYGWIN__) diff --git a/llvm/unittests/TextAPI/TextStubV1Tests.cpp b/llvm/unittests/TextAPI/TextStubV1Tests.cpp index 3778f75294bb1..950e79da77c9e 100644 --- a/llvm/unittests/TextAPI/TextStubV1Tests.cpp +++ b/llvm/unittests/TextAPI/TextStubV1Tests.cpp @@ -12,7 +12,6 @@ #include "llvm/TextAPI/TextAPIWriter.h" #include "gtest/gtest.h" #include -#include using namespace llvm; using namespace llvm::MachO; diff --git a/llvm/unittests/TextAPI/TextStubV2Tests.cpp b/llvm/unittests/TextAPI/TextStubV2Tests.cpp index 11dc0b41b9d22..548f74852dafc 100644 --- a/llvm/unittests/TextAPI/TextStubV2Tests.cpp +++ b/llvm/unittests/TextAPI/TextStubV2Tests.cpp @@ -11,7 +11,6 @@ #include "llvm/TextAPI/TextAPIWriter.h" #include "gtest/gtest.h" #include -#include using namespace llvm; using namespace llvm::MachO; diff --git a/llvm/unittests/TextAPI/TextStubV4Tests.cpp b/llvm/unittests/TextAPI/TextStubV4Tests.cpp index 350ef413964a1..1a10c9119a43c 100644 --- a/llvm/unittests/TextAPI/TextStubV4Tests.cpp +++ b/llvm/unittests/TextAPI/TextStubV4Tests.cpp @@ -12,7 +12,6 @@ #include "llvm/TextAPI/TextAPIWriter.h" #include "gtest/gtest.h" #include -#include using namespace llvm; using namespace llvm::MachO;