Add header guards to some headers that are missing them
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>
Mon, 3 Sep 2018 16:22:05 +0000 (16:22 +0000)
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>
Mon, 3 Sep 2018 16:22:05 +0000 (16:22 +0000)
Also adjust some of dsymutil's headers to put the header guards at the top,
otherwise the compiler will not recognize them as header guards.

llvm-svn: 341323

llvm/include/llvm/Analysis/IndirectCallSiteVisitor.h
llvm/lib/Target/ARM/ARMMacroFusion.h
llvm/lib/Target/X86/X86MacroFusion.h
llvm/lib/Transforms/AggressiveInstCombine/AggressiveInstCombineInternal.h
llvm/tools/dsymutil/CFBundle.h
llvm/tools/dsymutil/CompileUnit.h
llvm/tools/dsymutil/DeclContext.h
llvm/tools/dsymutil/DwarfStreamer.h
llvm/unittests/ADT/TestGraph.h
llvm/unittests/tools/llvm-exegesis/Common/AssemblerUtils.h

index dde56a1..a30b59f 100644 (file)
@@ -10,6 +10,9 @@
 // This file implements defines a visitor class and a helper function that find
 // all indirect call-sites in a function.
 
+#ifndef LLVM_ANALYSIS_INDIRECTCALLSITEVISITOR_H
+#define LLVM_ANALYSIS_INDIRECTCALLSITEVISITOR_H
+
 #include "llvm/IR/InstVisitor.h"
 #include <vector>
 
@@ -33,3 +36,5 @@ inline std::vector<Instruction *> findIndirectCallSites(Function &F) {
   return ICV.IndirectCallInsts;
 }
 }
+
+#endif
index 1e4fc66..b3abd7b 100644 (file)
@@ -12,6 +12,9 @@
 //
 //===----------------------------------------------------------------------===//
 
+#ifndef LLVM_LIB_TARGET_ARM_ARMMACROFUSION_H
+#define LLVM_LIB_TARGET_ARM_ARMMACROFUSION_H
+
 #include "llvm/CodeGen/MachineScheduler.h"
 
 namespace llvm {
@@ -22,3 +25,5 @@ namespace llvm {
 std::unique_ptr<ScheduleDAGMutation> createARMMacroFusionDAGMutation();
 
 } // llvm
+
+#endif
index 13fa2d7..97ef1d6 100644 (file)
@@ -12,6 +12,9 @@
 //
 //===----------------------------------------------------------------------===//
 
+#ifndef LLVM_LIB_TARGET_X86_X86MACROFUSION_H
+#define LLVM_LIB_TARGET_X86_X86MACROFUSION_H
+
 #include "llvm/CodeGen/MachineScheduler.h"
 
 namespace llvm {
@@ -23,3 +26,5 @@ std::unique_ptr<ScheduleDAGMutation>
 createX86MacroFusionDAGMutation();
 
 } // end namespace llvm
+
+#endif
index 199374c..f3c8bde 100644 (file)
@@ -13,6 +13,9 @@
 //
 //===----------------------------------------------------------------------===//
 
+#ifndef LLVM_LIB_TRANSFORMS_AGGRESSIVEINSTCOMBINE_COMBINEINTERNAL_H
+#define LLVM_LIB_TRANSFORMS_AGGRESSIVEINSTCOMBINE_COMBINEINTERNAL_H
+
 #include "llvm/ADT/MapVector.h"
 #include "llvm/ADT/STLExtras.h"
 #include "llvm/Analysis/AliasAnalysis.h"
@@ -119,3 +122,5 @@ private:
   void ReduceExpressionDag(Type *SclTy);
 };
 } // end namespace llvm.
+
+#endif
index bdbecb4..5f24184 100644 (file)
@@ -7,6 +7,9 @@
 //
 //===----------------------------------------------------------------------===//
 
+#ifndef LLVM_TOOLS_DSYMUTIL_CFBUNDLE_H
+#define LLVM_TOOLS_DSYMUTIL_CFBUNDLE_H
+
 #include "llvm/ADT/StringRef.h"
 #include <string>
 
