From 0c8ae782cb966068f8317f8225633e2f4720ccb7 Mon Sep 17 00:00:00 2001 From: Douglas Gregor Date: Thu, 5 Nov 2009 23:01:30 +0000 Subject: [PATCH] Make a few more LLVM headers parsable as standalone headers. Fix some problems with the hidden copy constructors for ImmutableMap/ImmutableSet found by Clang++. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86186 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/ADT/ImmutableMap.h | 4 ++-- include/llvm/ADT/ImmutableSet.h | 4 ++-- include/llvm/ADT/PriorityQueue.h | 1 + include/llvm/ADT/Trie.h | 1 + include/llvm/CodeGen/BinaryObject.h | 2 +- include/llvm/CodeGen/LinkAllAsmWriterComponents.h | 1 + include/llvm/CodeGen/MachORelocation.h | 2 ++ include/llvm/CodeGen/MachineCodeInfo.h | 2 ++ include/llvm/CodeGen/MachineMemOperand.h | 2 ++ include/llvm/Transforms/RSProfiling.h | 4 ++++ include/llvm/Transforms/Utils/SSI.h | 1 + 11 files changed, 19 insertions(+), 5 deletions(-) diff --git a/include/llvm/ADT/ImmutableMap.h b/include/llvm/ADT/ImmutableMap.h index 742e2321865..fc9fe8b5a59 100644 --- a/include/llvm/ADT/ImmutableMap.h +++ b/include/llvm/ADT/ImmutableMap.h @@ -102,8 +102,8 @@ public: } private: - Factory(const Factory& RHS) {}; - void operator=(const Factory& RHS) {}; + Factory(const Factory& RHS); // DO NOT IMPLEMENT + void operator=(const Factory& RHS); // DO NOT IMPLEMENT }; friend class Factory; diff --git a/include/llvm/ADT/ImmutableSet.h b/include/llvm/ADT/ImmutableSet.h index 16b4403e7f2..676a1989fdb 100644 --- a/include/llvm/ADT/ImmutableSet.h +++ b/include/llvm/ADT/ImmutableSet.h @@ -988,8 +988,8 @@ public: BumpPtrAllocator& getAllocator() { return F.getAllocator(); } private: - Factory(const Factory& RHS) {} - void operator=(const Factory& RHS) {} + Factory(const Factory& RHS); // DO NOT IMPLEMENT + void operator=(const Factory& RHS); // DO NOT IMPLEMENT }; friend class Factory; diff --git a/include/llvm/ADT/PriorityQueue.h b/include/llvm/ADT/PriorityQueue.h index a8809dc0b26..bf8a6870816 100644 --- a/include/llvm/ADT/PriorityQueue.h +++ b/include/llvm/ADT/PriorityQueue.h @@ -14,6 +14,7 @@ #ifndef LLVM_ADT_PRIORITY_QUEUE_H #define LLVM_ADT_PRIORITY_QUEUE_H +#include #include namespace llvm { diff --git a/include/llvm/ADT/Trie.h b/include/llvm/ADT/Trie.h index cf92862c20d..b415990b222 100644 --- a/include/llvm/ADT/Trie.h +++ b/include/llvm/ADT/Trie.h @@ -18,6 +18,7 @@ #include "llvm/ADT/GraphTraits.h" #include "llvm/Support/DOTGraphTraits.h" +#include #include namespace llvm { diff --git a/include/llvm/CodeGen/BinaryObject.h b/include/llvm/CodeGen/BinaryObject.h index 9e2ef18202b..3ade7c9e47c 100644 --- a/include/llvm/CodeGen/BinaryObject.h +++ b/include/llvm/CodeGen/BinaryObject.h @@ -15,6 +15,7 @@ #ifndef LLVM_CODEGEN_BINARYOBJECT_H #define LLVM_CODEGEN_BINARYOBJECT_H +#include "llvm/CodeGen/MachineRelocation.h" #include "llvm/System/DataTypes.h" #include @@ -22,7 +23,6 @@ namespace llvm { -class MachineRelocation; typedef std::vector BinaryData; class BinaryObject { diff --git a/include/llvm/CodeGen/LinkAllAsmWriterComponents.h b/include/llvm/CodeGen/LinkAllAsmWriterComponents.h index 1673c897a70..7d1b1fe477a 100644 --- a/include/llvm/CodeGen/LinkAllAsmWriterComponents.h +++ b/include/llvm/CodeGen/LinkAllAsmWriterComponents.h @@ -16,6 +16,7 @@ #define LLVM_CODEGEN_LINKALLASMWRITERCOMPONENTS_H #include "llvm/CodeGen/GCs.h" +#include namespace { struct ForceAsmWriterLinking { diff --git a/include/llvm/CodeGen/MachORelocation.h b/include/llvm/CodeGen/MachORelocation.h index d4027cc0b78..27306c62d88 100644 --- a/include/llvm/CodeGen/MachORelocation.h +++ b/include/llvm/CodeGen/MachORelocation.h @@ -15,6 +15,8 @@ #ifndef LLVM_CODEGEN_MACHO_RELOCATION_H #define LLVM_CODEGEN_MACHO_RELOCATION_H +#include "llvm/System/DataTypes.h" + namespace llvm { /// MachORelocation - This struct contains information about each relocation diff --git a/include/llvm/CodeGen/MachineCodeInfo.h b/include/llvm/CodeGen/MachineCodeInfo.h index 024e6027037..a75c02a052e 100644 --- a/include/llvm/CodeGen/MachineCodeInfo.h +++ b/include/llvm/CodeGen/MachineCodeInfo.h @@ -17,6 +17,8 @@ #ifndef EE_MACHINE_CODE_INFO_H #define EE_MACHINE_CODE_INFO_H +#include "llvm/System/DataTypes.h" + namespace llvm { class MachineCodeInfo { diff --git a/include/llvm/CodeGen/MachineMemOperand.h b/include/llvm/CodeGen/MachineMemOperand.h index b7e267dd133..5dee199c7d1 100644 --- a/include/llvm/CodeGen/MachineMemOperand.h +++ b/include/llvm/CodeGen/MachineMemOperand.h @@ -16,6 +16,8 @@ #ifndef LLVM_CODEGEN_MACHINEMEMOPERAND_H #define LLVM_CODEGEN_MACHINEMEMOPERAND_H +#include "llvm/System/DataTypes.h" + namespace llvm { class Value; diff --git a/include/llvm/Transforms/RSProfiling.h b/include/llvm/Transforms/RSProfiling.h index 98ec396a26a..02439e8e238 100644 --- a/include/llvm/Transforms/RSProfiling.h +++ b/include/llvm/Transforms/RSProfiling.h @@ -15,7 +15,11 @@ #ifndef LLVM_TRANSFORMS_RSPROFILING_H #define LLVM_TRANSFORMS_RSPROFILING_H +#include "llvm/Pass.h" + namespace llvm { + class Value; + //===--------------------------------------------------------------------===// /// RSProfilers - The basic Random Sampling Profiler Interface Any profiler /// that implements this interface can be transformed by the random sampling diff --git a/include/llvm/Transforms/Utils/SSI.h b/include/llvm/Transforms/Utils/SSI.h index ff5bb7b8614..198fc827bb0 100644 --- a/include/llvm/Transforms/Utils/SSI.h +++ b/include/llvm/Transforms/Utils/SSI.h @@ -22,6 +22,7 @@ #ifndef LLVM_TRANSFORMS_UTILS_SSI_H #define LLVM_TRANSFORMS_UTILS_SSI_H +#include "llvm/InstrTypes.h" #include "llvm/Pass.h" #include "llvm/ADT/DenseMap.h" #include "llvm/ADT/SmallPtrSet.h"