Unweaken vtables as per http://llvm.org/docs/CodingStandards.html#ll_virtual_anch
authorDavid Blaikie <dblaikie@gmail.com>
Tue, 20 Dec 2011 02:50:00 +0000 (02:50 +0000)
committerDavid Blaikie <dblaikie@gmail.com>
Tue, 20 Dec 2011 02:50:00 +0000 (02:50 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146960 91177308-0d34-0410-b5e6-96231b3b80d8

151 files changed:
include/llvm/ADT/IntrusiveRefCntPtr.h
include/llvm/Analysis/DebugInfo.h
include/llvm/Analysis/DominanceFrontier.h
include/llvm/Argument.h
include/llvm/CodeGen/JITCodeEmitter.h
include/llvm/CodeGen/LexicalScopes.h
include/llvm/CodeGen/MachineBranchProbabilityInfo.h
include/llvm/CodeGen/MachineCodeEmitter.h
include/llvm/CodeGen/MachineConstantPool.h
include/llvm/CodeGen/MachinePassRegistry.h
include/llvm/CodeGen/ScheduleDAG.h
include/llvm/CodeGen/SelectionDAGISel.h
include/llvm/Constant.h
include/llvm/Constants.h
include/llvm/MC/MCAsmInfoCOFF.h
include/llvm/MC/MCAsmInfoDarwin.h
include/llvm/MC/MCAssembler.h
include/llvm/Metadata.h
include/llvm/Object/Archive.h
include/llvm/Object/ObjectFile.h
include/llvm/TableGen/Record.h
include/llvm/TableGen/TableGenAction.h
include/llvm/TableGen/TableGenBackend.h
include/llvm/Target/TargetJITInfo.h
include/llvm/Target/TargetLibraryInfo.h
include/llvm/Target/TargetRegisterInfo.h
include/llvm/Transforms/Utils/SimplifyIndVar.h
lib/Analysis/DebugInfo.cpp
lib/Analysis/DominanceFrontier.cpp
lib/CodeGen/AsmPrinter/DIE.cpp
lib/CodeGen/AsmPrinter/DIE.h
lib/CodeGen/JITCodeEmitter.cpp [new file with mode: 0644]
lib/CodeGen/LexicalScopes.cpp
lib/CodeGen/LiveRangeEdit.cpp
lib/CodeGen/LiveRangeEdit.h
lib/CodeGen/MachineBranchProbabilityInfo.cpp
lib/CodeGen/MachineCodeEmitter.cpp [new file with mode: 0644]
lib/CodeGen/MachineFunction.cpp
lib/CodeGen/MachinePassRegistry.cpp
lib/CodeGen/ScheduleDAG.cpp
lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
lib/CodeGen/Spiller.cpp
lib/CodeGen/Spiller.h
lib/DebugInfo/DWARFContext.cpp
lib/DebugInfo/DWARFContext.h
lib/ExecutionEngine/MCJIT/MCJITMemoryManager.cpp [new file with mode: 0644]
lib/ExecutionEngine/MCJIT/MCJITMemoryManager.h
lib/MC/MCAsmInfoCOFF.cpp
lib/MC/MCAsmInfoDarwin.cpp
lib/MC/MCAssembler.cpp
lib/Object/Archive.cpp
lib/Object/ObjectFile.cpp
lib/Support/IntrusiveRefCntPtr.cpp [new file with mode: 0644]
lib/TableGen/Record.cpp
lib/TableGen/TableGenAction.cpp [new file with mode: 0644]
lib/TableGen/TableGenBackend.cpp
lib/Target/ARM/ARMMachineFunctionInfo.cpp [new file with mode: 0644]
lib/Target/ARM/ARMMachineFunctionInfo.h
lib/Target/ARM/ARMRegisterInfo.cpp
lib/Target/ARM/ARMRegisterInfo.h
lib/Target/ARM/ARMTargetMachine.cpp
lib/Target/ARM/ARMTargetMachine.h
lib/Target/ARM/MCTargetDesc/ARMMCAsmInfo.cpp
lib/Target/ARM/MCTargetDesc/ARMMCAsmInfo.h
lib/Target/CellSPU/MCTargetDesc/SPUMCAsmInfo.cpp
lib/Target/CellSPU/MCTargetDesc/SPUMCAsmInfo.h
lib/Target/CellSPU/SPUMachineFunction.cpp [new file with mode: 0644]
lib/Target/CellSPU/SPUMachineFunction.h
lib/Target/MBlaze/MBlazeMachineFunction.cpp [new file with mode: 0644]
lib/Target/MBlaze/MBlazeMachineFunction.h
lib/Target/MBlaze/MCTargetDesc/MBlazeMCAsmInfo.cpp
lib/Target/MBlaze/MCTargetDesc/MBlazeMCAsmInfo.h
lib/Target/MSP430/MCTargetDesc/MSP430MCAsmInfo.cpp
lib/Target/MSP430/MCTargetDesc/MSP430MCAsmInfo.h
lib/Target/MSP430/MSP430MachineFunctionInfo.cpp [new file with mode: 0644]
lib/Target/MSP430/MSP430MachineFunctionInfo.h
lib/Target/MSP430/MSP430Subtarget.cpp
lib/Target/MSP430/MSP430Subtarget.h
lib/Target/Mips/MCTargetDesc/MipsMCAsmInfo.cpp
lib/Target/Mips/MCTargetDesc/MipsMCAsmInfo.h
lib/Target/Mips/MipsMachineFunction.cpp [new file with mode: 0644]
lib/Target/Mips/MipsMachineFunction.h
lib/Target/Mips/MipsSubtarget.cpp
lib/Target/Mips/MipsSubtarget.h
lib/Target/Mips/MipsTargetMachine.cpp
lib/Target/Mips/MipsTargetMachine.h
lib/Target/PTX/MCTargetDesc/PTXMCAsmInfo.cpp
lib/Target/PTX/MCTargetDesc/PTXMCAsmInfo.h
lib/Target/PTX/PTXMachineFunctionInfo.cpp [new file with mode: 0644]
lib/Target/PTX/PTXMachineFunctionInfo.h
lib/Target/PTX/PTXSubtarget.cpp
lib/Target/PTX/PTXSubtarget.h
lib/Target/PTX/PTXTargetMachine.cpp
lib/Target/PTX/PTXTargetMachine.h
lib/Target/PowerPC/MCTargetDesc/PPCMCAsmInfo.cpp
lib/Target/PowerPC/MCTargetDesc/PPCMCAsmInfo.h
lib/Target/PowerPC/PPCMachineFunctionInfo.cpp [new file with mode: 0644]
lib/Target/PowerPC/PPCMachineFunctionInfo.h
lib/Target/PowerPC/PPCTargetMachine.cpp
lib/Target/PowerPC/PPCTargetMachine.h
lib/Target/Sparc/MCTargetDesc/SparcMCAsmInfo.cpp
lib/Target/Sparc/MCTargetDesc/SparcMCAsmInfo.h
lib/Target/Sparc/SparcMachineFunctionInfo.cpp [new file with mode: 0644]
lib/Target/Sparc/SparcMachineFunctionInfo.h
lib/Target/Sparc/SparcSubtarget.cpp
lib/Target/Sparc/SparcSubtarget.h
lib/Target/Sparc/SparcTargetMachine.cpp
lib/Target/Sparc/SparcTargetMachine.h
lib/Target/TargetJITInfo.cpp [new file with mode: 0644]
lib/Target/TargetLibraryInfo.cpp
lib/Target/TargetRegisterInfo.cpp
lib/Target/X86/Disassembler/X86Disassembler.cpp
lib/Target/X86/Disassembler/X86Disassembler.h
lib/Target/X86/MCTargetDesc/X86MCAsmInfo.cpp
lib/Target/X86/MCTargetDesc/X86MCAsmInfo.h
lib/Target/X86/X86MachineFunctionInfo.cpp [new file with mode: 0644]
lib/Target/X86/X86MachineFunctionInfo.h
lib/Target/X86/X86TargetMachine.cpp
lib/Target/X86/X86TargetMachine.h
lib/Target/XCore/MCTargetDesc/XCoreMCAsmInfo.cpp
lib/Target/XCore/MCTargetDesc/XCoreMCAsmInfo.h
lib/Target/XCore/XCoreMachineFunctionInfo.cpp [new file with mode: 0644]
lib/Target/XCore/XCoreMachineFunctionInfo.h
lib/Target/XCore/XCoreSubtarget.cpp
lib/Target/XCore/XCoreSubtarget.h
lib/Transforms/Utils/SimplifyIndVar.cpp
lib/VMCore/Constants.cpp
lib/VMCore/ConstantsContext.h
lib/VMCore/Function.cpp
lib/VMCore/LLVMContextImpl.cpp
lib/VMCore/Metadata.cpp
lib/VMCore/PassManager.cpp
tools/bugpoint/CrashDebugger.cpp
tools/bugpoint/ToolRunner.cpp
tools/bugpoint/ToolRunner.h
tools/llvm-diff/DiffConsumer.cpp
tools/llvm-diff/DiffConsumer.h
tools/llvm-diff/DifferenceEngine.cpp
tools/llvm-diff/DifferenceEngine.h
tools/llvm-objdump/llvm-objdump.cpp
tools/llvm-objdump/llvm-objdump.h
unittests/Support/IRBuilderTest.cpp
unittests/Transforms/Utils/Cloning.cpp
utils/TableGen/DAGISelMatcher.cpp
utils/TableGen/DAGISelMatcher.h
utils/TableGen/SetTheory.cpp
utils/TableGen/SetTheory.h
utils/TableGen/TGValueTypes.cpp
utils/TableGen/TableGen.cpp
utils/TableGen/X86ModRMFilters.cpp [new file with mode: 0644]
utils/TableGen/X86ModRMFilters.h

index 106daf41799d3afdd3a2aa025416558791a2e7e3..1d7e463aa1f0f7ef74dff7d73b56e8be7803040a 100644 (file)
@@ -65,6 +65,7 @@ namespace llvm {
 //===----------------------------------------------------------------------===//
   class RefCountedBaseVPTR {
     mutable unsigned ref_cnt;
+    virtual void anchor();
 
   protected:
     RefCountedBaseVPTR() : ref_cnt(0) {}
index c4489cfcfe6785b4c3f07f9c3b6627a68088b3ec..f62dddd669356d5a568848d593add2139044f5af 100644 (file)
@@ -153,6 +153,7 @@ namespace llvm {
 
   /// DIScope - A base class for various scopes.
   class DIScope : public DIDescriptor {
+    virtual void anchor();
   public:
     explicit DIScope(const MDNode *N = 0) : DIDescriptor (N) {}
     virtual ~DIScope() {}
@@ -163,6 +164,7 @@ namespace llvm {
 
   /// DICompileUnit - A wrapper for a compile unit.
   class DICompileUnit : public DIScope {
+    virtual void anchor();
   public:
     explicit DICompileUnit(const MDNode *N = 0) : DIScope(N) {}
 
@@ -202,6 +204,7 @@ namespace llvm {
 
   /// DIFile - This is a wrapper for a file.
   class DIFile : public DIScope {
+    virtual void anchor();
   public:
     explicit DIFile(const MDNode *N = 0) : DIScope(N) {
       if (DbgNode && !isFile())
@@ -230,7 +233,7 @@ namespace llvm {
   /// FIXME: Types should be factored much better so that CV qualifiers and
   /// others do not require a huge and empty descriptor full of zeros.
   class DIType : public DIScope {
-  public:
+    virtual void anchor();
   protected:
     // This ctor is used when the Tag has already been validated by a derived
     // ctor.
@@ -240,7 +243,6 @@ namespace llvm {
 
     /// Verify - Verify that a type descriptor is well formed.
     bool Verify() const;
-  public:
     explicit DIType(const MDNode *N);
     explicit DIType() {}
     virtual ~DIType() {}
@@ -320,6 +322,7 @@ namespace llvm {
 
   /// DIBasicType - A basic type, like 'int' or 'float'.
   class DIBasicType : public DIType {
+    virtual void anchor();
   public:
     explicit DIBasicType(const MDNode *N = 0) : DIType(N) {}
 
@@ -338,6 +341,7 @@ namespace llvm {
   /// DIDerivedType - A simple derived type, like a const qualified type,
   /// a typedef, a pointer or reference, etc.
   class DIDerivedType : public DIType {
+    virtual void anchor();
   protected:
     explicit DIDerivedType(const MDNode *N, bool, bool)
       : DIType(N, true, true) {}
@@ -391,6 +395,7 @@ namespace llvm {
   /// other types, like a function or struct.
   /// FIXME: Why is this a DIDerivedType??
   class DICompositeType : public DIDerivedType {
+    virtual void anchor();
   public:
     explicit DICompositeType(const MDNode *N = 0)
       : DIDerivedType(N, true, true) {
@@ -454,6 +459,7 @@ namespace llvm {
 
   /// DISubprogram - This is a wrapper for a subprogram (e.g. a function).
   class DISubprogram : public DIScope {
+    virtual void anchor();
   public:
     explicit DISubprogram(const MDNode *N = 0) : DIScope(N) {}
 
@@ -687,6 +693,7 @@ namespace llvm {
 
   /// DILexicalBlock - This is a wrapper for a lexical block.
   class DILexicalBlock : public DIScope {
+    virtual void anchor();
   public:
     explicit DILexicalBlock(const MDNode *N = 0) : DIScope(N) {}
     DIScope getContext() const       { return getFieldAs<DIScope>(1);      }
@@ -705,6 +712,7 @@ namespace llvm {
   /// DILexicalBlockFile - This is a wrapper for a lexical block with
   /// a filename change.
   class DILexicalBlockFile : public DIScope {
+    virtual void anchor();
   public:
     explicit DILexicalBlockFile(const MDNode *N = 0) : DIScope(N) {}
     DIScope getContext() const { return getScope().getContext(); }
@@ -724,6 +732,7 @@ namespace llvm {
 
   /// DINameSpace - A wrapper for a C++ style name space.
   class DINameSpace : public DIScope { 
+    virtual void anchor();
   public:
     explicit DINameSpace(const MDNode *N = 0) : DIScope(N) {}
     DIScope getContext() const     { return getFieldAs<DIScope>(1);      }
index d7f74af1c65c8fb85b3c32c5222e7cd4d3827ea5..a2e0675e92b7504293e3ec7743b00a269aed65bf 100644 (file)
@@ -154,6 +154,7 @@ public:
 /// used to compute a forward dominator frontiers.
 ///
 class DominanceFrontier : public DominanceFrontierBase {
+  virtual void anchor();
 public:
   static char ID; // Pass ID, replacement for typeid
   DominanceFrontier() :
index cd7488266231231ad2727ecac1c845571c38c428..e66075c1f235a646fefbfb260d3fbaeec8ec0376 100644 (file)
@@ -30,6 +30,7 @@ template<typename ValueSubClass, typename ItemParentClass>
 /// the function was called with.
 /// @brief LLVM Argument representation  
 class Argument : public Value, public ilist_node<Argument> {
+  virtual void anchor();
   Function *Parent;
 
   friend class SymbolTableListTraits<Argument, Function>;
index 88e22d6a24cef24363a250aaada6ef4e6cef75f6..89f00e91f78ecf4aefd7539e4e90e0794c0abf65 100644 (file)
@@ -51,6 +51,7 @@ class Function;
 /// occurred, more memory is allocated, and we reemit the code into it.
 /// 
 class JITCodeEmitter : public MachineCodeEmitter {
+  virtual void anchor();
 public:
   virtual ~JITCodeEmitter() {}
 
index 0271c5d852224d5a793e557df7be854448ab866b..6cb5c9e0fba4606bc30ff2954d49dd5859113349 100644 (file)
@@ -153,6 +153,7 @@ private:
 /// LexicalScope - This class is used to track scope information.
 ///
 class LexicalScope {
+  virtual void anchor();
 
 public:
   LexicalScope(LexicalScope *P, const MDNode *D, const MDNode *I, bool A)
index e7688748945fbfa36aaa39adfab7483db37614d7..4a10bc326f6c4b95507da1953e3b81a31ae56c2a 100644 (file)
@@ -25,6 +25,7 @@ class raw_ostream;
 class MachineBasicBlock;
 
 class MachineBranchProbabilityInfo : public ImmutablePass {
+  virtual void anchor();
 
   // Default weight value. Used when we don't have information about the edge.
   // TODO: DEFAULT_WEIGHT makes sense during static predication, when none of
index 428aada7ba13e6ac5808adb50a73be5cc32a7140..86e8f27877e2c11d5ecb149463d3eb52c79ec667 100644 (file)
@@ -20,6 +20,8 @@
 #include "llvm/Support/DataTypes.h"
 #include "llvm/Support/DebugLoc.h"
 
+#include <string>
+
 namespace llvm {
 
 class MachineBasicBlock;
@@ -49,6 +51,7 @@ class MCSymbol;
 /// occurred, more memory is allocated, and we reemit the code into it.
 /// 
 class MachineCodeEmitter {
+  virtual void anchor();
 protected:
   /// BufferBegin/BufferEnd - Pointers to the start and end of the memory
   /// allocated for this code buffer.
index 29f4f443bf7b83a38bb6e410d744ffb99d95a39b..d6d65a24defbea236cb6b94a87e03227c1337950 100644 (file)
@@ -34,6 +34,7 @@ class raw_ostream;
 /// Abstract base class for all machine specific constantpool value subclasses.
 ///
 class MachineConstantPoolValue {
+  virtual void anchor();
   Type *Ty;
 
 public:
index 6ee2e90a9f565ca4d6e7a7f23eda06c1e1882f35..c41e8e26d66a5ad09594f3af151bd844f27d6e7b 100644 (file)
@@ -33,6 +33,7 @@ typedef void *(*MachinePassCtor)();
 ///
 //===----------------------------------------------------------------------===//
 class MachinePassRegistryListener {
+  virtual void anchor();
 public:
   MachinePassRegistryListener() {}
   virtual ~MachinePassRegistryListener() {}
index 1bbc6c54d7fa758738b774562d472121c411f405..cdc4f433f30687778fe4fb59e624290238ad7445 100644 (file)
@@ -427,6 +427,7 @@ namespace llvm {
   /// implementation to decide.
   ///
   class SchedulingPriorityQueue {
+    virtual void anchor();
     unsigned CurCycle;
     bool HasReadyFilter;
   public:
index 3c5c5df39a33f16b4b9009e7ec30e17a9f0b0ae5..c466175b684e6a1032394b35bff428bbcd36cd86 100644 (file)
@@ -181,6 +181,7 @@ protected:
   /// ISelUpdater - helper class to handle updates of the
   /// instruction selection graph.
   class ISelUpdater : public SelectionDAG::DAGUpdateListener {
+    virtual void anchor();
     SelectionDAG::allnodes_iterator &ISelPosition;
   public:
     explicit ISelUpdater(SelectionDAG::allnodes_iterator &isp)
index ecc1fe70cc5dbc54d4a2847d5a74e9bed25573ee..3ce8d2c243eb673f46fa1fbe108ba842813cfab8 100644 (file)
@@ -41,6 +41,7 @@ namespace llvm {
 class Constant : public User {
   void operator=(const Constant &);     // Do not implement
   Constant(const Constant &);           // Do not implement
+  virtual void anchor();
   
 protected:
   Constant(Type *ty, ValueTy vty, Use *Ops, unsigned NumOps)
index 41e451f5a198827f2a94d0f24ea69321b5a9de56..3182add096cd11a6972adfc20cb71187f520a85f 100644 (file)
@@ -45,6 +45,7 @@ struct ConvertConstantType;
 /// represents both boolean and integral constants.
 /// @brief Class for constant integers.
 class ConstantInt : public Constant {
+  virtual void anchor();
   void *operator new(size_t, unsigned);  // DO NOT IMPLEMENT
   ConstantInt(const ConstantInt &);      // DO NOT IMPLEMENT
   ConstantInt(IntegerType *Ty, const APInt& V);
@@ -229,6 +230,7 @@ public:
 ///
 class ConstantFP : public Constant {
   APFloat Val;
+  virtual void anchor();
   void *operator new(size_t, unsigned);// DO NOT IMPLEMENT
   ConstantFP(const ConstantFP &);      // DO NOT IMPLEMENT
   friend class LLVMContextImpl;
index ba699d78529f7b669266fb68d9ab6e69d52a2dd1..0ff3e127ed0ec73267f9b144f876c60263e046e8 100644 (file)
 
 namespace llvm {
   class MCAsmInfoCOFF : public MCAsmInfo {
+    virtual void anchor();
   protected:
     explicit MCAsmInfoCOFF();
-      
   };
 
   class MCAsmInfoMicrosoft : public MCAsmInfoCOFF {
+    virtual void anchor();
   protected:
     explicit MCAsmInfoMicrosoft();
   };
 
   class MCAsmInfoGNUCOFF : public MCAsmInfoCOFF {
+    virtual void anchor();
   protected:
     explicit MCAsmInfoGNUCOFF();
   };
index 1f6c49938c9cc3226eae88263c6058d4c8a2b1e2..af552de6e6903c6be85fd4e6108bdca7eb5ac278 100644 (file)
@@ -18,7 +18,9 @@
 #include "llvm/MC/MCAsmInfo.h"
 
 namespace llvm {
-  struct MCAsmInfoDarwin : public MCAsmInfo {
+  class MCAsmInfoDarwin : public MCAsmInfo {
+    virtual void anchor();
+  public:
     explicit MCAsmInfoDarwin();
   };
 }
index 687dd0c140744cb80a1c4d78b521a2e0e1c5e99c..2566241d11bb259da226d8d8c78a4ee28150c7d0 100644 (file)
@@ -106,6 +106,7 @@ public:
 };
 
 class MCDataFragment : public MCFragment {
+  virtual void anchor();
   SmallString<32> Contents;
 
   /// Fixups - The list of fixups in this fragment.
@@ -160,6 +161,8 @@ public:
 // object with just the MCInst and a code size, then we should just change
 // MCDataFragment to have an optional MCInst at its end.
 class MCInstFragment : public MCFragment {
+  virtual void anchor();
+
   /// Inst - The instruction this is a fragment for.
   MCInst Inst;
 
@@ -215,6 +218,8 @@ public:
 };
 
 class MCAlignFragment : public MCFragment {
+  virtual void anchor();
+
   /// Alignment - The alignment to ensure, in bytes.
   unsigned Alignment;
 
@@ -263,6 +268,8 @@ public:
 };
 
 class MCFillFragment : public MCFragment {
+  virtual void anchor();
+
   /// Value - Value to use for filling bytes.
   int64_t Value;
 
@@ -300,6 +307,8 @@ public:
 };
 
 class MCOrgFragment : public MCFragment {
+  virtual void anchor();
+
   /// Offset - The offset this fragment should start at.
   const MCExpr *Offset;
 
@@ -327,6 +336,8 @@ public:
 };
 
 class MCLEBFragment : public MCFragment {
+  virtual void anchor();
+
   /// Value - The value this fragment should contain.
   const MCExpr *Value;
 
@@ -358,6 +369,8 @@ public:
 };
 
 class MCDwarfLineAddrFragment : public MCFragment {
+  virtual void anchor();
+
   /// LineDelta - the value of the difference between the two line numbers
   /// between two .loc dwarf directives.
   int64_t LineDelta;
@@ -393,6 +406,8 @@ public:
 };
 
 class MCDwarfCallFrameFragment : public MCFragment {
+  virtual void anchor();
+
   /// AddrDelta - The expression for the difference of the two symbols that
   /// make up the address delta between two .cfi_* dwarf directives.
   const MCExpr *AddrDelta;
index 59b4b2619629ee9cd33bc378c11e442126435fa8..9466a5791ccbd2c92b590dba51e58f1ec15ea7c5 100644 (file)
@@ -36,6 +36,7 @@ template<typename ValueSubClass, typename ItemParentClass>
 /// These are used to efficiently contain a byte sequence for metadata.
 /// MDString is always unnamed.
 class MDString : public Value {
+  virtual void anchor();
   MDString(const MDString &);            // DO NOT IMPLEMENT
 
   StringRef Str;
index 9e1369a5c6229a84dc7a3ff83a16d1fb5001ac9b..e6df85679d4e487d27c9efe5091335e533d58d47 100644 (file)
@@ -22,6 +22,7 @@ namespace llvm {
 namespace object {
 
 class Archive : public Binary {
+  virtual void anchor();
 public:
   class Child {
     const Archive *Parent;
index fd180d4e58a21da6052606786406b2699bd9dab0..29b707703838779e3e836b25d0afe02d6b74e61f 100644 (file)
@@ -232,7 +232,7 @@ const uint64_t UnknownAddressOrSize = ~0ULL;
 /// Concrete instances of this object are created by createObjectFile, which
 /// figure out which type to create.
 class ObjectFile : public Binary {
-private:
+  virtual void anchor();
   ObjectFile(); // = delete
   ObjectFile(const ObjectFile &other); // = delete
 
index 0cf1725a981e1ec270a45f74bf8db8a720444a1c..f9ade8f144c055e3926b8d04eb1e1777552eb74a 100644 (file)
@@ -68,6 +68,7 @@ class RecordKeeper;
 
 class RecTy {
   ListRecTy *ListTy;
+  virtual void anchor();
 public:
   RecTy() : ListTy(0) {}
   virtual ~RecTy() {}
@@ -489,6 +490,7 @@ RecTy *resolveTypes(RecTy *T1, RecTy *T2);
 class Init {
   Init(const Init &);  // Do not define.
   Init &operator=(const Init &);  // Do not define.
+  virtual void anchor();
 
 protected:
   Init(void) {}
@@ -617,6 +619,7 @@ class UnsetInit : public Init {
   UnsetInit() : Init() {}
   UnsetInit(const UnsetInit &);  // Do not define.
   UnsetInit &operator=(const UnsetInit &Other);  // Do not define.
+  virtual void anchor();
 
 public:
   static UnsetInit *get();
@@ -638,6 +641,7 @@ class BitInit : public Init {
   explicit BitInit(bool V) : Value(V) {}
   BitInit(const BitInit &Other);  // Do not define.
   BitInit &operator=(BitInit &Other);  // Do not define.
+  virtual void anchor();
 
 public:
   static BitInit *get(bool V);
@@ -750,6 +754,7 @@ class StringInit : public TypedInit {
 
   StringInit(const StringInit &Other);  // Do not define.
   StringInit &operator=(const StringInit &Other);  // Do not define.
+  virtual void anchor();
 
 public:
   static StringInit *get(const std::string &V);
@@ -792,6 +797,7 @@ class CodeInit : public Init {
 
   CodeInit(const CodeInit &Other);  // Do not define.
   CodeInit &operator=(const CodeInit &Other);  // Do not define.
+  virtual void anchor();
 
 public:
   static CodeInit *get(const std::string &V);
index 9f1c23c5b4574abaec9b137a5c4e60567c97a604..733ae626447c3f192733b2fccd9e6bc5f9925bee 100644 (file)
@@ -21,6 +21,7 @@ class raw_ostream;
 class RecordKeeper;
 
 class TableGenAction {
+  virtual void anchor();
 public:
   virtual ~TableGenAction() {}
 
index 853f92e406fb55086517e54e75667ec64a1803d8..3f612def2c744ca1702687bad125a5175db1e662 100644 (file)
@@ -24,6 +24,7 @@ class Record;
 class RecordKeeper;
 
 struct TableGenBackend {
+  virtual void anchor();
   virtual ~TableGenBackend() {}
 
   // run - All TableGen backends should implement the run method, which should
index b198eb62f0c6f135920e79074ac86002044321d2..53e9ee011385b696758579f2098634678910427c 100644 (file)
@@ -30,6 +30,7 @@ namespace llvm {
   /// TargetJITInfo - Target specific information required by the Just-In-Time
   /// code generator.
   class TargetJITInfo {
+    virtual void anchor();
   public:
     virtual ~TargetJITInfo() {}
 
index 0d7a9495179fdab7e232a9943af38ac2e873ac70..3fe22b94a04e46f7b4928de239241e9d8673f96c 100644 (file)
@@ -208,6 +208,7 @@ namespace llvm {
 /// library functions are available for the current target, and allows a
 /// frontend to disable optimizations through -fno-builtin etc.
 class TargetLibraryInfo : public ImmutablePass {
+  virtual void anchor();
   unsigned char AvailableArray[(LibFunc::NumLibFuncs+3)/4];
   llvm::DenseMap<unsigned, std::string> CustomNames;
   static const char* StandardNames[LibFunc::NumLibFuncs];
index 803ff9f0ed1dde6f2aa4aa9a41a66d2878d785cf..cd30768a4ad4849c5f8c0f6a7d93b24e95b790b4 100644 (file)
@@ -38,6 +38,7 @@ public:
   typedef const EVT* vt_iterator;
   typedef const TargetRegisterClass* const * sc_iterator;
 private:
+  virtual void anchor();
   const MCRegisterClass *MC;
   const vt_iterator VTs;
   const unsigned *SubClassMask;
index 21d433aa4298e5a05168ed4e48984a0ceafaa797..c9bd9163d7fdee6c4512e2777b323a1804b0a569 100644 (file)
@@ -33,6 +33,7 @@ class ScalarEvolution;
 /// Interface for visiting interesting IV users that are recognized but not
 /// simplified by this utility.
 class IVVisitor {
+  virtual void anchor();
 public:
   virtual ~IVVisitor() {}
   virtual void visitCast(CastInst *Cast) = 0;
index 1f0053d8cfbb19877ad743af1ef9f19c86a041e3..50080592a3ebb0ad7ef7365e5a419375c17bcd25 100644 (file)
@@ -637,6 +637,32 @@ DIArray DICompileUnit::getGlobalVariables() const {
   return DIArray();
 }
 
+//===----------------------------------------------------------------------===//
+// DIDescriptor: vtable anchors for all descriptors.
+//===----------------------------------------------------------------------===//
+
+void DIScope::anchor() { }
+
+void DICompileUnit::anchor() { }
+
+void DIFile::anchor() { }
+
+void DIType::anchor() { }
+
+void DIBasicType::anchor() { }
+
+void DIDerivedType::anchor() { }
+
+void DICompositeType::anchor() { }
+
+void DISubprogram::anchor() { }
+
+void DILexicalBlock::anchor() { }
+
+void DINameSpace::anchor() { }
+
+void DILexicalBlockFile::anchor() { }
+
 //===----------------------------------------------------------------------===//
 // DIDescriptor: dump routines for all descriptors.
 //===----------------------------------------------------------------------===//
index 6de4e1e1d7de92a7312e12991d6982c88dcc7703..1604576ec4ae43dce70a9d48d1d43d09034f5829 100644 (file)
@@ -35,6 +35,8 @@ namespace {
   };
 }
 
+void DominanceFrontier::anchor() { }
+
 const DominanceFrontier::DomSetType &
 DominanceFrontier::calculate(const DominatorTree &DT,
                              const DomTreeNode *Node) {
index 4f2d3e5b79aa8a7dc17ab009e0b9d847a76aabd7..64e89e666e5fcad7c418851d12ae48b63413e07c 100644 (file)
@@ -174,6 +174,7 @@ void DIE::dump() {
 }
 #endif
 
+void DIEValue::anchor() { }
 
 #ifndef NDEBUG
 void DIEValue::dump() {
index 265446cf230b777954672e355d21308a192f75e1..b4996250c1b7e2d5054630f6e2ac46a07f61916c 100644 (file)
@@ -195,6 +195,7 @@ namespace llvm {
   /// DIEValue - A debug information entry value.
   ///
   class DIEValue {
+    virtual void anchor();
   public:
     enum {
       isInteger,
diff --git a/lib/CodeGen/JITCodeEmitter.cpp b/lib/CodeGen/JITCodeEmitter.cpp
new file mode 100644 (file)
index 0000000..96a5389
--- /dev/null
@@ -0,0 +1,14 @@
+//===-- llvm/CodeGen/JITCodeEmitter.cpp - Code emission --------*- C++ -*-===//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#include "llvm/CodeGen/JITCodeEmitter.h"
+
+using namespace llvm;
+
+void JITCodeEmitter::anchor() { }
index a12e1a36d1134909cbf8c043f7dec70e8308329b..f1abcbb1dd5c6c697b88dd6ad7f79ae5b451524e 100644 (file)
@@ -311,6 +311,8 @@ bool LexicalScopes::dominates(DebugLoc DL, MachineBasicBlock *MBB) {
   return Result;
 }
 
+void LexicalScope::anchor() { }
+
 /// dump - Print data structures.
 void LexicalScope::dump() const {
 #ifndef NDEBUG
index a470877e128998d777ade6c4044db8984ac89894..08ad0855efa372b54779266107ce9395168cfcd0 100644 (file)
@@ -29,6 +29,8 @@ STATISTIC(NumDCEDeleted,     "Number of instructions deleted by DCE");
 STATISTIC(NumDCEFoldedLoads, "Number of single use loads folded after DCE");
 STATISTIC(NumFracRanges,     "Number of live ranges fractured by DCE");
 
+void LiveRangeEdit::Delegate::anchor() { }
+
 LiveInterval &LiveRangeEdit::createFrom(unsigned OldReg,
                                         LiveIntervals &LIS,
                                         VirtRegMap &VRM) {
index 057d9bb68ca17c170c1df352598309b870fb135f..29361ac76ab3517979833388bb7886aaa881575b 100644 (file)
@@ -33,7 +33,9 @@ class VirtRegMap;
 class LiveRangeEdit {
 public:
   /// Callback methods for LiveRangeEdit owners.
-  struct Delegate {
+  class Delegate {
+    virtual void anchor();
+  public:
     /// Called immediately before erasing a dead machine instruction.
     virtual void LRE_WillEraseInstruction(MachineInstr *MI) {}
 
index e3cfa9ea5afcbee458358a2ed91de585d9e14034..dc45e46bb6a7fd829d49c7e2534e9d5bc2fffd3e 100644 (file)
@@ -26,6 +26,8 @@ INITIALIZE_PASS_END(MachineBranchProbabilityInfo, "machine-branch-prob",
 
 char MachineBranchProbabilityInfo::ID = 0;
 
+void MachineBranchProbabilityInfo::anchor() { }
+
 uint32_t MachineBranchProbabilityInfo::
 getSumForBlock(MachineBasicBlock *MBB, uint32_t &Scale) const {
   // First we compute the sum with 64-bits of precision, ensuring that cannot
diff --git a/lib/CodeGen/MachineCodeEmitter.cpp b/lib/CodeGen/MachineCodeEmitter.cpp
new file mode 100644 (file)
index 0000000..81b4978
--- /dev/null
@@ -0,0 +1,14 @@
+//===-- llvm/CodeGen/MachineCodeEmitter.cpp - Code emission -----*- C++ -*-===//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#include "llvm/CodeGen/MachineCodeEmitter.h"
+
+using namespace llvm;
+
+void MachineCodeEmitter::anchor() { }
index 0c89a57fd55117c0162c5af506adc081acf924ef..0f9f970b351b17f4d6b7ec434f8e8404c11a6b52 100644 (file)
@@ -619,6 +619,8 @@ void MachineJumpTableInfo::dump() const { print(dbgs()); }
 //  MachineConstantPool implementation
 //===----------------------------------------------------------------------===//
 
+void MachineConstantPoolValue::anchor() { }
+
 Type *MachineConstantPoolEntry::getType() const {
   if (isMachineConstantPoolEntry())
     return Val.MachineCPVal->getType();
index 9f4ef1287803c43d13971f3762736b1c018a57cd..58e067bcb9b26704680489a7b84c0d03387dd56c 100644 (file)
@@ -16,6 +16,7 @@
 
 using namespace llvm;
 
+void MachinePassRegistryListener::anchor() { }
 
 /// Add - Adds a function pass to the registration list.
 ///
index 1e9b5c89f1724f9ebab3aed9b6dd4c6305332c3b..e829668b4c8b7eb195f623762b1ad5c63eb2583b 100644 (file)
@@ -31,6 +31,8 @@ static cl::opt<bool> StressSchedOpt(
   cl::desc("Stress test instruction scheduling"));
 #endif
 
+void SchedulingPriorityQueue::anchor() { }
+
 ScheduleDAG::ScheduleDAG(MachineFunction &mf)
   : TM(mf.getTarget()),
     TII(TM.getInstrInfo()),
index aa6ef67357151c1f0fc5a2629864336780be75d8..1e7bf667d4ed05a5d65a8fe952640de273095cbd 100644 (file)
@@ -262,6 +262,8 @@ void TargetLowering::AdjustInstrPostInstrSelection(MachineInstr *MI,
 // SelectionDAGISel code
 //===----------------------------------------------------------------------===//
 
+void SelectionDAGISel::ISelUpdater::anchor() { }
+
 SelectionDAGISel::SelectionDAGISel(const TargetMachine &tm,
                                    CodeGenOpt::Level OL) :
   MachineFunctionPass(ID), TM(tm), TLI(*tm.getTargetLowering()),
index 908380488446a2936f6b041370841d5a33e70164..09fc83b2a75b3b9694805eb869c6d8f812cdb7f5 100644 (file)
@@ -185,6 +185,8 @@ public:
 
 } // end anonymous namespace
 
+void Spiller::anchor() { }
+
 llvm::Spiller* llvm::createSpiller(MachineFunctionPass &pass,
                                    MachineFunction &mf,
                                    VirtRegMap &vrm) {
index 41f1727da43921b102c79ea94b91508f785425e8..b7d5beaab1b26a583550da4955035f83eb4bec1a 100644 (file)
@@ -22,6 +22,7 @@ namespace llvm {
   /// Implementations are utility classes which insert spill or remat code on
   /// demand.
   class Spiller {
+    virtual void anchor();
   public:
     virtual ~Spiller() = 0;
 
index e1ac398b10116cf5eb11ded835a87f403bf4a417..dccadc4ea4da987d774cb25bc52247f627c39f76 100644 (file)
@@ -165,3 +165,5 @@ DILineInfo DWARFContext::getLineInfoForAddress(uint64_t address) {
 
   return DILineInfo(fileName.c_str(), row.Line, row.Column);
 }
+
+void DWARFContextInMemory::anchor() { }
index 746a4639f2772d4e619d2606934100b92812868f..d2e763a87a45469e2e1891c9dfc72cfd3f4cfd31 100644 (file)
@@ -86,6 +86,7 @@ public:
 /// DWARFContext. It assumes all content is available in memory and stores
 /// pointers to it.
 class DWARFContextInMemory : public DWARFContext {
+  virtual void anchor();
   StringRef InfoSection;
   StringRef AbbrevSection;
   StringRef ARangeSection;
diff --git a/lib/ExecutionEngine/MCJIT/MCJITMemoryManager.cpp b/lib/ExecutionEngine/MCJIT/MCJITMemoryManager.cpp
new file mode 100644 (file)
index 0000000..457fe5e
--- /dev/null
@@ -0,0 +1,14 @@
+//==-- MCJITMemoryManager.cpp - Definition for the Memory Manager -*-C++ -*-==//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#include "MCJITMemoryManager.h"
+
+using namespace llvm;
+
+void MCJITMemoryManager::anchor() { }
index 58f9100eeff3329ceb72529cad548db9b66efb9d..bc7080d2d30f9ce0589642ffbdfc26d137baf082 100644 (file)
@@ -21,6 +21,7 @@ namespace llvm {
 // and the RuntimeDyld interface that maps objects, by name, onto their
 // matching LLVM IR counterparts in the module(s) being compiled.
 class MCJITMemoryManager : public RTDyldMemoryManager {
+  virtual void anchor();
   JITMemoryManager *JMM;
 
   // FIXME: Multiple modules.
index 6d34801f5c45fb95ce56814b34f42c73ced78785..767ac29dd4a52ecc76548d2036cfe2b215f9200e 100644 (file)
@@ -16,6 +16,8 @@
 #include "llvm/ADT/SmallVector.h"
 using namespace llvm;
 
+void MCAsmInfoCOFF::anchor() { }
+
 MCAsmInfoCOFF::MCAsmInfoCOFF() {
   GlobalPrefix = "_";
   COMMDirectiveAlignmentIsInBytes = false;
@@ -39,10 +41,14 @@ MCAsmInfoCOFF::MCAsmInfoCOFF() {
   SupportsDataRegions = false;
 }
 
+void MCAsmInfoMicrosoft::anchor() { }
+
 MCAsmInfoMicrosoft::MCAsmInfoMicrosoft() {
   AllowQuotesInName = true;
 }
 
+void MCAsmInfoGNUCOFF::anchor() { }
+
 MCAsmInfoGNUCOFF::MCAsmInfoGNUCOFF() {
 
 }
index 24f1243cfc4dfd7e741899be7ce37653276d06f1..c1e26350dc8e5ae1d1ea27e49a0ae7b8c8b7cacb 100644 (file)
@@ -18,6 +18,8 @@
 #include "llvm/MC/MCStreamer.h"
 using namespace llvm;
 
+void MCAsmInfoDarwin::anchor() { } 
+
 MCAsmInfoDarwin::MCAsmInfoDarwin() {
   // Common settings for all Darwin targets.
   // Syntax:
index c5bf6b9f875573235cce7afbd77215a36545a359..1cb97ce61fcc3316584aa6a79d94581d5d4a24e7 100644 (file)
@@ -972,3 +972,13 @@ void MCAssembler::dump() {
   }
   OS << "]>\n";
 }
+
+// anchors for MC*Fragment vtables
+void MCDataFragment::anchor() { }
+void MCInstFragment::anchor() { }
+void MCAlignFragment::anchor() { }
+void MCFillFragment::anchor() { }
+void MCOrgFragment::anchor() { }
+void MCLEBFragment::anchor() { }
+void MCDwarfLineAddrFragment::anchor() { }
+void MCDwarfCallFrameFragment::anchor() { }
index 8bdab16c04d085eeb16d27c27b96b20a9439f2e7..ad1cde0d258b699f53202e4c3fd7ce0be8b3caba 100644 (file)
@@ -74,6 +74,8 @@ static bool isInternalMember(const ArchiveMemberHeader &amh) {
   return false;
 }
 
+void Archive::anchor() { }
+
 Archive::Child Archive::Child::getNext() const {
   size_t SpaceToSkip = sizeof(ArchiveMemberHeader) +
     ToHeader(Data.data())->getSize();
index 69d8ed0e5e9af62742d8b1fcb8b844320a519333..d051c03db30429abde1dc1677663ef0e4b93ff73 100644 (file)
@@ -21,6 +21,8 @@
 using namespace llvm;
 using namespace object;
 
+void ObjectFile::anchor() { }
+
 ObjectFile::ObjectFile(unsigned int Type, MemoryBuffer *source, error_code &ec)
   : Binary(Type, source) {
 }
diff --git a/lib/Support/IntrusiveRefCntPtr.cpp b/lib/Support/IntrusiveRefCntPtr.cpp
new file mode 100644 (file)
index 0000000..a8b4559
--- /dev/null
@@ -0,0 +1,14 @@
+//== IntrusiveRefCntPtr.cpp - Smart Refcounting Pointer ----------*- C++ -*-==//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#include "llvm/ADT/IntrusiveRefCntPtr.h"
+
+using namespace llvm;
+
+void RefCountedBaseVPTR::anchor() { }
index 7c2ee228e5b6ed6999e48f3965a61b412b7baf20..1d6131c6923f065d5313505ff0d4dfbbe0df23a3 100644 (file)
@@ -81,6 +81,7 @@ StringRecTy StringRecTy::Shared;
 CodeRecTy CodeRecTy::Shared;
 DagRecTy DagRecTy::Shared;
 
+void RecTy::anchor() { }
 void RecTy::dump() const { print(errs()); }
 
 ListRecTy *RecTy::getListTy() {
@@ -444,13 +445,18 @@ RecTy *llvm::resolveTypes(RecTy *T1, RecTy *T2) {
 //    Initializer implementations
 //===----------------------------------------------------------------------===//
 
+void Init::anchor() { }
 void Init::dump() const { return print(errs()); }
 
+void UnsetInit::anchor() { }
+
 UnsetInit *UnsetInit::get() {
   static UnsetInit TheInit;
   return &TheInit;
 }
 
+void BitInit::anchor() { }
+
 BitInit *BitInit::get(bool V) {
   static BitInit True(true);
   static BitInit False(false);
@@ -565,6 +571,8 @@ IntInit::convertInitializerBitRange(const std::vector<unsigned> &Bits) const {
   return BitsInit::get(NewBits);
 }
 
+void StringInit::anchor() { }
+
 StringInit *StringInit::get(const std::string &V) {
   typedef StringMap<StringInit *> Pool;
   static Pool ThePool;
@@ -574,6 +582,8 @@ StringInit *StringInit::get(const std::string &V) {
   return I;
 }
 
+void CodeInit::anchor() { }
+
 CodeInit *CodeInit::get(const std::string &V) {
   typedef StringMap<CodeInit *> Pool;
   static Pool ThePool;
diff --git a/lib/TableGen/TableGenAction.cpp b/lib/TableGen/TableGenAction.cpp
new file mode 100644 (file)
index 0000000..54e5083
--- /dev/null
@@ -0,0 +1,15 @@
+//===- TableGenAction.cpp - defines TableGenAction --------------*- C++ -*-===//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#include "llvm/TableGen/TableGenAction.h"
+
+using namespace llvm;
+
+void TableGenAction::anchor() { }
+
index 29588db324cfde96b267b06cf0fb121155bb67d7..328d9a4930e5d3aef8e6788fb785282298e97c8b 100644 (file)
@@ -15,6 +15,8 @@
 #include "llvm/TableGen/Record.h"
 using namespace llvm;
 
+void TableGenBackend::anchor() { }
+
 void TableGenBackend::EmitSourceFileHeader(const std::string &Desc,
                                            raw_ostream &OS) const {
   OS << "//===- TableGen'erated file -------------------------------------*-"
diff --git a/lib/Target/ARM/ARMMachineFunctionInfo.cpp b/lib/Target/ARM/ARMMachineFunctionInfo.cpp
new file mode 100644 (file)
index 0000000..a770bc5
--- /dev/null
@@ -0,0 +1,14 @@
+//====- ARMMachineFuctionInfo.cpp - ARM machine function info ---*- C++ -*-===//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#include "ARMMachineFunctionInfo.h"
+
+using namespace llvm;
+
+void ARMFunctionInfo::anchor() { }
index 138f0c2622718526583264e231de68522878340a..96be29fa4f27c28f2a18ad84499d12ee7f9d4cb5 100644 (file)
@@ -25,6 +25,7 @@ namespace llvm {
 /// ARMFunctionInfo - This class is derived from MachineFunctionInfo and
 /// contains private ARM-specific information for each MachineFunction.
 class ARMFunctionInfo : public MachineFunctionInfo {
+  virtual void anchor();
 
   /// isThumb - True if this function is compiled under Thumb mode.
   /// Used to initialized Align, so must precede it.
index 1cba1ba591efcd4cc734586da6bcb8268618cfc3..d6921bb83c5511d57febc4ff8a92be100b01e9de 100644 (file)
@@ -16,6 +16,8 @@
 #include "ARMRegisterInfo.h"
 using namespace llvm;
 
+void ARMRegisterInfo::anchor() { }
+
 ARMRegisterInfo::ARMRegisterInfo(const ARMBaseInstrInfo &tii,
                                  const ARMSubtarget &sti)
   : ARMBaseRegisterInfo(tii, sti) {
index 8edfb9a2057fc4886eac7593ac828cd78fdc1d8b..15afc1aadab54eedfeb4ca318fa0b1f321949640 100644 (file)
@@ -24,6 +24,7 @@ namespace llvm {
   class Type;
 
 struct ARMRegisterInfo : public ARMBaseRegisterInfo {
+  virtual void anchor();
 public:
   ARMRegisterInfo(const ARMBaseInstrInfo &tii, const ARMSubtarget &STI);
 };
index 61b75cbcbc5472cd83627c89f3187357542fc2fb..9d6f9bd47a738ecfee5a93d9a19a44a115dd8218 100644 (file)
@@ -34,6 +34,7 @@ extern "C" void LLVMInitializeARMTarget() {
   RegisterTargetMachine<ThumbTargetMachine> Y(TheThumbTarget);
 }
 
+
 /// TargetMachine ctor - Create an ARM architecture model.
 ///
 ARMBaseTargetMachine::ARMBaseTargetMachine(const Target &T, StringRef TT,
@@ -50,6 +51,8 @@ ARMBaseTargetMachine::ARMBaseTargetMachine(const Target &T, StringRef TT,
     this->Options.FloatABIType = FloatABI::Soft;
 }
 
+void ARMTargetMachine::anchor() { }
+
 ARMTargetMachine::ARMTargetMachine(const Target &T, StringRef TT,
                                    StringRef CPU, StringRef FS,
                                    const TargetOptions &Options,
@@ -74,6 +77,8 @@ ARMTargetMachine::ARMTargetMachine(const Target &T, StringRef TT,
                        "support ARM mode execution!");
 }
 
+void ThumbTargetMachine::anchor() { }
+
 ThumbTargetMachine::ThumbTargetMachine(const Target &T, StringRef TT,
                                        StringRef CPU, StringRef FS,
                                        const TargetOptions &Options,
index cd77822a33df047a5fe3154e62155ddd4fbf0275..b8a384928f5e8a782ae27b063ccb6e88237e265c 100644 (file)
@@ -63,6 +63,7 @@ public:
 /// ARMTargetMachine - ARM target machine.
 ///
 class ARMTargetMachine : public ARMBaseTargetMachine {
+  virtual void anchor();
   ARMInstrInfo        InstrInfo;
   const TargetData    DataLayout;       // Calculates type size & alignment
   ARMELFWriterInfo    ELFWriterInfo;
@@ -103,6 +104,7 @@ class ARMTargetMachine : public ARMBaseTargetMachine {
 ///   Thumb-1 and Thumb-2.
 ///
 class ThumbTargetMachine : public ARMBaseTargetMachine {
+  virtual void anchor();
   // Either Thumb1InstrInfo or Thumb2InstrInfo.
   OwningPtr<ARMBaseInstrInfo> InstrInfo;
   const TargetData    DataLayout;   // Calculates type size & alignment
index 1c109e0152805ec626369eab781d96185e24747c..d1804a2e45b1e74790c4fabd14e5eb9fe2f02d7a 100644 (file)
@@ -48,6 +48,8 @@ static const char *const arm_asm_table[] = {
   0,0
 };
 
+void ARMMCAsmInfoDarwin::anchor() { }
+
 ARMMCAsmInfoDarwin::ARMMCAsmInfoDarwin() {
   AsmTransCBE = arm_asm_table;
   Data64bitsDirective = 0;
@@ -61,6 +63,8 @@ ARMMCAsmInfoDarwin::ARMMCAsmInfoDarwin() {
   ExceptionsType = ExceptionHandling::SjLj;
 }
 
+void ARMELFMCAsmInfo::anchor() { }
+
 ARMELFMCAsmInfo::ARMELFMCAsmInfo() {
   // ".comm align is in bytes but .align is pow-2."
   AlignmentIsInBytes = false;
index 90f7822ea580ec711eb939362d263c024a5c7d7d..e240f4ee1840660b073dec95e67437f95dff74a7 100644 (file)
 
 namespace llvm {
 
-  struct ARMMCAsmInfoDarwin : public MCAsmInfoDarwin {
+  class ARMMCAsmInfoDarwin : public MCAsmInfoDarwin {
+    virtual void anchor();
+  public:
     explicit ARMMCAsmInfoDarwin();
   };
 
-  struct ARMELFMCAsmInfo : public MCAsmInfo {
+  class ARMELFMCAsmInfo : public MCAsmInfo {
+    virtual void anchor();
+  public:
     explicit ARMELFMCAsmInfo();
   };
 
index 8c1176a9d028c5f10ace677257099ce3ca878f2c..4bad37eacaf733fbba975867cf58994c3b12779b 100644 (file)
@@ -14,6 +14,8 @@
 #include "SPUMCAsmInfo.h"
 using namespace llvm;
 
+void SPULinuxMCAsmInfo::anchor() { }
+
 SPULinuxMCAsmInfo::SPULinuxMCAsmInfo(const Target &T, StringRef TT) {
   IsLittleEndian = false;
 
index 7f850d347f56cff8e7792d85f0284fb83678662b..f786147b926714c778a24a307de5f643b563159e 100644 (file)
@@ -20,7 +20,9 @@
 namespace llvm {
   class Target;
   
-  struct SPULinuxMCAsmInfo : public MCAsmInfo {
+  class SPULinuxMCAsmInfo : public MCAsmInfo {
+    virtual void anchor();
+  public:
     explicit SPULinuxMCAsmInfo(const Target &T, StringRef TT);
   };
 } // namespace llvm
diff --git a/lib/Target/CellSPU/SPUMachineFunction.cpp b/lib/Target/CellSPU/SPUMachineFunction.cpp
new file mode 100644 (file)
index 0000000..5df522e
--- /dev/null
@@ -0,0 +1,14 @@
+//==-- SPUMachineFunctionInfo.cpp - Private data used for CellSPU -*- C++ -*-=//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#include "SPUMachineFunction.h"
+
+using namespace llvm;
+
+void SPUFunctionInfo::anchor() { }
index 3ef3ccbcaaee2da579bb50cb1de05243bd0329a5..399684bb0887fbb910deb0ce155867a17af70350 100644 (file)
@@ -21,7 +21,8 @@ namespace llvm {
 /// SPUFunctionInfo - Cell SPU target-specific information for each
 /// MachineFunction
 class SPUFunctionInfo : public MachineFunctionInfo {
-private:
+  virtual void anchor();
+
   /// UsesLR - Indicates whether LR is used in the current function.
   ///
   bool UsesLR;
diff --git a/lib/Target/MBlaze/MBlazeMachineFunction.cpp b/lib/Target/MBlaze/MBlazeMachineFunction.cpp
new file mode 100644 (file)
index 0000000..c048879
--- /dev/null
@@ -0,0 +1,14 @@
+//===-- MBlazeMachineFunctionInfo.cpp - Private data --------------*- C++ -*-=//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#include "MBlazeMachineFunction.h"
+
+using namespace llvm;
+
+void MBlazeFunctionInfo::anchor() { }
index df395094282fbb88a3843dba2d06749ca3c992a1..7ea8d03adccb00da808cc5868835999501aaca8a 100644 (file)
@@ -25,8 +25,8 @@ namespace llvm {
 /// MBlazeFunctionInfo - This class is derived from MachineFunction private
 /// MBlaze target-specific information for each MachineFunction.
 class MBlazeFunctionInfo : public MachineFunctionInfo {
+  virtual void anchor();
 
-private:
   /// Holds for each function where on the stack the Frame Pointer must be
   /// saved. This is used on Prologue and Epilogue to emit FP save/restore
   int FPStackOffset;
index 0d88466bb300878895aa0bff7ae4194e82f04db1..8231f07dfa80d82b4e7c0b9cc967628309b6e141 100644 (file)
@@ -14,6 +14,8 @@
 #include "MBlazeMCAsmInfo.h"
 using namespace llvm;
 
+void MBlazeMCAsmInfo::anchor() { }
+
 MBlazeMCAsmInfo::MBlazeMCAsmInfo() {
   IsLittleEndian              = false;
   StackGrowsUp                = false;
index e68dd58b016bb19e17be1bd8ee1f344d9d923600..284309dd6f27e0fc50099916feec2d7b7521c2ad 100644 (file)
@@ -21,6 +21,7 @@ namespace llvm {
   class Target;
 
   class MBlazeMCAsmInfo : public MCAsmInfo {
+    virtual void anchor();
   public:
     explicit MBlazeMCAsmInfo();
   };
index ad7d380b56317034b9866794339fae926bebf3d4..5e5f3d8811d16a14691d62c160561a05e1acc2ac 100644 (file)
@@ -14,6 +14,8 @@
 #include "MSP430MCAsmInfo.h"
 using namespace llvm;
 
+void MSP430MCAsmInfo::anchor() { }
+
 MSP430MCAsmInfo::MSP430MCAsmInfo(const Target &T, StringRef TT) {
   PointerSize = 2;
 
index f3138a22022daadfcfdf4e575a43bd14b7ddb3ed..17658f5719eedc14fdaefc0afd71b9b372d25192 100644 (file)
@@ -20,7 +20,9 @@
 namespace llvm {
   class Target;
 
-  struct MSP430MCAsmInfo : public MCAsmInfo {
+  class MSP430MCAsmInfo : public MCAsmInfo {
+    virtual void anchor();
+  public:
     explicit MSP430MCAsmInfo(const Target &T, StringRef TT);
   };
 
diff --git a/lib/Target/MSP430/MSP430MachineFunctionInfo.cpp b/lib/Target/MSP430/MSP430MachineFunctionInfo.cpp
new file mode 100644 (file)
index 0000000..91058a4
--- /dev/null
@@ -0,0 +1,14 @@
+//==- MSP430MachineFuctionInfo.cpp - MSP430 machine function info -*- C++ -*-=//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#include "MSP430MachineFunctionInfo.h"
+
+using namespace llvm;
+
+void MSP430MachineFunctionInfo::anchor() { }
index 383fd2e9821c44d7b9395d9f2f24409cb2ea1693..632d6dee275fec30615459b76f356bbea2cf947c 100644 (file)
@@ -21,6 +21,8 @@ namespace llvm {
 /// MSP430MachineFunctionInfo - This class is derived from MachineFunction and
 /// contains private MSP430 target-specific information for each MachineFunction.
 class MSP430MachineFunctionInfo : public MachineFunctionInfo {
+  virtual void anchor();
+
   /// CalleeSavedFrameSize - Size of the callee-saved register portion of the
   /// stack frame in bytes.
   unsigned CalleeSavedFrameSize;
index 3ee14d9f7a83e4150642c34892ad32a20c6d18b9..f47f4cb5a61a7c6d5a47d81ad4acdc61f8ddb448 100644 (file)
@@ -21,6 +21,8 @@
 
 using namespace llvm;
 
+void MSP430Subtarget::anchor() { }
+
 MSP430Subtarget::MSP430Subtarget(const std::string &TT,
                                  const std::string &CPU,
                                  const std::string &FS) :
index 1ce5f11fe1bb0a4a6a5e90e49424eba1240db0bb..3743346fafd988c5e753eafc927e352502483746 100644 (file)
@@ -25,6 +25,7 @@ namespace llvm {
 class StringRef;
 
 class MSP430Subtarget : public MSP430GenSubtargetInfo {
+  virtual void anchor();
   bool ExtendedInsts;
 public:
   /// This constructor initializes the data members to match that
index 71ae8049899581d372ac677c7a4634f6e57647eb..c72af7d82601ea9f30611d873d7ddfc5091cf7ae 100644 (file)
@@ -16,6 +16,8 @@
 
 using namespace llvm;
 
+void MipsMCAsmInfo::anchor() { }
+
 MipsMCAsmInfo::MipsMCAsmInfo(const Target &T, StringRef TT) {
   Triple TheTriple(TT);
   if ((TheTriple.getArch() == Triple::mips) ||
index 41b719207b7ba379bdafed04311d42e9e5c16364..859685dd43e7a6b2f7f07d594f7095657b2c5821 100644 (file)
@@ -21,6 +21,7 @@ namespace llvm {
   class Target;
 
   class MipsMCAsmInfo : public MCAsmInfo {
+    virtual void anchor();
   public:
     explicit MipsMCAsmInfo(const Target &T, StringRef TT);
   };
diff --git a/lib/Target/Mips/MipsMachineFunction.cpp b/lib/Target/Mips/MipsMachineFunction.cpp
new file mode 100644 (file)
index 0000000..5f3c75f
--- /dev/null
@@ -0,0 +1,14 @@
+//===-- MipsMachineFunctionInfo.cpp - Private data used for Mips --*- C++ -*-=//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#include "MipsMachineFunction.h"
+
+using namespace llvm;
+
+void MipsFunctionInfo::anchor() { }
index bc30b6b2425b4734fd9be39fe9780abf1551e7ce..31448a847467255985a1ed283ce3eb6f28409a3d 100644 (file)
@@ -25,8 +25,8 @@ namespace llvm {
 /// MipsFunctionInfo - This class is derived from MachineFunction private
 /// Mips target-specific information for each MachineFunction.
 class MipsFunctionInfo : public MachineFunctionInfo {
+  virtual void anchor();
 
-private:
   MachineFunction& MF;
   /// SRetReturnReg - Some subtargets require that sret lowering includes
   /// returning the value of the returned struct in a register. This field
index dc299f27830b85adf676e90732b4f2b712916c57..2ecee80afc5fcf47cb86e32267ea8a85fe672515 100644 (file)
@@ -21,6 +21,8 @@
 
 using namespace llvm;
 
+void MipsSubtarget::anchor() { }
+
 MipsSubtarget::MipsSubtarget(const std::string &TT, const std::string &CPU,
                              const std::string &FS, bool little) :
   MipsGenSubtargetInfo(TT, CPU, FS),
index d9dddad23a48ef333e48f985804fe83bd85738d4..0c6dc5264aa6ce5d19798defa9614991dc9e658d 100644 (file)
@@ -25,6 +25,7 @@ namespace llvm {
 class StringRef;
 
 class MipsSubtarget : public MipsGenSubtargetInfo {
+  virtual void anchor();
 
 public:
   // NOTE: O64 will not be supported.
index 02887fa9a43d20175c5c91ddfe2fc154b042f991..6088ceedcc009b0c6ceccddcfbbde6e81d1e3293 100644 (file)
@@ -52,6 +52,8 @@ MipsTargetMachine(const Target &T, StringRef TT,
     TLInfo(*this), TSInfo(*this), JITInfo() {
 }
 
+void MipsebTargetMachine::anchor() { }
+
 MipsebTargetMachine::
 MipsebTargetMachine(const Target &T, StringRef TT,
                     StringRef CPU, StringRef FS, const TargetOptions &Options,
@@ -59,6 +61,8 @@ MipsebTargetMachine(const Target &T, StringRef TT,
                     CodeGenOpt::Level OL)
   : MipsTargetMachine(T, TT, CPU, FS, Options, RM, CM, OL, false) {}
 
+void MipselTargetMachine::anchor() { }
+
 MipselTargetMachine::
 MipselTargetMachine(const Target &T, StringRef TT,
                     StringRef CPU, StringRef FS, const TargetOptions &Options,
@@ -66,6 +70,8 @@ MipselTargetMachine(const Target &T, StringRef TT,
                     CodeGenOpt::Level OL)
   : MipsTargetMachine(T, TT, CPU, FS, Options, RM, CM, OL, true) {}
 
+void Mips64ebTargetMachine::anchor() { }
+
 Mips64ebTargetMachine::
 Mips64ebTargetMachine(const Target &T, StringRef TT,
                       StringRef CPU, StringRef FS, const TargetOptions &Options,
@@ -73,6 +79,8 @@ Mips64ebTargetMachine(const Target &T, StringRef TT,
                       CodeGenOpt::Level OL)
   : MipsTargetMachine(T, TT, CPU, FS, Options, RM, CM, OL, false) {}
 
+void Mips64elTargetMachine::anchor() { }
+
 Mips64elTargetMachine::
 Mips64elTargetMachine(const Target &T, StringRef TT,
                       StringRef CPU, StringRef FS, const TargetOptions &Options,
index 6842373f155da91610c0caa7e061565d221b7052..6e88956f655b060c9222d6aa041a95eec74fe58d 100644 (file)
@@ -80,6 +80,7 @@ namespace llvm {
 /// MipsebTargetMachine - Mips32 big endian target machine.
 ///
 class MipsebTargetMachine : public MipsTargetMachine {
+  virtual void anchor();
 public:
   MipsebTargetMachine(const Target &T, StringRef TT,
                       StringRef CPU, StringRef FS, const TargetOptions &Options,
@@ -90,6 +91,7 @@ public:
 /// MipselTargetMachine - Mips32 little endian target machine.
 ///
 class MipselTargetMachine : public MipsTargetMachine {
+  virtual void anchor();
 public:
   MipselTargetMachine(const Target &T, StringRef TT,
                       StringRef CPU, StringRef FS, const TargetOptions &Options,
@@ -100,6 +102,7 @@ public:
 /// Mips64ebTargetMachine - Mips64 big endian target machine.
 ///
 class Mips64ebTargetMachine : public MipsTargetMachine {
+  virtual void anchor();
 public:
   Mips64ebTargetMachine(const Target &T, StringRef TT,
                         StringRef CPU, StringRef FS,
@@ -111,6 +114,7 @@ public:
 /// Mips64elTargetMachine - Mips64 little endian target machine.
 ///
 class Mips64elTargetMachine : public MipsTargetMachine {
+  virtual void anchor();
 public:
   Mips64elTargetMachine(const Target &T, StringRef TT,
                         StringRef CPU, StringRef FS,
index efefead5341d9d4140003650bf288a719e4ae9ee..cdfbc80462460e28b1fa5c2b9a929f97f321343e 100644 (file)
@@ -16,6 +16,8 @@
 
 using namespace llvm;
 
+void PTXMCAsmInfo::anchor() { }
+
 PTXMCAsmInfo::PTXMCAsmInfo(const Target &T, const StringRef &TT) {
   Triple TheTriple(TT);
   if (TheTriple.getArch() == Triple::ptx64)
index 03f5d66b3d605f580e3afffea2e073b57cee9b42..c4c8890f65b0a3bf1dd3ac724adf6d3c9959d2d3 100644 (file)
@@ -20,7 +20,9 @@ namespace llvm {
   class Target;
   class StringRef;
 
-  struct PTXMCAsmInfo : public MCAsmInfo {
+  class PTXMCAsmInfo : public MCAsmInfo {
+    virtual void anchor();
+  public:
     explicit PTXMCAsmInfo(const Target &T, const StringRef &TT);
   };
 } // namespace llvm
diff --git a/lib/Target/PTX/PTXMachineFunctionInfo.cpp b/lib/Target/PTX/PTXMachineFunctionInfo.cpp
new file mode 100644 (file)
index 0000000..d471d4c
--- /dev/null
@@ -0,0 +1,14 @@
+//===- PTXMachineFuctionInfo.cpp - PTX machine function info -----*- C++ -*-==//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#include "PTXMachineFunctionInfo.h"
+
+using namespace llvm;
+
+void PTXMachineFunctionInfo::anchor() { }
index 1a2878cbec33a5f5d30b94db21e23b5c2138ce56..3229f5f035346ea02375521b6d186f365150282a 100644 (file)
@@ -30,7 +30,7 @@ namespace llvm {
 /// contains private PTX target-specific information for each MachineFunction.
 ///
 class PTXMachineFunctionInfo : public MachineFunctionInfo {
-private:
+  virtual void anchor();
   bool IsKernel;
   DenseSet<unsigned> RegArgs;
   DenseSet<unsigned> RegRets;
index 1eb57d2f17021ded1634a3a8ea03ba0e1aad6a9d..03cbb24e81dbf05ec06493a5aea4c90ff954c273 100644 (file)
@@ -22,6 +22,8 @@
 
 using namespace llvm;
 
+void PTXSubtarget::anchor() { }
+
 PTXSubtarget::PTXSubtarget(const std::string &TT, const std::string &CPU,
                            const std::string &FS, bool is64Bit)
   : PTXGenSubtargetInfo(TT, CPU, FS),
index b946d7c11cefd3a8acb211b6d798bd90caf56239..15b3d44a95478403b5f7c7626e6f2d542d5d32d1 100644 (file)
@@ -23,6 +23,7 @@ namespace llvm {
 class StringRef;
 
   class PTXSubtarget : public PTXGenSubtargetInfo {
+      virtual void anchor(); 
     public:
 
       /**
index 4efdc2784d89754b8e9e1ba3e4fdcd57f5bc8f91..fb9dc606aed9f16a8b21c0d5c35fc019571c53c3 100644 (file)
@@ -85,6 +85,8 @@ PTXTargetMachine::PTXTargetMachine(const Target &T,
     TLInfo(*this) {
 }
 
+void PTX32TargetMachine::anchor() { }
+
 PTX32TargetMachine::PTX32TargetMachine(const Target &T, StringRef TT,
                                        StringRef CPU, StringRef FS,
                                        const TargetOptions &Options,
@@ -93,6 +95,8 @@ PTX32TargetMachine::PTX32TargetMachine(const Target &T, StringRef TT,
   : PTXTargetMachine(T, TT, CPU, FS, Options, RM, CM, OL, false) {
 }
 
+void PTX64TargetMachine::anchor() { }
+
 PTX64TargetMachine::PTX64TargetMachine(const Target &T, StringRef TT,
                                        StringRef CPU, StringRef FS,
                                        const TargetOptions &Options,
index 22911f76a104a173b451f9208416625644bc3dfe..b051348781c01c5bfe7fb20f70bce445a7dcc23c 100644 (file)
@@ -91,6 +91,7 @@ class PTXTargetMachine : public LLVMTargetMachine {
 
 
 class PTX32TargetMachine : public PTXTargetMachine {
+  virtual void anchor();
 public:
 
   PTX32TargetMachine(const Target &T, StringRef TT,
@@ -100,6 +101,7 @@ public:
 }; // class PTX32TargetMachine
 
 class PTX64TargetMachine : public PTXTargetMachine {
+  virtual void anchor();
 public:
 
   PTX64TargetMachine(const Target &T, StringRef TT,
index e9424d8415f641c9ca3b457e0077547341e610dc..94465d7205d4e5889a688954f45a819a2292300d 100644 (file)
@@ -14,6 +14,8 @@
 #include "PPCMCAsmInfo.h"
 using namespace llvm;
 
+void PPCMCAsmInfoDarwin::anchor() { }
+
 PPCMCAsmInfoDarwin::PPCMCAsmInfoDarwin(bool is64Bit) {
   if (is64Bit)
     PointerSize = 8;
@@ -30,6 +32,8 @@ PPCMCAsmInfoDarwin::PPCMCAsmInfoDarwin(bool is64Bit) {
   SupportsDebugInformation= true; // Debug information.
 }
 
+void PPCLinuxMCAsmInfo::anchor() { }
+
 PPCLinuxMCAsmInfo::PPCLinuxMCAsmInfo(bool is64Bit) {
   if (is64Bit)
     PointerSize = 8;
index 96ae6fbba0e4328a7aab4653506a76a05a97dd70..cf11cbc8bd1d6799a76339a31b74c42939e441c4 100644 (file)
 
 namespace llvm {
 
-  struct PPCMCAsmInfoDarwin : public MCAsmInfoDarwin {
+  class PPCMCAsmInfoDarwin : public MCAsmInfoDarwin {
+    virtual void anchor();
+  public:
     explicit PPCMCAsmInfoDarwin(bool is64Bit);
   };
 
-  struct PPCLinuxMCAsmInfo : public MCAsmInfo {
+  class PPCLinuxMCAsmInfo : public MCAsmInfo {
+    virtual void anchor();
+  public:
     explicit PPCLinuxMCAsmInfo(bool is64Bit);
   };
 
diff --git a/lib/Target/PowerPC/PPCMachineFunctionInfo.cpp b/lib/Target/PowerPC/PPCMachineFunctionInfo.cpp
new file mode 100644 (file)
index 0000000..238e4d1
--- /dev/null
@@ -0,0 +1,15 @@
+//=-- PPCMachineFunctionInfo.cpp - Private data used for PowerPC --*- C++ -*-=//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#include "PPCMachineFunctionInfo.h"
+
+using namespace llvm;
+
+void PPCFunctionInfo::anchor() { }
+
index e2649c8b380f0de1d1a70238b73e0fb06e1e5bfc..24caffa3f0f28afee82042a3eb0a8b33a6f4f005 100644 (file)
@@ -21,7 +21,8 @@ namespace llvm {
 /// PPCFunctionInfo - This class is derived from MachineFunction private
 /// PowerPC target-specific information for each MachineFunction.
 class PPCFunctionInfo : public MachineFunctionInfo {
-private:
+  virtual void anchor();
+
   /// FramePointerSaveIndex - Frame index of where the old frame pointer is
   /// stored.  Also used as an anchor for instructions that need to be altered
   /// when using frame pointers (dyna_add, dyna_sub.)
index 8e71c46717663bf0b39817c93ae3fbd18ae564d1..919ada7e9581e4ba340ce25fd46c25b4aaf9d7a1 100644 (file)
@@ -44,6 +44,8 @@ PPCTargetMachine::PPCTargetMachine(const Target &T, StringRef TT,
 /// groups, which typically degrades performance.
 bool PPCTargetMachine::getEnableTailMergeDefault() const { return false; }
 
+void PPC32TargetMachine::anchor() { }
+
 PPC32TargetMachine::PPC32TargetMachine(const Target &T, StringRef TT, 
                                        StringRef CPU, StringRef FS,
                                        const TargetOptions &Options,
@@ -52,6 +54,7 @@ PPC32TargetMachine::PPC32TargetMachine(const Target &T, StringRef TT,
   : PPCTargetMachine(T, TT, CPU, FS, Options, RM, CM, OL, false) {
 }
 
+void PPC64TargetMachine::anchor() { }
 
 PPC64TargetMachine::PPC64TargetMachine(const Target &T, StringRef TT, 
                                        StringRef CPU,  StringRef FS,
index 042787659d98746400748edf4a03e3d6060e0e2e..560de522c845afc6afaccade322f3f995bb8a189 100644 (file)
@@ -77,6 +77,7 @@ public:
 /// PPC32TargetMachine - PowerPC 32-bit target machine.
 ///
 class PPC32TargetMachine : public PPCTargetMachine {
+  virtual void anchor();
 public:
   PPC32TargetMachine(const Target &T, StringRef TT,
                      StringRef CPU, StringRef FS, const TargetOptions &Options,
@@ -87,6 +88,7 @@ public:
 /// PPC64TargetMachine - PowerPC 64-bit target machine.
 ///
 class PPC64TargetMachine : public PPCTargetMachine {
+  virtual void anchor();
 public:
   PPC64TargetMachine(const Target &T, StringRef TT,
                      StringRef CPU, StringRef FS, const TargetOptions &Options,
index 6a7e0902354ebff955541e69e989025ecb36885d..f5e10fc3a465ec61bb3746b462d3c120ef2d98aa 100644 (file)
@@ -16,6 +16,8 @@
 
 using namespace llvm;
 
+void SparcELFMCAsmInfo::anchor() { }
+
 SparcELFMCAsmInfo::SparcELFMCAsmInfo(const Target &T, StringRef TT) {
   IsLittleEndian = false;
   Triple TheTriple(TT);
index 0cb6827d27719ff33a425c077983b6140112d2ab..9335923c2cef927629dbd755c9fa147a7faec91a 100644 (file)
@@ -20,7 +20,9 @@
 namespace llvm {
   class Target;
 
-  struct SparcELFMCAsmInfo : public MCAsmInfo {
+  class SparcELFMCAsmInfo : public MCAsmInfo {
+    virtual void anchor();
+  public:
     explicit SparcELFMCAsmInfo(const Target &T, StringRef TT);
   };
 
diff --git a/lib/Target/Sparc/SparcMachineFunctionInfo.cpp b/lib/Target/Sparc/SparcMachineFunctionInfo.cpp
new file mode 100644 (file)
index 0000000..efc37a3
--- /dev/null
@@ -0,0 +1,14 @@
+//==- SparcMachineFunctionInfo.cpp - Sparc Machine Function Info -*- C++ -*-==//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#include "SparcMachineFunctionInfo.h"
+
+using namespace llvm;
+
+void SparcMachineFunctionInfo::anchor() { }
index 0b74308eb0ee301411034a42ce15f91f01064460..90c27a4459a11ed2554dece962675dd503c207dc 100644 (file)
@@ -18,6 +18,7 @@
 namespace llvm {
 
   class SparcMachineFunctionInfo : public MachineFunctionInfo {
+    virtual void anchor();
   private:
     unsigned GlobalBaseReg;
 
index 6c501cff6a3ababd48215ab6c9625220720df910..7ffd4da3184deecf19d7c62fcdcb1306e0d35925 100644 (file)
@@ -21,6 +21,8 @@
 
 using namespace llvm;
 
+void SparcSubtarget::anchor() { }
+
 SparcSubtarget::SparcSubtarget(const std::string &TT, const std::string &CPU,
                                const std::string &FS,  bool is64Bit) :
   SparcGenSubtargetInfo(TT, CPU, FS),
index 00a04c3bea57e62942a7257429baaa3b7f3559a8..2846447723b49a3a50cd9a98c10bc42dadde726d 100644 (file)
@@ -24,6 +24,7 @@ namespace llvm {
 class StringRef;
 
 class SparcSubtarget : public SparcGenSubtargetInfo {
+  virtual void anchor();
   bool IsV9;
   bool V8DeprecatedInsts;
   bool IsVIS;
index 8e16fd7948a3ad23554ded3a31cb0951bef74f78..cfb23438bd47147b4bd4473a602982bd1b67e2f8 100644 (file)
@@ -51,6 +51,8 @@ bool SparcTargetMachine::addPreEmitPass(PassManagerBase &PM){
   return true;
 }
 
+void SparcV8TargetMachine::anchor() { }
+
 SparcV8TargetMachine::SparcV8TargetMachine(const Target &T,
                                            StringRef TT, StringRef CPU,
                                            StringRef FS,
@@ -61,6 +63,8 @@ SparcV8TargetMachine::SparcV8TargetMachine(const Target &T,
   : SparcTargetMachine(T, TT, CPU, FS, Options, RM, CM, OL, false) {
 }
 
+void SparcV9TargetMachine::anchor() { }
+
 SparcV9TargetMachine::SparcV9TargetMachine(const Target &T, 
                                            StringRef TT,  StringRef CPU,
                                            StringRef FS,
index cedc1e33de1cfeba2ba4d0be79f44a4c6e3e555b..62843459c4fe2a75ccfa32e319e27147ae1a1673 100644 (file)
@@ -62,6 +62,7 @@ public:
 /// SparcV8TargetMachine - Sparc 32-bit target machine
 ///
 class SparcV8TargetMachine : public SparcTargetMachine {
+  virtual void anchor();
 public:
   SparcV8TargetMachine(const Target &T, StringRef TT,
                        StringRef CPU, StringRef FS,
@@ -73,6 +74,7 @@ public:
 /// SparcV9TargetMachine - Sparc 64-bit target machine
 ///
 class SparcV9TargetMachine : public SparcTargetMachine {
+  virtual void anchor();
 public:
   SparcV9TargetMachine(const Target &T, StringRef TT,
                        StringRef CPU, StringRef FS,
diff --git a/lib/Target/TargetJITInfo.cpp b/lib/Target/TargetJITInfo.cpp
new file mode 100644 (file)
index 0000000..aafedf8
--- /dev/null
@@ -0,0 +1,14 @@
+//===- Target/TargetJITInfo.h - Target Information for JIT ------*- C++ -*-===//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#include "llvm/Target/TargetJITInfo.h"
+
+using namespace llvm;
+
+void TargetJITInfo::anchor() { }
index 768facb56a6643fa21233686275a97fb90e845bc..2119c4ee3a2ae5aa3c391b04712735c8882d8d30 100644 (file)
@@ -20,6 +20,8 @@ INITIALIZE_PASS(TargetLibraryInfo, "targetlibinfo",
                 "Target Library Information", false, true)
 char TargetLibraryInfo::ID = 0;
 
+void TargetLibraryInfo::anchor() { }
+
 const char* TargetLibraryInfo::StandardNames[LibFunc::NumLibFuncs] =
   {
     "acos",
index 26898373222b94bc6f40bdc3b05aa1f3dee6da2c..ad663199e50e71e5983052fcd8ce383713428d95 100644 (file)
@@ -18,6 +18,8 @@
 
 using namespace llvm;
 
+void TargetRegisterClass::anchor() { }
+
 TargetRegisterInfo::TargetRegisterInfo(const TargetRegisterInfoDesc *ID,
                              regclass_iterator RCB, regclass_iterator RCE,
                              const char *const *subregindexnames)
index 3aacb20e73df670a1623320ea33a0a1f24ea5da2..5b7316e73d052117794312030a7cbf0034d4c733 100644 (file)
@@ -79,6 +79,12 @@ EDInstInfo *X86GenericDisassembler::getEDInfo() const {
   return instInfoX86;
 }
 
+void X86_16Disassembler::anchor() { }
+
+void X86_32Disassembler::anchor() { }
+
+void X86_64Disassembler::anchor() { }
+
 /// regionReader - a callback function that wraps the readByte method from
 ///   MemoryObject.
 ///
index 6ac9a0ff1019a5a9a10dd627b87622941da3d625..d99236b16b65917be15cffe55bb771665d473121 100644 (file)
@@ -128,6 +128,7 @@ private:
 
 /// X86_16Disassembler - 16-bit X86 disassembler.
 class X86_16Disassembler : public X86GenericDisassembler {
+  virtual void anchor();
 public:
   X86_16Disassembler(const MCSubtargetInfo &STI) :
     X86GenericDisassembler(STI, MODE_16BIT) {
@@ -136,6 +137,7 @@ public:
 
 /// X86_16Disassembler - 32-bit X86 disassembler.
 class X86_32Disassembler : public X86GenericDisassembler {
+  virtual void anchor();
 public:
   X86_32Disassembler(const MCSubtargetInfo &STI) :
     X86GenericDisassembler(STI, MODE_32BIT) {
@@ -144,6 +146,7 @@ public:
 
 /// X86_16Disassembler - 64-bit X86 disassembler.
 class X86_64Disassembler : public X86GenericDisassembler {
+  virtual void anchor();
 public:
   X86_64Disassembler(const MCSubtargetInfo &STI) :
     X86GenericDisassembler(STI, MODE_64BIT) {
index eb64ad112bc438147b89f0e473f629962a7a56ce..003a14ab2152d5ece267b3ff9cc576d19d37a2fa 100644 (file)
@@ -48,6 +48,8 @@ static const char *const x86_asm_table[] = {
   "{cc}", "cc",
   0,0};
 
+void X86MCAsmInfoDarwin::anchor() { }
+
 X86MCAsmInfoDarwin::X86MCAsmInfoDarwin(const Triple &T) {
   bool is64Bit = T.getArch() == Triple::x86_64;
   if (is64Bit)
@@ -80,6 +82,8 @@ X86_64MCAsmInfoDarwin::X86_64MCAsmInfoDarwin(const Triple &Triple)
   : X86MCAsmInfoDarwin(Triple) {
 }
 
+void X86ELFMCAsmInfo::anchor() { }
+
 X86ELFMCAsmInfo::X86ELFMCAsmInfo(const Triple &T) {
   if (T.getArch() == Triple::x86_64)
     PointerSize = 8;
@@ -125,6 +129,8 @@ getNonexecutableStackSection(MCContext &Ctx) const {
                            0, SectionKind::getMetadata());
 }
 
+void X86MCAsmInfoMicrosoft::anchor() { }
+
 X86MCAsmInfoMicrosoft::X86MCAsmInfoMicrosoft(const Triple &Triple) {
   if (Triple.getArch() == Triple::x86_64) {
     GlobalPrefix = "";
@@ -137,6 +143,8 @@ X86MCAsmInfoMicrosoft::X86MCAsmInfoMicrosoft(const Triple &Triple) {
   TextAlignFillValue = 0x90;
 }
 
+void X86MCAsmInfoGNUCOFF::anchor() { }
+
 X86MCAsmInfoGNUCOFF::X86MCAsmInfoGNUCOFF(const Triple &Triple) {
   if (Triple.getArch() == Triple::x86_64) {
     GlobalPrefix = "";
index 5d619e8b17b43e9725b322870cd0397550919a5c..57019c7e7ce963e22723a285b6a2d93b2dc30d14 100644 (file)
@@ -21,7 +21,9 @@
 namespace llvm {
   class Triple;
 
-  struct X86MCAsmInfoDarwin : public MCAsmInfoDarwin {
+  class X86MCAsmInfoDarwin : public MCAsmInfoDarwin {
+    virtual void anchor();
+  public:
     explicit X86MCAsmInfoDarwin(const Triple &Triple);
   };
 
@@ -33,16 +35,22 @@ namespace llvm {
                                 MCStreamer &Streamer) const;
   };
 
-  struct X86ELFMCAsmInfo : public MCAsmInfo {
+  class X86ELFMCAsmInfo : public MCAsmInfo {
+    virtual void anchor();
+  public:
     explicit X86ELFMCAsmInfo(const Triple &Triple);
     virtual const MCSection *getNonexecutableStackSection(MCContext &Ctx) const;
   };
 
-  struct X86MCAsmInfoMicrosoft : public MCAsmInfoMicrosoft {
+  class X86MCAsmInfoMicrosoft : public MCAsmInfoMicrosoft {
+    virtual void anchor();
+  public:
     explicit X86MCAsmInfoMicrosoft(const Triple &Triple);
   };
 
-  struct X86MCAsmInfoGNUCOFF : public MCAsmInfoGNUCOFF {
+  class X86MCAsmInfoGNUCOFF : public MCAsmInfoGNUCOFF {
+    virtual void anchor();
+  public:
     explicit X86MCAsmInfoGNUCOFF(const Triple &Triple);
   };
 } // namespace llvm
diff --git a/lib/Target/X86/X86MachineFunctionInfo.cpp b/lib/Target/X86/X86MachineFunctionInfo.cpp
new file mode 100644 (file)
index 0000000..de88489
--- /dev/null
@@ -0,0 +1,14 @@
+//====- X86MachineFuctionInfo.cpp - X86 machine function info ---*- C++ -*-===//
+// 
+//                     The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+// 
+//===----------------------------------------------------------------------===//
+
+#include "X86MachineFunctionInfo.h"
+
+using namespace llvm;
+
+void X86MachineFunctionInfo::anchor() { }
index b0bb313ec6396064e153a9fcf12e6299e8d6fd99..b73f67d14b050981d38a12db9ca1cf11d657f30f 100644 (file)
@@ -21,6 +21,8 @@ namespace llvm {
 /// X86MachineFunctionInfo - This class is derived from MachineFunction and
 /// contains private X86 target-specific information for each MachineFunction.
 class X86MachineFunctionInfo : public MachineFunctionInfo {
+  virtual void anchor();
+
   /// ForceFramePointer - True if the function is required to use of frame
   /// pointer for reasons other than it containing dynamic allocation or 
   /// that FP eliminatation is turned off. For example, Cygwin main function
index 126042eeae42efb5be535b96dea9f6303f8e2e0d..399d8e9efe3caa2cac432520b0fc1566e859382a 100644 (file)
@@ -28,6 +28,7 @@ extern "C" void LLVMInitializeX86Target() {
   RegisterTargetMachine<X86_64TargetMachine> Y(TheX86_64Target);
 }
 
+void X86_32TargetMachine::anchor() { }
 
 X86_32TargetMachine::X86_32TargetMachine(const Target &T, StringRef TT,
                                          StringRef CPU, StringRef FS,
@@ -50,6 +51,7 @@ X86_32TargetMachine::X86_32TargetMachine(const Target &T, StringRef TT,
     JITInfo(*this) {
 }
 
+void X86_64TargetMachine::anchor() { }
 
 X86_64TargetMachine::X86_64TargetMachine(const Target &T, StringRef TT,
                                          StringRef CPU, StringRef FS,
index 3ac176937a3c318f7b240ce30cae7f0a4e96f82b..16092b8e5aa25bb5dcf7b5169915bbd620ea04a0 100644 (file)
@@ -78,6 +78,7 @@ public:
 /// X86_32TargetMachine - X86 32-bit target machine.
 ///
 class X86_32TargetMachine : public X86TargetMachine {
+  virtual void anchor();
   const TargetData  DataLayout; // Calculates type size & alignment
   X86InstrInfo      InstrInfo;
   X86SelectionDAGInfo TSInfo;
@@ -106,6 +107,7 @@ public:
 /// X86_64TargetMachine - X86 64-bit target machine.
 ///
 class X86_64TargetMachine : public X86TargetMachine {
+  virtual void anchor();
   const TargetData  DataLayout; // Calculates type size & alignment
   X86InstrInfo      InstrInfo;
   X86SelectionDAGInfo TSInfo;
index 42ab1b31d57a76cad6f0c026eec17ccf8018a58e..64f1a8e19b32a3d577d806224216c1152bded2b5 100644 (file)
@@ -10,6 +10,8 @@
 #include "XCoreMCAsmInfo.h"
 using namespace llvm;
 
+void XCoreMCAsmInfo::anchor() { }
+
 XCoreMCAsmInfo::XCoreMCAsmInfo(const Target &T, StringRef TT) {
   SupportsDebugInformation = true;
   Data16bitsDirective = "\t.short\t";
index 840392263881bf5210ea8c451101150617bc9bf0..f9e0290bbda7a1379ad4bb0c7ddd0c620fae4aed 100644 (file)
@@ -21,6 +21,7 @@ namespace llvm {
   class Target;
 
   class XCoreMCAsmInfo : public MCAsmInfo {
+    virtual void anchor();
   public:
     explicit XCoreMCAsmInfo(const Target &T, StringRef TT);
   };
diff --git a/lib/Target/XCore/XCoreMachineFunctionInfo.cpp b/lib/Target/XCore/XCoreMachineFunctionInfo.cpp
new file mode 100644 (file)
index 0000000..e782bbe
--- /dev/null
@@ -0,0 +1,14 @@
+//===- XCoreMachineFuctionInfo.cpp - XCore machine function info -*- C++ -*-==//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#include "XCoreMachineFunctionInfo.h"
+
+using namespace llvm;
+
+void XCoreFunctionInfo::anchor() { }
index a575a0f695414c482056739d58cc6f386b0784c1..d2ef9b728645119f0ae9d95493dbb3bcc35d66e5 100644 (file)
@@ -26,7 +26,7 @@ class Function;
 /// XCoreFunctionInfo - This class is derived from MachineFunction private
 /// XCore target-specific information for each MachineFunction.
 class XCoreFunctionInfo : public MachineFunctionInfo {
-private:
+  virtual void anchor();
   bool UsesLR;
   int LRSpillSlot;
   int FPSpillSlot;
index b4e9927104196b614c7132be187ad3b37bce90d4..78a146989826c74e4689d81a62d6941e18d8d0e0 100644 (file)
@@ -21,6 +21,8 @@
 
 using namespace llvm;
 
+void XCoreSubtarget::anchor() { }
+
 XCoreSubtarget::XCoreSubtarget(const std::string &TT,
                                const std::string &CPU, const std::string &FS)
   : XCoreGenSubtargetInfo(TT, CPU, FS)
index 7b29fa2367106d5451cf3bb259809c8fae32a483..2175e5a7ce82b5671580f60198006dfd146ebc50 100644 (file)
@@ -25,6 +25,7 @@ namespace llvm {
 class StringRef;
 
 class XCoreSubtarget : public XCoreGenSubtargetInfo {
+  virtual void anchor();
 
 public:
   /// This constructor initializes the data members to match that
index 6732a789d5f1a93c9f047b161feee58b82eff277..20eef3c0dca166452d143200057608c8bd800c0c 100644 (file)
@@ -375,6 +375,8 @@ void SimplifyIndvar::simplifyUsers(PHINode *CurrIV, IVVisitor *V) {
 
 namespace llvm {
 
+void IVVisitor::anchor() { }
+
 /// simplifyUsersOfIV - Simplify instructions that use this induction variable
 /// by using ScalarEvolution to analyze the IV's recurrence.
 bool simplifyUsersOfIV(PHINode *CurrIV, ScalarEvolution *SE, LPPassManager *LPM,
index f17f9a26ca0c8a531100c2fce3cb1c8921df425d..ba8c31b44a121956c56456348ceffff64c4f788f 100644 (file)
@@ -40,6 +40,8 @@ using namespace llvm;
 //                              Constant Class
 //===----------------------------------------------------------------------===//
 
+void Constant::anchor() { }
+
 bool Constant::isNegativeZeroValue() const {
   // Floating point values have an explicit -0.0 value.
   if (const ConstantFP *CFP = dyn_cast<ConstantFP>(this))
@@ -363,6 +365,8 @@ void Constant::removeDeadConstantUsers() const {
 //                                ConstantInt
 //===----------------------------------------------------------------------===//
 
+void ConstantInt::anchor() { }
+
 ConstantInt::ConstantInt(IntegerType *Ty, const APInt& V)
   : Constant(Ty, ConstantIntVal, 0, 0), Val(V) {
   assert(V.getBitWidth() == Ty->getBitWidth() && "Invalid constant for type");
@@ -486,6 +490,8 @@ static const fltSemantics *TypeToFloatSemantics(Type *Ty) {
   return &APFloat::PPCDoubleDouble;
 }
 
+void ConstantFP::anchor() { }
+
 /// get() - This returns a constant fp for the specified value in the
 /// specified type.  This should only be used for simple constant values like
 /// 2.0/1.0 etc, that are known-valid both as double and as the target format.
index 1077004d7c765d5fb5e253131808b447626f0ac4..cfcdf134ab84078ad3532c30c3eccf896714f30c 100644 (file)
@@ -30,6 +30,7 @@ struct ConstantTraits;
 /// UnaryConstantExpr - This class is private to Constants.cpp, and is used
 /// behind the scenes to implement unary constant exprs.
 class UnaryConstantExpr : public ConstantExpr {
+  virtual void anchor();
   void *operator new(size_t, unsigned);  // DO NOT IMPLEMENT
 public:
   // allocate space for exactly one operand
@@ -46,6 +47,7 @@ public:
 /// BinaryConstantExpr - This class is private to Constants.cpp, and is used
 /// behind the scenes to implement binary constant exprs.
 class BinaryConstantExpr : public ConstantExpr {
+  virtual void anchor();
   void *operator new(size_t, unsigned);  // DO NOT IMPLEMENT
 public:
   // allocate space for exactly two operands
@@ -66,6 +68,7 @@ public:
 /// SelectConstantExpr - This class is private to Constants.cpp, and is used
 /// behind the scenes to implement select constant exprs.
 class SelectConstantExpr : public ConstantExpr {
+  virtual void anchor();
   void *operator new(size_t, unsigned);  // DO NOT IMPLEMENT
 public:
   // allocate space for exactly three operands
@@ -86,6 +89,7 @@ public:
 /// Constants.cpp, and is used behind the scenes to implement
 /// extractelement constant exprs.
 class ExtractElementConstantExpr : public ConstantExpr {
+  virtual void anchor();
   void *operator new(size_t, unsigned);  // DO NOT IMPLEMENT
 public:
   // allocate space for exactly two operands
@@ -106,6 +110,7 @@ public:
 /// Constants.cpp, and is used behind the scenes to implement
 /// insertelement constant exprs.
 class InsertElementConstantExpr : public ConstantExpr {
+  virtual void anchor();
   void *operator new(size_t, unsigned);  // DO NOT IMPLEMENT
 public:
   // allocate space for exactly three operands
@@ -127,6 +132,7 @@ public:
 /// Constants.cpp, and is used behind the scenes to implement
 /// shufflevector constant exprs.
 class ShuffleVectorConstantExpr : public ConstantExpr {
+  virtual void anchor();
   void *operator new(size_t, unsigned);  // DO NOT IMPLEMENT
 public:
   // allocate space for exactly three operands
@@ -151,6 +157,7 @@ public:
 /// Constants.cpp, and is used behind the scenes to implement
 /// extractvalue constant exprs.
 class ExtractValueConstantExpr : public ConstantExpr {
+  virtual void anchor();
   void *operator new(size_t, unsigned);  // DO NOT IMPLEMENT
 public:
   // allocate space for exactly one operand
@@ -176,6 +183,7 @@ public:
 /// Constants.cpp, and is used behind the scenes to implement
 /// insertvalue constant exprs.
 class InsertValueConstantExpr : public ConstantExpr {
+  virtual void anchor();
   void *operator new(size_t, unsigned);  // DO NOT IMPLEMENT
 public:
   // allocate space for exactly one operand
@@ -202,6 +210,7 @@ public:
 /// GetElementPtrConstantExpr - This class is private to Constants.cpp, and is
 /// used behind the scenes to implement getelementpr constant exprs.
 class GetElementPtrConstantExpr : public ConstantExpr {
+  virtual void anchor();
   GetElementPtrConstantExpr(Constant *C, const std::vector<Constant*> &IdxList,
                             Type *DestTy);
 public:
@@ -221,8 +230,10 @@ public:
 // CompareConstantExpr - This class is private to Constants.cpp, and is used
 // behind the scenes to implement ICmp and FCmp constant expressions. This is
 // needed in order to store the predicate value for these instructions.
-struct CompareConstantExpr : public ConstantExpr {
+class CompareConstantExpr : public ConstantExpr {
+  virtual void anchor();
   void *operator new(size_t, unsigned);  // DO NOT IMPLEMENT
+public:
   // allocate space for exactly two operands
   void *operator new(size_t s) {
     return User::operator new(s, 2);
index bb8f62ac295346ab440f2679201a4b561c219cae..8238f632152e84542d477309011b99985b210abf 100644 (file)
@@ -39,6 +39,8 @@ template class llvm::SymbolTableListTraits<BasicBlock, Function>;
 // Argument Implementation
 //===----------------------------------------------------------------------===//
 
+void Argument::anchor() { }
+
 Argument::Argument(Type *Ty, const Twine &Name, Function *Par)
   : Value(Ty, Value::ArgumentVal) {
   Parent = 0;
index 252b34033b279b32400019fc742c1f47f13c6f48..b0dd680926d75517d80802ad63e0c3949559e299 100644 (file)
@@ -93,3 +93,24 @@ LLVMContextImpl::~LLVMContextImpl() {
   // Destroy MDStrings.
   DeleteContainerSeconds(MDStringCache);
 }
+
+// ConstantsContext anchors
+void UnaryConstantExpr::anchor() { }
+
+void BinaryConstantExpr::anchor() { }
+
+void SelectConstantExpr::anchor() { }
+
+void ExtractElementConstantExpr::anchor() { }
+
+void InsertElementConstantExpr::anchor() { }
+
+void ShuffleVectorConstantExpr::anchor() { }
+
+void ExtractValueConstantExpr::anchor() { }
+
+void InsertValueConstantExpr::anchor() { }
+
+void GetElementPtrConstantExpr::anchor() { }
+
+void CompareConstantExpr::anchor() { }
index 8debd7cdb73a40684148163dccd4c3ad297df20a..99664334962a011f1947c014cbd89d687225de4b 100644 (file)
@@ -29,6 +29,8 @@ using namespace llvm;
 // MDString implementation.
 //
 
+void MDString::anchor() { }
+
 MDString::MDString(LLVMContext &C, StringRef S)
   : Value(Type::getMetadataTy(C), Value::MDStringVal), Str(S) {}
 
index 1aaf765ca4718f503a29d46325da6fc1cc65cb35..88c4186e36293fb434f4bc0e3dfaaa15b13d1c5e 100644 (file)
@@ -223,6 +223,7 @@ namespace llvm {
 class FunctionPassManagerImpl : public Pass,
                                 public PMDataManager,
                                 public PMTopLevelManager {
+  virtual void anchor();
 private:
   bool wasRun;
 public:
@@ -291,6 +292,8 @@ public:
   }
 };
 
+void FunctionPassManagerImpl::anchor() {}
+
 char FunctionPassManagerImpl::ID = 0;
 
 //===----------------------------------------------------------------------===//
@@ -384,6 +387,7 @@ char MPPassManager::ID = 0;
 class PassManagerImpl : public Pass,
                         public PMDataManager,
                         public PMTopLevelManager {
+  virtual void anchor();
 
 public:
   static char ID;
@@ -437,6 +441,8 @@ public:
   }
 };
 
+void PassManagerImpl::anchor() {}
+
 char PassManagerImpl::ID = 0;
 } // End of llvm namespace
 
index a0aaf5362b8c5cd27b9a1ab7b7ee3510a2a6cdfd..cdb100b8d5cd8debfe03c636b81f041f45758523 100644 (file)
@@ -169,7 +169,7 @@ ReduceCrashingGlobalVariables::TestGlobalVariables(
   return false;
 }
 
-namespace llvm {
+namespace {
   /// ReduceCrashingFunctions reducer - This works by removing functions and
   /// seeing if the program still crashes. If it does, then keep the newer,
   /// smaller program.
index c2d3720660728c4f519b19f0218a0341ff5b84be..b80a5b437328b28dd6f5805555d280a27bcae554 100644 (file)
@@ -234,6 +234,8 @@ int LLI::ExecuteProgram(const std::string &Bitcode,
       Timeout, MemoryLimit, Error);
 }
 
+void AbstractInterpreter::anchor() { }
+
 // LLI create method - Try to find the LLI executable
 AbstractInterpreter *AbstractInterpreter::createLLI(const char *Argv0,
                                                     std::string &Message,
index cfa8acf6b24043ba74f573e66211e4d7d85b3365..7b93394fd8ca009d5cbc1c6de73503f4e702aa36 100644 (file)
@@ -86,6 +86,7 @@ public:
 /// complexity behind a simple interface.
 ///
 class AbstractInterpreter {
+  virtual void anchor();
 public:
   static CBE *createCBE(const char *Argv0, std::string &Message,
                         const std::string              &GCCBinary,
index d9e181470e043c475471486d2afc9d20a015919e..05280392a47fce16c2458f0a8db23cc92214fe1b 100644 (file)
@@ -44,6 +44,8 @@ static void ComputeNumbering(Function *F, DenseMap<Value*,unsigned> &Numbering){
 }
 
 
+void Consumer::anchor() { }
+
 void DiffConsumer::printValue(Value *V, bool isL) {
   if (V->hasName()) {
     out << (isa<GlobalValue>(V) ? '@' : '%') << V->getName();
index b95d42713a643c5d818f8e21b0f1cb934905d53e..2060fe1c944f6b03c3c3436d5bac9b91fe4b7d5b 100644 (file)
@@ -29,6 +29,7 @@ namespace llvm {
 
   /// The interface for consumers of difference data.
   class Consumer {
+    virtual void anchor();
   public:
     /// Record that a local context has been entered.  Left and
     /// Right are IR "containers" of some sort which are being
index 435cd87fa7614bd90ac1ddec80ca8c0542a4fd30..e827b23a73253519d7c41daf8aaf38ee34cc6590 100644 (file)
@@ -628,6 +628,8 @@ void FunctionDifferenceEngine::runBlockDiff(BasicBlock::iterator LStart,
 
 }
 
+void DifferenceEngine::Oracle::anchor() { }
+
 void DifferenceEngine::diff(Function *L, Function *R) {
   Context C(*this, L, R);
 
index 5b4f80b99e55760c0cc539b2d5043ec35f2f8493..7ea79e430ff55dc240338616a3845a6e2bfdcead 100644 (file)
@@ -50,7 +50,9 @@ namespace llvm {
 
     /// An oracle for answering whether two values are equivalent as
     /// operands.
-    struct Oracle {
+    class Oracle {
+      virtual void anchor();
+    public:
       virtual bool operator()(Value *L, Value *R) = 0;
 
     protected:
index bcfecb36e8730da6e9b5eedbeb82dc5db3d0a036..fded8a1f35600aea6f8dea60aafb5e4505bb8429 100644 (file)
@@ -126,6 +126,8 @@ static const Target *GetTarget(const ObjectFile *Obj = NULL) {
   return 0;
 }
 
+void llvm::StringRefMemoryObject::anchor() { }
+
 void llvm::DumpBytes(StringRef bytes) {
   static const char hex_rep[] = "0123456789abcdef";
   // FIXME: The real way to do this is to figure out the longest instruction
index 75f852afbc7edda5172f1cc3c13a1952685b0d7f..aa71b77c8abf653efb05c236a5746801a7b3b6ca 100644 (file)
@@ -25,7 +25,7 @@ void DumpBytes(StringRef bytes);
 void DisassembleInputMachO(StringRef Filename);
 
 class StringRefMemoryObject : public MemoryObject {
-private:
+  virtual void anchor();
   StringRef Bytes;
 public:
   StringRefMemoryObject(StringRef bytes) : Bytes(bytes) {}
index 5d635ae361e05cea587d3b9adef9fd7afa37834b..b15de9ed38399e56d2ecb3c215e206862ece4c56 100644 (file)
@@ -19,6 +19,7 @@
 
 using namespace llvm;
 
+namespace {
 class IRBuilderTest : public testing::Test {
 protected:
   virtual void SetUp() {
@@ -37,6 +38,7 @@ protected:
   OwningPtr<Module> M;
   BasicBlock *BB;
 };
+}
 
 TEST_F(IRBuilderTest, Lifetime) {
   IRBuilder<> Builder(BB);
index 1b858695b1d30deda08e9504385d725e08d519a2..4243b2d39de7a229a7272798729adf6c09613faf 100644 (file)
@@ -17,6 +17,7 @@
 
 using namespace llvm;
 
+namespace {
 class CloneInstruction : public ::testing::Test {
 protected:
   virtual void SetUp() {
@@ -47,6 +48,7 @@ protected:
   LLVMContext context;
   Value *V;
 };
+}
 
 TEST_F(CloneInstruction, OverflowBits) {
   V = new Argument(Type::getInt32Ty(context));
index 1367e8dd6e86dcfbff1c500d865b8060518fe70b..bd77907a9bd907c3319dcc7c8f37ac83e7178e88 100644 (file)
@@ -15,6 +15,8 @@
 #include "llvm/ADT/StringExtras.h"
 using namespace llvm;
 
+void Matcher::anchor() { }
+
 void Matcher::dump() const {
   print(errs(), 0);
 }
@@ -324,6 +326,10 @@ unsigned EmitNodeMatcherCommon::getHashImpl() const {
 }
 
 
+void EmitNodeMatcher::anchor() { }
+
+void MorphNodeToMatcher::anchor() { }
+
 unsigned MarkGlueResultsMatcher::getHashImpl() const {
   return HashUnsigneds(GlueResultNodes.begin(), GlueResultNodes.end());
 }
index dcb8da71086eef0dbeb56de5b1b763c97db4a3a6..99ebf98b1e4bbceb8b2c0267fff2b26ef7a84796 100644 (file)
@@ -41,6 +41,7 @@ class Matcher {
   // The next matcher node that is executed after this one.  Null if this is the
   // last stage of a match.
   OwningPtr<Matcher> Next;
+  virtual void anchor();
 public:
   enum KindTy {
     // Matcher state manipulation.
@@ -1011,6 +1012,7 @@ private:
 
 /// EmitNodeMatcher - This signals a successful match and generates a node.
 class EmitNodeMatcher : public EmitNodeMatcherCommon {
+  virtual void anchor();
   unsigned FirstResultSlot;
 public:
   EmitNodeMatcher(const std::string &opcodeName,
@@ -1033,6 +1035,7 @@ public:
 };
 
 class MorphNodeToMatcher : public EmitNodeMatcherCommon {
+  virtual void anchor();
   const PatternToMatch &Pattern;
 public:
   MorphNodeToMatcher(const std::string &opcodeName,
index bef73f33effe089fed35cc689635cdc223bf0322..838b9246aad67ff13b30a69a4c30958e7e756419 100644 (file)
@@ -198,6 +198,10 @@ struct FieldExpander : public SetTheory::Expander {
 };
 } // end anonymous namespace
 
+void SetTheory::Operator::anchor() { }
+
+void SetTheory::Expander::anchor() { }
+
 SetTheory::SetTheory() {
   addOperator("add", new AddOp);
   addOperator("sub", new SubOp);
index 6e8313be07a309607a7847b9e322a14046500e64..b394058f4c35a6152bd40955fa5d5b7d10a611e4 100644 (file)
@@ -65,7 +65,9 @@ public:
   typedef SmallSetVector<Record*, 16> RecSet;
 
   /// Operator - A callback representing a DAG operator.
-  struct Operator {
+  class Operator {
+    virtual void anchor();
+  public:
     virtual ~Operator() {}
 
     /// apply - Apply this operator to Expr's arguments and insert the result
@@ -76,7 +78,9 @@ public:
   /// Expander - A callback function that can transform a Record representing a
   /// set into a fully expanded list of elements. Expanders provide a way for
   /// users to define named sets that can be used in DAG expressions.
-  struct Expander {
+  class Expander {
+    virtual void anchor();
+  public:
     virtual ~Expander() {}
 
     virtual void expand(SetTheory&, Record*, RecSet &Elts) =0;
index af0d9f44cf434aca1f4abdb56ca578f579dd82da..acb9985e499d3d207e66dfd1572feb9f4ba28bc7 100644 (file)
@@ -18,6 +18,9 @@
 #include <map>
 using namespace llvm;
 
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wweak-vtables"
+
 namespace llvm {
 
 class Type {
@@ -58,6 +61,8 @@ public:
   }
 };
 
+#pragma clang diagnostic pop
+
 static std::map<unsigned, const Type *>
   ExtendedIntegerTypeMap;
 static std::map<std::pair<uintptr_t, uintptr_t>, const Type *>
index 3899a410142940de151b05511d287b33d35a2680..2b1c89de8c1fcb2c4a2c942cac667f0256236cc1 100644 (file)
@@ -101,92 +101,92 @@ namespace {
 
   cl::opt<std::string>
   Class("class", cl::desc("Print Enum list for this class"),
-        cl::value_desc("class name"));
-}
-
-class LLVMTableGenAction : public TableGenAction {
-public:
-  bool operator()(raw_ostream &OS, RecordKeeper &Records) {
-    switch (Action) {
-    case PrintRecords:
-      OS << Records;           // No argument, dump all contents
-      break;
-    case GenEmitter:
-      CodeEmitterGen(Records).run(OS);
-      break;
-    case GenRegisterInfo:
-      RegisterInfoEmitter(Records).run(OS);
-      break;
-    case GenInstrInfo:
-      InstrInfoEmitter(Records).run(OS);
-      break;
-    case GenCallingConv:
-      CallingConvEmitter(Records).run(OS);
-      break;
-    case GenAsmWriter:
-      AsmWriterEmitter(Records).run(OS);
-      break;
-    case GenAsmMatcher:
-      AsmMatcherEmitter(Records).run(OS);
-      break;
-    case GenDisassembler:
-      DisassemblerEmitter(Records).run(OS);
-      break;
-    case GenPseudoLowering:
-      PseudoLoweringEmitter(Records).run(OS);
-      break;
-    case GenDAGISel:
-      DAGISelEmitter(Records).run(OS);
-      break;
-    case GenDFAPacketizer:
-      DFAGen(Records).run(OS);
-      break;
-    case GenFastISel:
-      FastISelEmitter(Records).run(OS);
-      break;
-    case GenSubtarget:
-      SubtargetEmitter(Records).run(OS);
-      break;
-    case GenIntrinsic:
-      IntrinsicEmitter(Records).run(OS);
-      break;
-    case GenTgtIntrinsic:
-      IntrinsicEmitter(Records, true).run(OS);
-      break;
-    case GenEDInfo:
-      EDEmitter(Records).run(OS);
-      break;
-    case PrintEnums:
-    {
-      std::vector<Record*> Recs = Records.getAllDerivedDefinitions(Class);
-      for (unsigned i = 0, e = Recs.size(); i != e; ++i)
-        OS << Recs[i]->getName() << ", ";
-      OS << "\n";
-      break;
-    }
-    case PrintSets:
-    {
-      SetTheory Sets;
-      Sets.addFieldExpander("Set", "Elements");
-      std::vector<Record*> Recs = Records.getAllDerivedDefinitions("Set");
-      for (unsigned i = 0, e = Recs.size(); i != e; ++i) {
-        OS << Recs[i]->getName() << " = [";
-        const std::vector<Record*> *Elts = Sets.expand(Recs[i]);
-        assert(Elts && "Couldn't expand Set instance");
-        for (unsigned ei = 0, ee = Elts->size(); ei != ee; ++ei)
-          OS << ' ' << (*Elts)[ei]->getName();
-        OS << " ]\n";
+          cl::value_desc("class name"));
+  
+  class LLVMTableGenAction : public TableGenAction {
+  public:
+    bool operator()(raw_ostream &OS, RecordKeeper &Records) {
+      switch (Action) {
+      case PrintRecords:
+        OS << Records;           // No argument, dump all contents
+        break;
+      case GenEmitter:
+        CodeEmitterGen(Records).run(OS);
+        break;
+      case GenRegisterInfo:
+        RegisterInfoEmitter(Records).run(OS);
+        break;
+      case GenInstrInfo:
+        InstrInfoEmitter(Records).run(OS);
+        break;
+      case GenCallingConv:
+        CallingConvEmitter(Records).run(OS);
+        break;
+      case GenAsmWriter:
+        AsmWriterEmitter(Records).run(OS);
+        break;
+      case GenAsmMatcher:
+        AsmMatcherEmitter(Records).run(OS);
+        break;
+      case GenDisassembler:
+        DisassemblerEmitter(Records).run(OS);
+        break;
+      case GenPseudoLowering:
+        PseudoLoweringEmitter(Records).run(OS);
+        break;
+      case GenDAGISel:
+        DAGISelEmitter(Records).run(OS);
+        break;
+      case GenDFAPacketizer:
+        DFAGen(Records).run(OS);
+        break;
+      case GenFastISel:
+        FastISelEmitter(Records).run(OS);
+        break;
+      case GenSubtarget:
+        SubtargetEmitter(Records).run(OS);
+        break;
+      case GenIntrinsic:
+        IntrinsicEmitter(Records).run(OS);
+        break;
+      case GenTgtIntrinsic:
+        IntrinsicEmitter(Records, true).run(OS);
+        break;
+      case GenEDInfo:
+        EDEmitter(Records).run(OS);
+        break;
+      case PrintEnums:
+      {
+        std::vector<Record*> Recs = Records.getAllDerivedDefinitions(Class);
+        for (unsigned i = 0, e = Recs.size(); i != e; ++i)
+          OS << Recs[i]->getName() << ", ";
+        OS << "\n";
+        break;
       }
-      break;
-    }
-    default:
-      assert(1 && "Invalid Action");
-      return true;
+      case PrintSets:
+      {
+        SetTheory Sets;
+        Sets.addFieldExpander("Set", "Elements");
+        std::vector<Record*> Recs = Records.getAllDerivedDefinitions("Set");
+        for (unsigned i = 0, e = Recs.size(); i != e; ++i) {
+          OS << Recs[i]->getName() << " = [";
+          const std::vector<Record*> *Elts = Sets.expand(Recs[i]);
+          assert(Elts && "Couldn't expand Set instance");
+          for (unsigned ei = 0, ee = Elts->size(); ei != ee; ++ei)
+            OS << ' ' << (*Elts)[ei]->getName();
+          OS << " ]\n";
+        }
+        break;
+      }
+      default:
+        assert(1 && "Invalid Action");
+        return true;
+      }
+  
+      return false;
     }
-
-    return false;
-  }
-};
+  };
+}
 
 int main(int argc, char **argv) {
   sys::PrintStackTraceOnErrorSignal();
diff --git a/utils/TableGen/X86ModRMFilters.cpp b/utils/TableGen/X86ModRMFilters.cpp
new file mode 100644 (file)
index 0000000..7166fe0
--- /dev/null
@@ -0,0 +1,26 @@
+//===- X86ModRMFilters.cpp - Disassembler ModR/M filterss -------*- C++ -*-===//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#include "X86ModRMFilters.h"
+
+using namespace llvm::X86Disassembler;
+
+void ModRMFilter::anchor() { }
+
+void DumbFilter::anchor() { }
+
+void ModFilter::anchor() { }
+
+void EscapeFilter::anchor() { }
+
+void AddRegEscapeFilter::anchor() { }
+
+void ExtendedFilter::anchor() { }
+
+void ExactFilter::anchor() { }
index 199040bad840b9c867101f50184217c1bc9fcb96..19fecbc3a0a51ddce8de0907851a020317394e32 100644 (file)
@@ -27,6 +27,7 @@ namespace X86Disassembler {
 /// ModRMFilter - Abstract base class for clases that recognize patterns in
 ///   ModR/M bytes.
 class ModRMFilter {
+  virtual void anchor();
 public:
   /// Destructor    - Override as necessary.
   virtual ~ModRMFilter() { }
@@ -49,6 +50,7 @@ public:
 ///   require a ModR/M byte or instructions where the entire ModR/M byte is used
 ///   for operands.
 class DumbFilter : public ModRMFilter {
+  virtual void anchor();
 public:
   bool isDumb() const {
     return true;
@@ -63,7 +65,7 @@ public:
 ///   Some instructions are classified based on whether they are 11 or anything
 ///   else.  This filter performs that classification.
 class ModFilter : public ModRMFilter {
-private:
+  virtual void anchor();
   bool R;
 public:
   /// Constructor
@@ -90,7 +92,7 @@ public:
 ///   possible value.  Otherwise, there is one instruction for each value of the
 ///   nnn field [bits 5-3], known elsewhere as the reg field.
 class EscapeFilter : public ModRMFilter {
-private:
+  virtual void anchor();
   bool C0_FF;
   uint8_t NNN_or_ModRM;
 public:
@@ -121,7 +123,7 @@ public:
 ///   maps to a single instruction.  Such instructions require the ModR/M byte
 ///   to fall between 0xc0 and 0xff.
 class AddRegEscapeFilter : public ModRMFilter {
-private:
+  virtual void anchor();
   uint8_t ModRM;
 public:
   /// Constructor
@@ -142,7 +144,7 @@ public:
 /// ExtendedFilter - Extended opcodes are classified based on the value of the
 ///   mod field [bits 7-6] and the value of the nnn field [bits 5-3]. 
 class ExtendedFilter : public ModRMFilter {
-private:
+  virtual void anchor();
   bool R;
   uint8_t NNN;
 public:
@@ -169,9 +171,8 @@ public:
 
 /// ExactFilter - The occasional extended opcode (such as VMCALL or MONITOR)
 ///   requires the ModR/M byte to have a specific value.
-class ExactFilter : public ModRMFilter
-{
-private:
+class ExactFilter : public ModRMFilter {
+  virtual void anchor();
   uint8_t ModRM;
 public:
   /// Constructor