@@ -24,3 +27,5 @@ CFBundleInfo getBundleInfo(llvm::StringRef ExePath);
 
 } // end namespace dsymutil
 } // end namespace llvm
+
+#endif
index 0f5efdd..79b88fd 100644 (file)
@@ -7,13 +7,13 @@
 //
 //===----------------------------------------------------------------------===//
 
+#ifndef LLVM_TOOLS_DSYMUTIL_COMPILEUNIT_H
+#define LLVM_TOOLS_DSYMUTIL_COMPILEUNIT_H
+
 #include "llvm/ADT/IntervalMap.h"
 #include "llvm/CodeGen/DIE.h"
 #include "llvm/DebugInfo/DWARF/DWARFUnit.h"
 
-#ifndef LLVM_TOOLS_DSYMUTIL_COMPILEUNIT_H
-#define LLVM_TOOLS_DSYMUTIL_COMPILEUNIT_H
-
 namespace llvm {
 namespace dsymutil {
 
index 1fa6815..425c736 100644 (file)
@@ -7,6 +7,9 @@
 //
 //===----------------------------------------------------------------------===//
 
+#ifndef LLVM_TOOLS_DSYMUTIL_DECLCONTEXT_H
+#define LLVM_TOOLS_DSYMUTIL_DECLCONTEXT_H
+
 #include "CompileUnit.h"
 #include "NonRelocatableStringpool.h"
 #include "llvm/ADT/DenseMap.h"
@@ -16,9 +19,6 @@
 #include "llvm/DebugInfo/DWARF/DWARFDie.h"
 #include "llvm/Support/Path.h"
 
-#ifndef LLVM_TOOLS_DSYMUTIL_DECLCONTEXT_H
-#define LLVM_TOOLS_DSYMUTIL_DECLCONTEXT_H
-
 namespace llvm {
 namespace dsymutil {
 
index 74f0a09..679d124 100644 (file)
@@ -7,6 +7,9 @@
 //
 //===----------------------------------------------------------------------===//
 
+#ifndef LLVM_TOOLS_DSYMUTIL_DWARFSTREAMER_H
+#define LLVM_TOOLS_DSYMUTIL_DWARFSTREAMER_H
+
 #include "CompileUnit.h"
 #include "DebugMap.h"
 #include "LinkUtils.h"
@@ -32,9 +35,6 @@
 #include "llvm/Target/TargetMachine.h"
 #include "llvm/Target/TargetOptions.h"
 
-#ifndef LLVM_TOOLS_DSYMUTIL_DWARFSTREAMER_H
-#define LLVM_TOOLS_DSYMUTIL_DWARFSTREAMER_H
-
 namespace llvm {
 namespace dsymutil {
 
index 1c495d2..4ddd14c 100644 (file)
 //
 //===----------------------------------------------------------------------===//
 
+#ifndef LLVM_UNITTESTS_ADT_TEST_GRAPH_H
+#define LLVM_UNITTESTS_ADT_TEST_GRAPH_H
+
 #include "llvm/ADT/GraphTraits.h"
 #include <cassert>
 #include <climits>
 #include <utility>
 
-#ifndef LLVM_UNITTESTS_ADT_TEST_GRAPH_H
-#define LLVM_UNITTESTS_ADT_TEST_GRAPH_H
-
 namespace llvm {
 
 /// Graph<N> - A graph with N nodes.  Note that N can be at most 8.
index f055949..9265e3e 100644 (file)
@@ -7,6 +7,9 @@
 //
 //===----------------------------------------------------------------------===//
 
+#ifndef LLVM_UNITTESTS_TOOLS_LLVMEXEGESIS_ASSEMBLERUTILS_H
+#define LLVM_UNITTESTS_TOOLS_LLVMEXEGESIS_ASSEMBLERUTILS_H
+
 #include "Assembler.h"
 #include "BenchmarkRunner.h"
 #include "Target.h"
@@ -85,3 +88,5 @@ private:
 };
 
 } // namespace exegesis
+
+#endif