<div dir="ltr">Hi Juergen,<div><br></div><div>I have reverted this change in r194997 due to numerous memory leaks it caused. See the details in commit message.</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">
On Sat, Nov 16, 2013 at 2:34 AM, Juergen Ributzka <span dir="ltr"><<a href="mailto:juergen@apple.com" target="_blank">juergen@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Author: ributzka<br>
Date: Fri Nov 15 16:34:48 2013<br>
New Revision: 194865<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=194865&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=194865&view=rev</a><br>
Log:<br>
[weak vtables] Remove a bunch of weak vtables<br>
<br>
This patch removes most of the trivial cases of weak vtables by pinning them to<br>
a single object file.<br>
<br>
Differential Revision: <a href="http://llvm-reviews.chandlerc.com/D2068" target="_blank">http://llvm-reviews.chandlerc.com/D2068</a><br>
<br>
Reviewed by Andy<br>
<br>
Added:<br>
    llvm/trunk/lib/Target/Hexagon/HexagonMachineFunctionInfo.cpp<br>
      - copied, changed from r194862, llvm/trunk/lib/Target/R600/R600MachineFunctionInfo.cpp<br>
    llvm/trunk/lib/Target/R600/MCTargetDesc/AMDGPUMCCodeEmitter.cpp<br>
    llvm/trunk/lib/Target/SystemZ/SystemZMachineFunctionInfo.cpp<br>
      - copied, changed from r194862, llvm/trunk/lib/Target/R600/R600MachineFunctionInfo.cpp<br>
Modified:<br>
    llvm/trunk/examples/ExceptionDemo/ExceptionDemo.cpp<br>
    llvm/trunk/examples/Kaleidoscope/Chapter2/toy.cpp<br>
    llvm/trunk/examples/Kaleidoscope/Chapter3/toy.cpp<br>
    llvm/trunk/examples/Kaleidoscope/Chapter4/toy.cpp<br>
    llvm/trunk/examples/Kaleidoscope/Chapter5/toy.cpp<br>
    llvm/trunk/examples/Kaleidoscope/Chapter6/toy.cpp<br>
    llvm/trunk/examples/Kaleidoscope/Chapter7/toy.cpp<br>
    llvm/trunk/include/llvm/CodeGen/MachineRegisterInfo.h<br>
    llvm/trunk/include/llvm/CodeGen/MachineScheduler.h<br>
    llvm/trunk/include/llvm/ExecutionEngine/ObjectBuffer.h<br>
    llvm/trunk/include/llvm/ExecutionEngine/ObjectCache.h<br>
    llvm/trunk/include/llvm/ExecutionEngine/ObjectImage.h<br>
    llvm/trunk/include/llvm/MC/MCAtom.h<br>
    llvm/trunk/include/llvm/MC/MCStreamer.h<br>
    llvm/trunk/include/llvm/MC/MCWinCOFFObjectWriter.h<br>
    llvm/trunk/include/llvm/Support/CommandLine.h<br>
    llvm/trunk/include/llvm/Support/ValueHandle.h<br>
    llvm/trunk/include/llvm/Support/YAMLParser.h<br>
    llvm/trunk/include/llvm/Support/YAMLTraits.h<br>
    llvm/trunk/lib/CodeGen/MachineRegisterInfo.cpp<br>
    llvm/trunk/lib/CodeGen/MachineScheduler.cpp<br>
    llvm/trunk/lib/CodeGen/RegAllocBase.cpp<br>
    llvm/trunk/lib/CodeGen/RegAllocBase.h<br>
    llvm/trunk/lib/ExecutionEngine/ExecutionEngine.cpp<br>
    llvm/trunk/lib/ExecutionEngine/RuntimeDyld/JITRegistrar.h<br>
    llvm/trunk/lib/ExecutionEngine/RuntimeDyld/ObjectImageCommon.h<br>
    llvm/trunk/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp<br>
    llvm/trunk/lib/IR/AttributeImpl.h<br>
    llvm/trunk/lib/IR/Attributes.cpp<br>
    llvm/trunk/lib/IR/Metadata.cpp<br>
    llvm/trunk/lib/IR/Value.cpp<br>
    llvm/trunk/lib/MC/MCAtom.cpp<br>
    llvm/trunk/lib/MC/MCStreamer.cpp<br>
    llvm/trunk/lib/MC/WinCOFFObjectWriter.cpp<br>
    llvm/trunk/lib/Support/CommandLine.cpp<br>
    llvm/trunk/lib/Support/ErrorHandling.cpp<br>
    llvm/trunk/lib/Support/YAMLParser.cpp<br>
    llvm/trunk/lib/Support/YAMLTraits.cpp<br>
    llvm/trunk/lib/Target/AArch64/AArch64InstrInfo.cpp<br>
    llvm/trunk/lib/Target/AArch64/AArch64Subtarget.cpp<br>
    llvm/trunk/lib/Target/AArch64/AArch64Subtarget.h<br>
    llvm/trunk/lib/Target/AArch64/MCTargetDesc/AArch64MCAsmInfo.cpp<br>
    llvm/trunk/lib/Target/AArch64/MCTargetDesc/AArch64MCAsmInfo.h<br>
    llvm/trunk/lib/Target/ARM/ARMBaseInstrInfo.cpp<br>
    llvm/trunk/lib/Target/Hexagon/CMakeLists.txt<br>
    llvm/trunk/lib/Target/Hexagon/HexagonInstrInfo.cpp<br>
    llvm/trunk/lib/Target/Hexagon/HexagonInstrInfo.h<br>
    llvm/trunk/lib/Target/Hexagon/HexagonMachineFunctionInfo.h<br>
    llvm/trunk/lib/Target/Hexagon/HexagonSubtarget.cpp<br>
    llvm/trunk/lib/Target/Hexagon/HexagonSubtarget.h<br>
    llvm/trunk/lib/Target/Hexagon/MCTargetDesc/HexagonMCAsmInfo.cpp<br>
    llvm/trunk/lib/Target/Hexagon/MCTargetDesc/HexagonMCAsmInfo.h<br>
    llvm/trunk/lib/Target/MSP430/MSP430InstrInfo.cpp<br>
    llvm/trunk/lib/Target/MSP430/MSP430InstrInfo.h<br>
    llvm/trunk/lib/Target/Mips/MCTargetDesc/MipsMCTargetDesc.cpp<br>
    llvm/trunk/lib/Target/Mips/MipsInstrInfo.cpp<br>
    llvm/trunk/lib/Target/Mips/MipsInstrInfo.h<br>
    llvm/trunk/lib/Target/Mips/MipsTargetStreamer.h<br>
    llvm/trunk/lib/Target/NVPTX/NVPTXISelLowering.cpp<br>
    llvm/trunk/lib/Target/NVPTX/NVPTXInstrInfo.cpp<br>
    llvm/trunk/lib/Target/NVPTX/NVPTXInstrInfo.h<br>
    llvm/trunk/lib/Target/NVPTX/NVPTXSection.h<br>
    llvm/trunk/lib/Target/NVPTX/NVPTXSubtarget.cpp<br>
    llvm/trunk/lib/Target/NVPTX/NVPTXSubtarget.h<br>
    llvm/trunk/lib/Target/NVPTX/NVPTXTargetObjectFile.h<br>
    llvm/trunk/lib/Target/PowerPC/MCTargetDesc/PPCMCTargetDesc.cpp<br>
    llvm/trunk/lib/Target/PowerPC/PPCInstrInfo.cpp<br>
    llvm/trunk/lib/Target/PowerPC/PPCInstrInfo.h<br>
    llvm/trunk/lib/Target/PowerPC/PPCTargetStreamer.h<br>
    llvm/trunk/lib/Target/R600/AMDGPUInstrInfo.cpp<br>
    llvm/trunk/lib/Target/R600/AMDGPUInstrInfo.h<br>
    llvm/trunk/lib/Target/R600/AMDGPUMachineFunction.cpp<br>
    llvm/trunk/lib/Target/R600/AMDGPUMachineFunction.h<br>
    llvm/trunk/lib/Target/R600/MCTargetDesc/AMDGPUMCCodeEmitter.h<br>
    llvm/trunk/lib/Target/R600/MCTargetDesc/CMakeLists.txt<br>
    llvm/trunk/lib/Target/R600/R600InstrInfo.cpp<br>
    llvm/trunk/lib/Target/R600/R600MachineFunctionInfo.cpp<br>
    llvm/trunk/lib/Target/R600/R600MachineFunctionInfo.h<br>
    llvm/trunk/lib/Target/R600/SIMachineFunctionInfo.cpp<br>
    llvm/trunk/lib/Target/R600/SIMachineFunctionInfo.h<br>
    llvm/trunk/lib/Target/Sparc/SparcInstrInfo.cpp<br>
    llvm/trunk/lib/Target/Sparc/SparcInstrInfo.h<br>
    llvm/trunk/lib/Target/SystemZ/CMakeLists.txt<br>
    llvm/trunk/lib/Target/SystemZ/SystemZInstrInfo.cpp<br>
    llvm/trunk/lib/Target/SystemZ/SystemZInstrInfo.h<br>
    llvm/trunk/lib/Target/SystemZ/SystemZMachineFunctionInfo.h<br>
    llvm/trunk/lib/Target/SystemZ/SystemZSubtarget.cpp<br>
    llvm/trunk/lib/Target/SystemZ/SystemZSubtarget.h<br>
    llvm/trunk/lib/Target/X86/MCTargetDesc/X86WinCOFFObjectWriter.cpp<br>
    llvm/trunk/lib/Target/X86/X86InstrInfo.cpp<br>
    llvm/trunk/lib/Target/X86/X86InstrInfo.h<br>
    llvm/trunk/lib/Target/XCore/XCoreInstrInfo.cpp<br>
    llvm/trunk/lib/Target/XCore/XCoreInstrInfo.h<br>
    llvm/trunk/tools/llvm-stress/llvm-stress.cpp<br>
    llvm/trunk/unittests/ADT/IntrusiveRefCntPtrTest.cpp<br>
    llvm/trunk/unittests/ExecutionEngine/MCJIT/MCJITCAPITest.cpp<br>
    llvm/trunk/unittests/ExecutionEngine/MCJIT/MCJITMultipleModuleTest.cpp<br>
    llvm/trunk/unittests/ExecutionEngine/MCJIT/MCJITTest.cpp<br>
    llvm/trunk/utils/TableGen/CodeGenSchedule.cpp<br>
    llvm/trunk/utils/TableGen/InstrInfoEmitter.cpp<br>
    llvm/trunk/utils/TableGen/SetTheory.cpp<br>
    llvm/trunk/utils/TableGen/TGValueTypes.cpp<br>
    llvm/trunk/utils/unittest/googletest/include/gtest/gtest-test-part.h<br>
    llvm/trunk/utils/unittest/googletest/include/gtest/gtest.h<br>
    llvm/trunk/utils/unittest/googletest/include/gtest/internal/gtest-death-test-internal.h<br>
    llvm/trunk/utils/unittest/googletest/include/gtest/internal/gtest-internal.h<br>
    llvm/trunk/utils/unittest/googletest/include/gtest/internal/gtest-param-util.h<br>
    llvm/trunk/utils/unittest/googletest/include/gtest/internal/gtest-port.h<br>
    llvm/trunk/utils/unittest/googletest/src/gtest-death-test.cc<br>
    llvm/trunk/utils/unittest/googletest/src/gtest-internal-inl.h<br>
    llvm/trunk/utils/unittest/googletest/src/gtest-port.cc<br>
    llvm/trunk/utils/unittest/googletest/src/gtest.cc<br>
<br>
Modified: llvm/trunk/examples/ExceptionDemo/ExceptionDemo.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/examples/ExceptionDemo/ExceptionDemo.cpp?rev=194865&r1=194864&r2=194865&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/examples/ExceptionDemo/ExceptionDemo.cpp?rev=194865&r1=194864&r2=194865&view=diff</a><br>

==============================================================================<br>
--- llvm/trunk/examples/ExceptionDemo/ExceptionDemo.cpp (original)<br>
+++ llvm/trunk/examples/ExceptionDemo/ExceptionDemo.cpp Fri Nov 15 16:34:48 2013<br>
@@ -1577,9 +1577,11 @@ public:<br>
                                  std::runtime_error::operator=(toCopy)));<br>
   }<br>
<br>
-  ~OurCppRunException (void) throw () {}<br>
+  ~OurCppRunException (void) throw ();<br>
 };<br>
<br>
+OurCppRunException::~OurCppRunException() throw () {}<br>
+<br>
<br>
 /// Throws foreign C++ exception.<br>
 /// @param ignoreIt unused parameter that allows function to match implied<br>
<br>
Modified: llvm/trunk/examples/Kaleidoscope/Chapter2/toy.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/examples/Kaleidoscope/Chapter2/toy.cpp?rev=194865&r1=194864&r2=194865&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/examples/Kaleidoscope/Chapter2/toy.cpp?rev=194865&r1=194864&r2=194865&view=diff</a><br>

==============================================================================<br>
--- llvm/trunk/examples/Kaleidoscope/Chapter2/toy.cpp (original)<br>
+++ llvm/trunk/examples/Kaleidoscope/Chapter2/toy.cpp Fri Nov 15 16:34:48 2013<br>
@@ -79,28 +79,39 @@ static int gettok() {<br>
 /// ExprAST - Base class for all expression nodes.<br>
 class ExprAST {<br>
 public:<br>
-  virtual ~ExprAST() {}<br>
+  virtual ~ExprAST();<br>
 };<br>
<br>
+ExprAST::~ExprAST() {}<br>
+<br>
 /// NumberExprAST - Expression class for numeric literals like "1.0".<br>
 class NumberExprAST : public ExprAST {<br>
 public:<br>
   NumberExprAST(double val) {}<br>
+  virtual ~NumberExprAST();<br>
 };<br>
<br>
+NumberExprAST::~NumberExprAST() {}<br>
+<br>
 /// VariableExprAST - Expression class for referencing a variable, like "a".<br>
 class VariableExprAST : public ExprAST {<br>
   std::string Name;<br>
 public:<br>
   VariableExprAST(const std::string &name) : Name(name) {}<br>
+  virtual ~VariableExprAST();<br>
 };<br>
<br>
+VariableExprAST::~VariableExprAST() {}<br>
+<br>
 /// BinaryExprAST - Expression class for a binary operator.<br>
 class BinaryExprAST : public ExprAST {<br>
 public:<br>
   BinaryExprAST(char op, ExprAST *lhs, ExprAST *rhs) {}<br>
+  virtual ~BinaryExprAST();<br>
 };<br>
<br>
+BinaryExprAST::~BinaryExprAST() {}<br>
+<br>
 /// CallExprAST - Expression class for function calls.<br>
 class CallExprAST : public ExprAST {<br>
   std::string Callee;<br>
@@ -108,8 +119,11 @@ class CallExprAST : public ExprAST {<br>
 public:<br>
   CallExprAST(const std::string &callee, std::vector<ExprAST*> &args)<br>
     : Callee(callee), Args(args) {}<br>
+  virtual ~CallExprAST();<br>
 };<br>
<br>
+CallExprAST::~CallExprAST() {}<br>
+<br>
 /// PrototypeAST - This class represents the "prototype" for a function,<br>
 /// which captures its name, and its argument names (thus implicitly the number<br>
 /// of arguments the function takes).<br>
<br>
Modified: llvm/trunk/examples/Kaleidoscope/Chapter3/toy.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/examples/Kaleidoscope/Chapter3/toy.cpp?rev=194865&r1=194864&r2=194865&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/examples/Kaleidoscope/Chapter3/toy.cpp?rev=194865&r1=194864&r2=194865&view=diff</a><br>

==============================================================================<br>
--- llvm/trunk/examples/Kaleidoscope/Chapter3/toy.cpp (original)<br>
+++ llvm/trunk/examples/Kaleidoscope/Chapter3/toy.cpp Fri Nov 15 16:34:48 2013<br>
@@ -84,10 +84,12 @@ static int gettok() {<br>
 /// ExprAST - Base class for all expression nodes.<br>
 class ExprAST {<br>
 public:<br>
-  virtual ~ExprAST() {}<br>
+  virtual ~ExprAST();<br>
   virtual Value *Codegen() = 0;<br>
 };<br>
<br>
+ExprAST::~ExprAST() {}<br>
+<br>
 /// NumberExprAST - Expression class for numeric literals like "1.0".<br>
 class NumberExprAST : public ExprAST {<br>
   double Val;<br>
<br>
Modified: llvm/trunk/examples/Kaleidoscope/Chapter4/toy.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/examples/Kaleidoscope/Chapter4/toy.cpp?rev=194865&r1=194864&r2=194865&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/examples/Kaleidoscope/Chapter4/toy.cpp?rev=194865&r1=194864&r2=194865&view=diff</a><br>

==============================================================================<br>
--- llvm/trunk/examples/Kaleidoscope/Chapter4/toy.cpp (original)<br>
+++ llvm/trunk/examples/Kaleidoscope/Chapter4/toy.cpp Fri Nov 15 16:34:48 2013<br>
@@ -91,10 +91,12 @@ static int gettok() {<br>
 /// ExprAST - Base class for all expression nodes.<br>
 class ExprAST {<br>
 public:<br>
-  virtual ~ExprAST() {}<br>
+  virtual ~ExprAST();<br>
   virtual Value *Codegen() = 0;<br>
 };<br>
<br>
+ExprAST::~ExprAST() {}<br>
+<br>
 /// NumberExprAST - Expression class for numeric literals like "1.0".<br>
 class NumberExprAST : public ExprAST {<br>
   double Val;<br>
<br>
Modified: llvm/trunk/examples/Kaleidoscope/Chapter5/toy.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/examples/Kaleidoscope/Chapter5/toy.cpp?rev=194865&r1=194864&r2=194865&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/examples/Kaleidoscope/Chapter5/toy.cpp?rev=194865&r1=194864&r2=194865&view=diff</a><br>

==============================================================================<br>
--- llvm/trunk/examples/Kaleidoscope/Chapter5/toy.cpp (original)<br>
+++ llvm/trunk/examples/Kaleidoscope/Chapter5/toy.cpp Fri Nov 15 16:34:48 2013<br>
@@ -100,10 +100,12 @@ static int gettok() {<br>
 /// ExprAST - Base class for all expression nodes.<br>
 class ExprAST {<br>
 public:<br>
-  virtual ~ExprAST() {}<br>
+  virtual ~ExprAST();<br>
   virtual Value *Codegen() = 0;<br>
 };<br>
<br>
+ExprAST::~ExprAST() {}<br>
+<br>
 /// NumberExprAST - Expression class for numeric literals like "1.0".<br>
 class NumberExprAST : public ExprAST {<br>
   double Val;<br>
<br>
Modified: llvm/trunk/examples/Kaleidoscope/Chapter6/toy.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/examples/Kaleidoscope/Chapter6/toy.cpp?rev=194865&r1=194864&r2=194865&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/examples/Kaleidoscope/Chapter6/toy.cpp?rev=194865&r1=194864&r2=194865&view=diff</a><br>

==============================================================================<br>
--- llvm/trunk/examples/Kaleidoscope/Chapter6/toy.cpp (original)<br>
+++ llvm/trunk/examples/Kaleidoscope/Chapter6/toy.cpp Fri Nov 15 16:34:48 2013<br>
@@ -105,10 +105,12 @@ static int gettok() {<br>
 /// ExprAST - Base class for all expression nodes.<br>
 class ExprAST {<br>
 public:<br>
-  virtual ~ExprAST() {}<br>
+  virtual ~ExprAST();<br>
   virtual Value *Codegen() = 0;<br>
 };<br>
<br>
+ExprAST::~ExprAST() {}<br>
+<br>
 /// NumberExprAST - Expression class for numeric literals like "1.0".<br>
 class NumberExprAST : public ExprAST {<br>
   double Val;<br>
<br>
Modified: llvm/trunk/examples/Kaleidoscope/Chapter7/toy.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/examples/Kaleidoscope/Chapter7/toy.cpp?rev=194865&r1=194864&r2=194865&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/examples/Kaleidoscope/Chapter7/toy.cpp?rev=194865&r1=194864&r2=194865&view=diff</a><br>

==============================================================================<br>
--- llvm/trunk/examples/Kaleidoscope/Chapter7/toy.cpp (original)<br>
+++ llvm/trunk/examples/Kaleidoscope/Chapter7/toy.cpp Fri Nov 15 16:34:48 2013<br>
@@ -109,10 +109,12 @@ static int gettok() {<br>
 /// ExprAST - Base class for all expression nodes.<br>
 class ExprAST {<br>
 public:<br>
-  virtual ~ExprAST() {}<br>
+  virtual ~ExprAST();<br>
   virtual Value *Codegen() = 0;<br>
 };<br>
<br>
+ExprAST::~ExprAST() {}<br>
+<br>
 /// NumberExprAST - Expression class for numeric literals like "1.0".<br>
 class NumberExprAST : public ExprAST {<br>
   double Val;<br>
<br>
Modified: llvm/trunk/include/llvm/CodeGen/MachineRegisterInfo.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/MachineRegisterInfo.h?rev=194865&r1=194864&r2=194865&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/MachineRegisterInfo.h?rev=194865&r1=194864&r2=194865&view=diff</a><br>

==============================================================================<br>
--- llvm/trunk/include/llvm/CodeGen/MachineRegisterInfo.h (original)<br>
+++ llvm/trunk/include/llvm/CodeGen/MachineRegisterInfo.h Fri Nov 15 16:34:48 2013<br>
@@ -30,8 +30,9 @@ class PSetIterator;<br>
 class MachineRegisterInfo {<br>
 public:<br>
   class Delegate {<br>
+    virtual void anchor();<br>
   public:<br>
-    virtual void MRI_NoteNewVirtualRegister(unsigned Reg) {}<br>
+    virtual void MRI_NoteNewVirtualRegister(unsigned Reg) = 0;<br>
<br>
     virtual ~Delegate() {}<br>
   };<br>
<br>
Modified: llvm/trunk/include/llvm/CodeGen/MachineScheduler.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/MachineScheduler.h?rev=194865&r1=194864&r2=194865&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/MachineScheduler.h?rev=194865&r1=194864&r2=194865&view=diff</a><br>

==============================================================================<br>
--- llvm/trunk/include/llvm/CodeGen/MachineScheduler.h (original)<br>
+++ llvm/trunk/include/llvm/CodeGen/MachineScheduler.h Fri Nov 15 16:34:48 2013<br>
@@ -164,6 +164,7 @@ struct MachineSchedPolicy {<br>
 /// Initialization sequence:<br>
 ///   initPolicy -> shouldTrackPressure -> initialize(DAG) -> registerRoots<br>
 class MachineSchedStrategy {<br>
+  virtual void anchor();<br>
 public:<br>
   virtual ~MachineSchedStrategy() {}<br>
<br>
@@ -262,6 +263,7 @@ public:<br>
<br>
 /// Mutate the DAG as a postpass after normal DAG building.<br>
 class ScheduleDAGMutation {<br>
+  virtual void anchor();<br>
 public:<br>
   virtual ~ScheduleDAGMutation() {}<br>
<br>
<br>
Modified: llvm/trunk/include/llvm/ExecutionEngine/ObjectBuffer.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ExecutionEngine/ObjectBuffer.h?rev=194865&r1=194864&r2=194865&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ExecutionEngine/ObjectBuffer.h?rev=194865&r1=194864&r2=194865&view=diff</a><br>

==============================================================================<br>
--- llvm/trunk/include/llvm/ExecutionEngine/ObjectBuffer.h (original)<br>
+++ llvm/trunk/include/llvm/ExecutionEngine/ObjectBuffer.h Fri Nov 15 16:34:48 2013<br>
@@ -33,7 +33,6 @@ class ObjectBuffer {<br>
 public:<br>
   ObjectBuffer() {}<br>
   ObjectBuffer(MemoryBuffer* Buf) : Buffer(Buf) {}<br>
-  virtual ~ObjectBuffer() {}<br>
<br>
   /// getMemBuffer - Like MemoryBuffer::getMemBuffer() this function<br>
   /// returns a pointer to an object that is owned by the caller. However,<br>
@@ -58,7 +57,6 @@ protected:<br>
 class ObjectBufferStream : public ObjectBuffer {<br>
 public:<br>
   ObjectBufferStream() : OS(SV) {}<br>
-  virtual ~ObjectBufferStream() {}<br>
<br>
   raw_ostream &getOStream() { return OS; }<br>
   void flush()<br>
<br>
Modified: llvm/trunk/include/llvm/ExecutionEngine/ObjectCache.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ExecutionEngine/ObjectCache.h?rev=194865&r1=194864&r2=194865&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ExecutionEngine/ObjectCache.h?rev=194865&r1=194864&r2=194865&view=diff</a><br>

==============================================================================<br>
--- llvm/trunk/include/llvm/ExecutionEngine/ObjectCache.h (original)<br>
+++ llvm/trunk/include/llvm/ExecutionEngine/ObjectCache.h Fri Nov 15 16:34:48 2013<br>
@@ -20,6 +20,7 @@ class Module;<br>
 /// ExecutionEngine for the purpose of avoiding compilation for Modules that<br>
 /// have already been compiled and an object file is available.<br>
 class ObjectCache {<br>
+  virtual void anchor();<br>
 public:<br>
   ObjectCache() { }<br>
<br>
<br>
Modified: llvm/trunk/include/llvm/ExecutionEngine/ObjectImage.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ExecutionEngine/ObjectImage.h?rev=194865&r1=194864&r2=194865&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ExecutionEngine/ObjectImage.h?rev=194865&r1=194864&r2=194865&view=diff</a><br>

==============================================================================<br>
--- llvm/trunk/include/llvm/ExecutionEngine/ObjectImage.h (original)<br>
+++ llvm/trunk/include/llvm/ExecutionEngine/ObjectImage.h Fri Nov 15 16:34:48 2013<br>
@@ -25,6 +25,7 @@ namespace llvm {<br>
 class ObjectImage {<br>
   ObjectImage() LLVM_DELETED_FUNCTION;<br>
   ObjectImage(const ObjectImage &other) LLVM_DELETED_FUNCTION;<br>
+  virtual void anchor();<br>
<br>
 protected:<br>
   OwningPtr<ObjectBuffer> Buffer;<br>
<br>
Modified: llvm/trunk/include/llvm/MC/MCAtom.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/MC/MCAtom.h?rev=194865&r1=194864&r2=194865&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/MC/MCAtom.h?rev=194865&r1=194864&r2=194865&view=diff</a><br>

==============================================================================<br>
--- llvm/trunk/include/llvm/MC/MCAtom.h (original)<br>
+++ llvm/trunk/include/llvm/MC/MCAtom.h Fri Nov 15 16:34:48 2013<br>
@@ -32,6 +32,7 @@ class MCDataAtom;<br>
 /// \brief Represents a contiguous range of either instructions (a TextAtom)<br>
 /// or data (a DataAtom).  Address ranges are expressed as _closed_ intervals.<br>
 class MCAtom {<br>
+  virtual void anchor();<br>
 public:<br>
   virtual ~MCAtom() {}<br>
<br>
<br>
Modified: llvm/trunk/include/llvm/MC/MCStreamer.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/MC/MCStreamer.h?rev=194865&r1=194864&r2=194865&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/MC/MCStreamer.h?rev=194865&r1=194864&r2=194865&view=diff</a><br>

==============================================================================<br>
--- llvm/trunk/include/llvm/MC/MCStreamer.h (original)<br>
+++ llvm/trunk/include/llvm/MC/MCStreamer.h Fri Nov 15 16:34:48 2013<br>
@@ -76,6 +76,7 @@ public:<br>
 // FIXME: declared here because it is used from<br>
 // lib/CodeGen/AsmPrinter/ARMException.cpp.<br>
 class ARMTargetStreamer : public MCTargetStreamer {<br>
+  virtual void anchor();<br>
 public:<br>
   virtual void emitFnStart() = 0;<br>
   virtual void emitFnEnd() = 0;<br>
<br>
Modified: llvm/trunk/include/llvm/MC/MCWinCOFFObjectWriter.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/MC/MCWinCOFFObjectWriter.h?rev=194865&r1=194864&r2=194865&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/MC/MCWinCOFFObjectWriter.h?rev=194865&r1=194864&r2=194865&view=diff</a><br>

==============================================================================<br>
--- llvm/trunk/include/llvm/MC/MCWinCOFFObjectWriter.h (original)<br>
+++ llvm/trunk/include/llvm/MC/MCWinCOFFObjectWriter.h Fri Nov 15 16:34:48 2013<br>
@@ -19,6 +19,8 @@ namespace llvm {<br>
   class MCWinCOFFObjectTargetWriter {<br>
     const unsigned Machine;<br>
<br>
+    virtual void anchor();<br>
+<br>
   protected:<br>
     MCWinCOFFObjectTargetWriter(unsigned Machine_);<br>
<br>
<br>
Modified: llvm/trunk/include/llvm/Support/CommandLine.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/CommandLine.h?rev=194865&r1=194864&r2=194865&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/CommandLine.h?rev=194865&r1=194864&r2=194865&view=diff</a><br>

==============================================================================<br>
--- llvm/trunk/include/llvm/Support/CommandLine.h (original)<br>
+++ llvm/trunk/include/llvm/Support/CommandLine.h Fri Nov 15 16:34:48 2013<br>
@@ -350,6 +350,9 @@ struct cat {<br>
 struct GenericOptionValue {<br>
   virtual ~GenericOptionValue() {}<br>
   virtual bool compare(const GenericOptionValue &V) const = 0;<br>
+<br>
+private:<br>
+  virtual void anchor();<br>
 };<br>
<br>
 template<class DataType> struct OptionValue;<br>
@@ -1752,6 +1755,7 @@ void getRegisteredOptions(StringMap<Opti<br>
 /// \brief Saves strings in the inheritor's stable storage and returns a stable<br>
 /// raw character pointer.<br>
 class StringSaver {<br>
+  virtual void anchor();<br>
 public:<br>
   virtual const char *SaveString(const char *Str) = 0;<br>
   virtual ~StringSaver() {};  // Pacify -Wnon-virtual-dtor.<br>
<br>
Modified: llvm/trunk/include/llvm/Support/ValueHandle.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/ValueHandle.h?rev=194865&r1=194864&r2=194865&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/ValueHandle.h?rev=194865&r1=194864&r2=194865&view=diff</a><br>

==============================================================================<br>
--- llvm/trunk/include/llvm/Support/ValueHandle.h (original)<br>
+++ llvm/trunk/include/llvm/Support/ValueHandle.h Fri Nov 15 16:34:48 2013<br>
@@ -339,6 +339,7 @@ public:<br>
 /// rearrange itself when the pointer changes).  Unlike ValueHandleBase, this<br>
 /// class has a vtable and a virtual destructor.<br>
 class CallbackVH : public ValueHandleBase {<br>
+  virtual void anchor();<br>
 protected:<br>
   CallbackVH(const CallbackVH &RHS)<br>
     : ValueHandleBase(Callback, RHS) {}<br>
@@ -365,13 +366,13 @@ public:<br>
   ///<br>
   /// All implementations must remove the reference from this object to the<br>
   /// Value that's being destroyed.<br>
-  virtual void deleted();<br>
+  virtual void deleted() { setValPtr(NULL); }<br>
<br>
   /// Called when this->getValPtr()->replaceAllUsesWith(new_value) is called,<br>
   /// _before_ any of the uses have actually been replaced.  If WeakVH were<br>
   /// implemented as a CallbackVH, it would use this method to call<br>
   /// setValPtr(new_value).  AssertingVH would do nothing in this method.<br>
-  virtual void allUsesReplacedWith(Value *);<br>
+  virtual void allUsesReplacedWith(Value *) {}<br>
 };<br>
<br>
 } // End llvm namespace<br>
<br>
Modified: llvm/trunk/include/llvm/Support/YAMLParser.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/YAMLParser.h?rev=194865&r1=194864&r2=194865&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/YAMLParser.h?rev=194865&r1=194864&r2=194865&view=diff</a><br>

==============================================================================<br>
--- llvm/trunk/include/llvm/Support/YAMLParser.h (original)<br>
+++ llvm/trunk/include/llvm/Support/YAMLParser.h Fri Nov 15 16:34:48 2013<br>
@@ -105,6 +105,7 @@ private:<br>
<br>
 /// @brief Abstract base class for all Nodes.<br>
 class Node {<br>
+   virtual void anchor();<br>
 public:<br>
   enum NodeKind {<br>
     NK_Null,<br>
@@ -175,6 +176,7 @@ private:<br>
 /// Example:<br>
 ///   !!null null<br>
 class NullNode : public Node {<br>
+  virtual void anchor();<br>
 public:<br>
   NullNode(OwningPtr<Document> &D)<br>
       : Node(NK_Null, D, StringRef(), StringRef()) {}<br>
@@ -190,6 +192,7 @@ public:<br>
 /// Example:<br>
 ///   Adena<br>
 class ScalarNode : public Node {<br>
+  virtual void anchor();<br>
 public:<br>
   ScalarNode(OwningPtr<Document> &D, StringRef Anchor, StringRef Tag,<br>
              StringRef Val)<br>
@@ -231,6 +234,7 @@ private:<br>
 /// Example:<br>
 ///   Section: .text<br>
 class KeyValueNode : public Node {<br>
+  virtual void anchor();<br>
 public:<br>
   KeyValueNode(OwningPtr<Document> &D)<br>
     : Node(NK_KeyValue, D, StringRef(), StringRef())<br>
@@ -342,6 +346,7 @@ void skip(CollectionType &C) {<br>
 ///   Name: _main<br>
 ///   Scope: Global<br>
 class MappingNode : public Node {<br>
+  virtual void anchor();<br>
 public:<br>
   enum MappingType {<br>
     MT_Block,<br>
@@ -391,6 +396,7 @@ private:<br>
 ///   - Hello<br>
 ///   - World<br>
 class SequenceNode : public Node {<br>
+  virtual void anchor();<br>
 public:<br>
   enum SequenceType {<br>
     ST_Block,<br>
@@ -446,6 +452,7 @@ private:<br>
 /// Example:<br>
 ///   *AnchorName<br>
 class AliasNode : public Node {<br>
+  virtual void anchor();<br>
 public:<br>
   AliasNode(OwningPtr<Document> &D, StringRef Val)<br>
     : Node(NK_Alias, D, StringRef(), StringRef()), Name(Val) {}<br>
<br>
Modified: llvm/trunk/include/llvm/Support/YAMLTraits.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/YAMLTraits.h?rev=194865&r1=194864&r2=194865&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/YAMLTraits.h?rev=194865&r1=194864&r2=194865&view=diff</a><br>

==============================================================================<br>
--- llvm/trunk/include/llvm/Support/YAMLTraits.h (original)<br>
+++ llvm/trunk/include/llvm/Support/YAMLTraits.h Fri Nov 15 16:34:48 2013<br>
@@ -723,6 +723,7 @@ private:<br>
   virtual bool canElideEmptySequence();<br>
<br>
   class HNode {<br>
+    virtual void anchor();<br>
   public:<br>
     HNode(Node *n) : _node(n) { }<br>
     virtual ~HNode() { }<br>
@@ -732,9 +733,9 @@ private:<br>
   };<br>
<br>
   class EmptyHNode : public HNode {<br>
+    virtual void anchor();<br>
   public:<br>
     EmptyHNode(Node *n) : HNode(n) { }<br>
-    virtual ~EmptyHNode() {}<br>
     static inline bool classof(const HNode *n) {<br>
       return NullNode::classof(n->_node);<br>
     }<br>
@@ -742,9 +743,9 @@ private:<br>
   };<br>
<br>
   class ScalarHNode : public HNode {<br>
+    virtual void anchor();<br>
   public:<br>
     ScalarHNode(Node *n, StringRef s) : HNode(n), _value(s) { }<br>
-    virtual ~ScalarHNode() { }<br>
<br>
     StringRef value() const { return _value; }<br>
<br>
@@ -757,6 +758,7 @@ private:<br>
   };<br>
<br>
   class MapHNode : public HNode {<br>
+    virtual void anchor();<br>
   public:<br>
     MapHNode(Node *n) : HNode(n) { }<br>
     virtual ~MapHNode();<br>
@@ -775,6 +777,7 @@ private:<br>
   };<br>
<br>
   class SequenceHNode : public HNode {<br>
+    virtual void anchor();<br>
   public:<br>
     SequenceHNode(Node *n) : HNode(n) { }<br>
     virtual ~SequenceHNode();<br>
<br>
Modified: llvm/trunk/lib/CodeGen/MachineRegisterInfo.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineRegisterInfo.cpp?rev=194865&r1=194864&r2=194865&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineRegisterInfo.cpp?rev=194865&r1=194864&r2=194865&view=diff</a><br>

==============================================================================<br>
--- llvm/trunk/lib/CodeGen/MachineRegisterInfo.cpp (original)<br>
+++ llvm/trunk/lib/CodeGen/MachineRegisterInfo.cpp Fri Nov 15 16:34:48 2013<br>
@@ -19,6 +19,9 @@<br>
<br>
 using namespace llvm;<br>
<br>
+// pin vtable to this file<br>
+void MachineRegisterInfo::Delegate::anchor() {}<br>
+<br>
 MachineRegisterInfo::MachineRegisterInfo(const TargetMachine &TM)<br>
   : TM(TM), TheDelegate(0), IsSSA(true), TracksLiveness(true) {<br>
   VRegInfo.reserve(256);<br>
<br>
Modified: llvm/trunk/lib/CodeGen/MachineScheduler.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineScheduler.cpp?rev=194865&r1=194864&r2=194865&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineScheduler.cpp?rev=194865&r1=194864&r2=194865&view=diff</a><br>

==============================================================================<br>
--- llvm/trunk/lib/CodeGen/MachineScheduler.cpp (original)<br>
+++ llvm/trunk/lib/CodeGen/MachineScheduler.cpp Fri Nov 15 16:34:48 2013<br>
@@ -72,6 +72,10 @@ static cl::opt<bool> VerifyScheduling("v<br>
 // DAG subtrees must have at least this many nodes.<br>
 static const unsigned MinSubtreeSize = 8;<br>
<br>
+// pin vtable to this file<br>
+void MachineSchedStrategy::anchor() {}<br>
+void ScheduleDAGMutation::anchor() {}<br>
+<br>
 //===----------------------------------------------------------------------===//<br>
 // Machine Instruction Scheduling Pass and Registry<br>
 //===----------------------------------------------------------------------===//<br>
<br>
Modified: llvm/trunk/lib/CodeGen/RegAllocBase.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/RegAllocBase.cpp?rev=194865&r1=194864&r2=194865&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/RegAllocBase.cpp?rev=194865&r1=194864&r2=194865&view=diff</a><br>

==============================================================================<br>
--- llvm/trunk/lib/CodeGen/RegAllocBase.cpp (original)<br>
+++ llvm/trunk/lib/CodeGen/RegAllocBase.cpp Fri Nov 15 16:34:48 2013<br>
@@ -50,6 +50,9 @@ bool RegAllocBase::VerifyEnabled = false<br>
 //                         RegAllocBase Implementation<br>
 //===----------------------------------------------------------------------===//<br>
<br>
+// pin vtable to this file<br>
+void RegAllocBase::anchor() {}<br>
+<br>
 void RegAllocBase::init(VirtRegMap &vrm,<br>
                         LiveIntervals &lis,<br>
                         LiveRegMatrix &mat) {<br>
<br>
Modified: llvm/trunk/lib/CodeGen/RegAllocBase.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/RegAllocBase.h?rev=194865&r1=194864&r2=194865&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/RegAllocBase.h?rev=194865&r1=194864&r2=194865&view=diff</a><br>

==============================================================================<br>
--- llvm/trunk/lib/CodeGen/RegAllocBase.h (original)<br>
+++ llvm/trunk/lib/CodeGen/RegAllocBase.h Fri Nov 15 16:34:48 2013<br>
@@ -57,6 +57,7 @@ class Spiller;<br>
 /// live range splitting. They must also override enqueue/dequeue to provide an<br>
 /// assignment order.<br>
 class RegAllocBase {<br>
+  virtual void anchor();<br>
 protected:<br>
   const TargetRegisterInfo *TRI;<br>
   MachineRegisterInfo *MRI;<br>
<br>
Modified: llvm/trunk/lib/ExecutionEngine/ExecutionEngine.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/ExecutionEngine.cpp?rev=194865&r1=194864&r2=194865&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/ExecutionEngine.cpp?rev=194865&r1=194864&r2=194865&view=diff</a><br>

==============================================================================<br>
--- llvm/trunk/lib/ExecutionEngine/ExecutionEngine.cpp (original)<br>
+++ llvm/trunk/lib/ExecutionEngine/ExecutionEngine.cpp Fri Nov 15 16:34:48 2013<br>
@@ -15,6 +15,7 @@<br>
 #define DEBUG_TYPE "jit"<br>
 #include "llvm/ExecutionEngine/ExecutionEngine.h"<br>
 #include "llvm/ExecutionEngine/JITMemoryManager.h"<br>
+#include "llvm/ExecutionEngine/ObjectCache.h"<br>
 #include "llvm/ADT/SmallString.h"<br>
 #include "llvm/ADT/Statistic.h"<br>
 #include "llvm/ExecutionEngine/GenericValue.h"<br>
@@ -39,6 +40,9 @@ using namespace llvm;<br>
 STATISTIC(NumInitBytes, "Number of bytes of global vars initialized");<br>
 STATISTIC(NumGlobals  , "Number of global vars initialized");<br>
<br>
+// pin vtable to this file<br>
+void ObjectCache::anchor() {}<br>
+<br>
 ExecutionEngine *(*ExecutionEngine::JITCtor)(<br>
   Module *M,<br>
   std::string *ErrorStr,<br>
<br>
Modified: llvm/trunk/lib/ExecutionEngine/RuntimeDyld/JITRegistrar.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/RuntimeDyld/JITRegistrar.h?rev=194865&r1=194864&r2=194865&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/RuntimeDyld/JITRegistrar.h?rev=194865&r1=194864&r2=194865&view=diff</a><br>

==============================================================================<br>
--- llvm/trunk/lib/ExecutionEngine/RuntimeDyld/JITRegistrar.h (original)<br>
+++ llvm/trunk/lib/ExecutionEngine/RuntimeDyld/JITRegistrar.h Fri Nov 15 16:34:48 2013<br>
@@ -16,6 +16,7 @@ namespace llvm {<br>
<br>
 /// Global access point for the JIT debugging interface.<br>
 class JITRegistrar {<br>
+  virtual void anchor();<br>
 public:<br>
   /// Instantiates the JIT service.<br>
   JITRegistrar() {}<br>
<br>
Modified: llvm/trunk/lib/ExecutionEngine/RuntimeDyld/ObjectImageCommon.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/RuntimeDyld/ObjectImageCommon.h?rev=194865&r1=194864&r2=194865&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/RuntimeDyld/ObjectImageCommon.h?rev=194865&r1=194864&r2=194865&view=diff</a><br>

==============================================================================<br>
--- llvm/trunk/lib/ExecutionEngine/RuntimeDyld/ObjectImageCommon.h (original)<br>
+++ llvm/trunk/lib/ExecutionEngine/RuntimeDyld/ObjectImageCommon.h Fri Nov 15 16:34:48 2013<br>
@@ -23,6 +23,7 @@ namespace llvm {<br>
 class ObjectImageCommon : public ObjectImage {<br>
   ObjectImageCommon(); // = delete<br>
   ObjectImageCommon(const ObjectImageCommon &other); // = delete<br>
+  virtual void anchor();<br>
<br>
 protected:<br>
   object::ObjectFile *ObjFile;<br>
<br>
Modified: llvm/trunk/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp?rev=194865&r1=194864&r2=194865&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp?rev=194865&r1=194864&r2=194865&view=diff</a><br>

==============================================================================<br>
--- llvm/trunk/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp (original)<br>
+++ llvm/trunk/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp Fri Nov 15 16:34:48 2013<br>
@@ -13,6 +13,7 @@<br>
<br>
 #define DEBUG_TYPE "dyld"<br>
 #include "llvm/ExecutionEngine/RuntimeDyld.h"<br>
+#include "JITRegistrar.h"<br>
 #include "ObjectImageCommon.h"<br>
 #include "RuntimeDyldELF.h"<br>
 #include "RuntimeDyldImpl.h"<br>
@@ -28,6 +29,11 @@ using namespace llvm::object;<br>
 // Empty out-of-line virtual destructor as the key function.<br>
 RuntimeDyldImpl::~RuntimeDyldImpl() {}<br>
<br>
+// pin JITRegistrar.h and ObjectImage*.h vtables to this file<br>
+void JITRegistrar::anchor() {}<br>
+void ObjectImage::anchor() {}<br>
+void ObjectImageCommon::anchor() {}<br>
+<br>
 namespace llvm {<br>
<br>
 void RuntimeDyldImpl::registerEHFrames() {<br>
<br>
Modified: llvm/trunk/lib/IR/AttributeImpl.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/AttributeImpl.h?rev=194865&r1=194864&r2=194865&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/AttributeImpl.h?rev=194865&r1=194864&r2=194865&view=diff</a><br>

==============================================================================<br>
--- llvm/trunk/lib/IR/AttributeImpl.h (original)<br>
+++ llvm/trunk/lib/IR/AttributeImpl.h Fri Nov 15 16:34:48 2013<br>
@@ -46,8 +46,6 @@ protected:<br>
   AttributeImpl(AttrEntryKind KindID) : KindID(KindID) {}<br>
<br>
 public:<br>
-  virtual ~AttributeImpl();<br>
-<br>
   bool isEnumAttribute() const { return KindID == EnumAttrEntry; }<br>
   bool isAlignAttribute() const { return KindID == AlignAttrEntry; }<br>
   bool isStringAttribute() const { return KindID == StringAttrEntry; }<br>
<br>
Modified: llvm/trunk/lib/IR/Attributes.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/Attributes.cpp?rev=194865&r1=194864&r2=194865&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/Attributes.cpp?rev=194865&r1=194864&r2=194865&view=diff</a><br>

==============================================================================<br>
--- llvm/trunk/lib/IR/Attributes.cpp (original)<br>
+++ llvm/trunk/lib/IR/Attributes.cpp Fri Nov 15 16:34:48 2013<br>
@@ -286,8 +286,6 @@ bool Attribute::operator<(Attribute A) c<br>
 // AttributeImpl Definition<br>
 //===----------------------------------------------------------------------===//<br>
<br>
-AttributeImpl::~AttributeImpl() {}<br>
-<br>
 bool AttributeImpl::hasAttribute(Attribute::AttrKind A) const {<br>
   if (isStringAttribute()) return false;<br>
   return getKindAsEnum() == A;<br>
<br>
Modified: llvm/trunk/lib/IR/Metadata.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/Metadata.cpp?rev=194865&r1=194864&r2=194865&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/Metadata.cpp?rev=194865&r1=194864&r2=194865&view=diff</a><br>

==============================================================================<br>
--- llvm/trunk/lib/IR/Metadata.cpp (original)<br>
+++ llvm/trunk/lib/IR/Metadata.cpp Fri Nov 15 16:34:48 2013<br>
@@ -65,7 +65,7 @@ class MDNodeOperand : public CallbackVH<br>
<br>
 public:<br>
   MDNodeOperand(Value *V) : CallbackVH(V) {}<br>
-  ~MDNodeOperand() {}<br>
+  virtual ~MDNodeOperand();<br>
<br>
   void set(Value *V) {<br>
     unsigned IsFirst = this->getValPtrInt();<br>
@@ -82,6 +82,8 @@ public:<br>
 };<br>
 } // end namespace llvm.<br>
<br>
+MDNodeOperand::~MDNodeOperand() {}<br>
+<br>
<br>
 void MDNodeOperand::deleted() {<br>
   getParent()->replaceOperand(this, 0);<br>
<br>
Modified: llvm/trunk/lib/IR/Value.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/Value.cpp?rev=194865&r1=194864&r2=194865&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/Value.cpp?rev=194865&r1=194864&r2=194865&view=diff</a><br>

==============================================================================<br>
--- llvm/trunk/lib/IR/Value.cpp (original)<br>
+++ llvm/trunk/lib/IR/Value.cpp Fri Nov 15 16:34:48 2013<br>
@@ -735,9 +735,5 @@ void ValueHandleBase::ValueIsRAUWd(Value<br>
 #endif<br>
 }<br>
<br>
-// Default implementation for CallbackVH.<br>
-void CallbackVH::allUsesReplacedWith(Value *) {}<br>
-<br>
-void CallbackVH::deleted() {<br>
-  setValPtr(NULL);<br>
-}<br>
+// pin vtable to this file<br>
+void CallbackVH::anchor() {}<br>
<br>
Modified: llvm/trunk/lib/MC/MCAtom.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCAtom.cpp?rev=194865&r1=194864&r2=194865&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCAtom.cpp?rev=194865&r1=194864&r2=194865&view=diff</a><br>

==============================================================================<br>
--- llvm/trunk/lib/MC/MCAtom.cpp (original)<br>
+++ llvm/trunk/lib/MC/MCAtom.cpp Fri Nov 15 16:34:48 2013<br>
@@ -14,6 +14,9 @@<br>
<br>
 using namespace llvm;<br>
<br>
+// pin vtable to this file<br>
+void MCAtom::anchor() {}<br>
+<br>
 void MCAtom::remap(uint64_t NewBegin, uint64_t NewEnd) {<br>
   Parent->remap(this, NewBegin, NewEnd);<br>
 }<br>
<br>
Modified: llvm/trunk/lib/MC/MCStreamer.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCStreamer.cpp?rev=194865&r1=194864&r2=194865&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCStreamer.cpp?rev=194865&r1=194864&r2=194865&view=diff</a><br>

==============================================================================<br>
--- llvm/trunk/lib/MC/MCStreamer.cpp (original)<br>
+++ llvm/trunk/lib/MC/MCStreamer.cpp Fri Nov 15 16:34:48 2013<br>
@@ -22,7 +22,9 @@<br>
 #include <cstdlib><br>
 using namespace llvm;<br>
<br>
+// pin vtables to this file<br>
 MCTargetStreamer::~MCTargetStreamer() {}<br>
+void ARMTargetStreamer::anchor() {}<br>
<br>
 MCStreamer::MCStreamer(MCContext &Ctx, MCTargetStreamer *TargetStreamer)<br>
     : Context(Ctx), TargetStreamer(TargetStreamer), EmitEHFrame(true),<br>
<br>
Modified: llvm/trunk/lib/MC/WinCOFFObjectWriter.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/WinCOFFObjectWriter.cpp?rev=194865&r1=194864&r2=194865&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/WinCOFFObjectWriter.cpp?rev=194865&r1=194864&r2=194865&view=diff</a><br>

==============================================================================<br>
--- llvm/trunk/lib/MC/WinCOFFObjectWriter.cpp (original)<br>
+++ llvm/trunk/lib/MC/WinCOFFObjectWriter.cpp Fri Nov 15 16:34:48 2013<br>
@@ -138,7 +138,7 @@ public:<br>
   symbol_map  SymbolMap;<br>
<br>
   WinCOFFObjectWriter(MCWinCOFFObjectTargetWriter *MOTW, raw_ostream &OS);<br>
-  ~WinCOFFObjectWriter();<br>
+  virtual ~WinCOFFObjectWriter();<br>
<br>
   COFFSymbol *createSymbol(StringRef Name);<br>
   COFFSymbol *GetOrCreateCOFFSymbol(const MCSymbol * Symbol);<br>
@@ -898,6 +898,9 @@ MCWinCOFFObjectTargetWriter::MCWinCOFFOb<br>
   Machine(Machine_) {<br>
 }<br>
<br>
+// pin vtable to this file<br>
+void MCWinCOFFObjectTargetWriter::anchor() {}<br>
+<br>
 //------------------------------------------------------------------------------<br>
 // WinCOFFObjectWriter factory function<br>
<br>
<br>
Modified: llvm/trunk/lib/Support/CommandLine.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/CommandLine.cpp?rev=194865&r1=194864&r2=194865&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/CommandLine.cpp?rev=194865&r1=194864&r2=194865&view=diff</a><br>

==============================================================================<br>
--- llvm/trunk/lib/Support/CommandLine.cpp (original)<br>
+++ llvm/trunk/lib/Support/CommandLine.cpp Fri Nov 15 16:34:48 2013<br>
@@ -60,6 +60,7 @@ TEMPLATE_INSTANTIATION(class opt<char>);<br>
 TEMPLATE_INSTANTIATION(class opt<bool>);<br>
 } } // end namespace llvm::cl<br>
<br>
+void GenericOptionValue::anchor() {}<br>
 void OptionValue<boolOrDefault>::anchor() {}<br>
 void OptionValue<std::string>::anchor() {}<br>
 void Option::anchor() {}<br>
@@ -73,6 +74,7 @@ void parser<double>::anchor() {}<br>
 void parser<float>::anchor() {}<br>
 void parser<std::string>::anchor() {}<br>
 void parser<char>::anchor() {}<br>
+void StringSaver::anchor() {}<br>
<br>
 //===----------------------------------------------------------------------===//<br>
<br>
<br>
Modified: llvm/trunk/lib/Support/ErrorHandling.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/ErrorHandling.cpp?rev=194865&r1=194864&r2=194865&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/ErrorHandling.cpp?rev=194865&r1=194864&r2=194865&view=diff</a><br>

==============================================================================<br>
--- llvm/trunk/lib/Support/ErrorHandling.cpp (original)<br>
+++ llvm/trunk/lib/Support/ErrorHandling.cpp Fri Nov 15 16:34:48 2013<br>
@@ -17,6 +17,7 @@<br>
 #include "llvm/ADT/Twine.h"<br>
 #include "llvm/Config/config.h"<br>
 #include "llvm/Support/Debug.h"<br>
+#include "llvm/Support/ErrorOr.h"<br>
 #include "llvm/Support/Signals.h"<br>
 #include "llvm/Support/Threading.h"<br>
 #include "llvm/Support/raw_ostream.h"<br>
@@ -119,3 +120,4 @@ void LLVMInstallFatalErrorHandler(LLVMFa<br>
 void LLVMResetFatalErrorHandler() {<br>
   remove_fatal_error_handler();<br>
 }<br>
+<br>
<br>
Modified: llvm/trunk/lib/Support/YAMLParser.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/YAMLParser.cpp?rev=194865&r1=194864&r2=194865&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/YAMLParser.cpp?rev=194865&r1=194864&r2=194865&view=diff</a><br>

==============================================================================<br>
--- llvm/trunk/lib/Support/YAMLParser.cpp (original)<br>
+++ llvm/trunk/lib/Support/YAMLParser.cpp Fri Nov 15 16:34:48 2013<br>
@@ -96,6 +96,15 @@ static EncodingInfo getUnicodeEncoding(S<br>
<br>
 namespace llvm {<br>
 namespace yaml {<br>
+/// pin the vtables to this file<br>
+void Node::anchor() {}<br>
+void NullNode::anchor() {}<br>
+void ScalarNode::anchor() {}<br>
+void KeyValueNode::anchor() {}<br>
+void MappingNode::anchor() {}<br>
+void SequenceNode::anchor() {}<br>
+void AliasNode::anchor() {}<br>
+<br>
 /// Token - A single YAML token.<br>
 struct Token : ilist_node<Token> {<br>
   enum TokenKind {<br>
<br>
Modified: llvm/trunk/lib/Support/YAMLTraits.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/YAMLTraits.cpp?rev=194865&r1=194864&r2=194865&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/YAMLTraits.cpp?rev=194865&r1=194864&r2=194865&view=diff</a><br>

==============================================================================<br>
--- llvm/trunk/lib/Support/YAMLTraits.cpp (original)<br>
+++ llvm/trunk/lib/Support/YAMLTraits.cpp Fri Nov 15 16:34:48 2013<br>
@@ -59,6 +59,13 @@ void Input::setDiagHandler(SourceMgr::Di<br>
   SrcMgr.setDiagHandler(Handler, Ctxt);<br>
 }<br>
<br>
+/// pin the vtables to this file<br>
+void Input::HNode::anchor() {}<br>
+void Input::EmptyHNode::anchor() {}<br>
+void Input::ScalarHNode::anchor() {}<br>
+void Input::MapHNode::anchor() {}<br>
+void Input::SequenceHNode::anchor() {}<br>
+<br>
 bool Input::outputting() const {<br>
   return false;<br>
 }<br>
<br>
Modified: llvm/trunk/lib/Target/AArch64/AArch64InstrInfo.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AArch64/AArch64InstrInfo.cpp?rev=194865&r1=194864&r2=194865&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AArch64/AArch64InstrInfo.cpp?rev=194865&r1=194864&r2=194865&view=diff</a><br>

==============================================================================<br>
--- llvm/trunk/lib/Target/AArch64/AArch64InstrInfo.cpp (original)<br>
+++ llvm/trunk/lib/Target/AArch64/AArch64InstrInfo.cpp Fri Nov 15 16:34:48 2013<br>
@@ -29,7 +29,7 @@<br>
<br>
 #include <algorithm><br>
<br>
-#define GET_INSTRINFO_CTOR<br>
+#define GET_INSTRINFO_CTOR_DTOR<br>
 #include "AArch64GenInstrInfo.inc"<br>
<br>
 using namespace llvm;<br>
<br>
Modified: llvm/trunk/lib/Target/AArch64/AArch64Subtarget.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AArch64/AArch64Subtarget.cpp?rev=194865&r1=194864&r2=194865&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AArch64/AArch64Subtarget.cpp?rev=194865&r1=194864&r2=194865&view=diff</a><br>

==============================================================================<br>
--- llvm/trunk/lib/Target/AArch64/AArch64Subtarget.cpp (original)<br>
+++ llvm/trunk/lib/Target/AArch64/AArch64Subtarget.cpp Fri Nov 15 16:34:48 2013<br>
@@ -25,6 +25,9 @@<br>
<br>
 using namespace llvm;<br>
<br>
+// pin vtable to this file<br>
+void AArch64Subtarget::anchor() {}<br>
+<br>
 AArch64Subtarget::AArch64Subtarget(StringRef TT, StringRef CPU, StringRef FS)<br>
     : AArch64GenSubtargetInfo(TT, CPU, FS), HasFPARMv8(false), HasNEON(false),<br>
       HasCrypto(false), TargetTriple(TT), CPUString(CPU) {<br>
<br>
Modified: llvm/trunk/lib/Target/AArch64/AArch64Subtarget.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AArch64/AArch64Subtarget.h?rev=194865&r1=194864&r2=194865&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AArch64/AArch64Subtarget.h?rev=194865&r1=194864&r2=194865&view=diff</a><br>

==============================================================================<br>
--- llvm/trunk/lib/Target/AArch64/AArch64Subtarget.h (original)<br>
+++ llvm/trunk/lib/Target/AArch64/AArch64Subtarget.h Fri Nov 15 16:34:48 2013<br>
@@ -27,6 +27,7 @@ class StringRef;<br>
 class GlobalValue;<br>
<br>
 class AArch64Subtarget : public AArch64GenSubtargetInfo {<br>
+  virtual void anchor();<br>
 protected:<br>
   bool HasFPARMv8;<br>
   bool HasNEON;<br>
<br>
Modified: llvm/trunk/lib/Target/AArch64/MCTargetDesc/AArch64MCAsmInfo.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AArch64/MCTargetDesc/AArch64MCAsmInfo.cpp?rev=194865&r1=194864&r2=194865&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AArch64/MCTargetDesc/AArch64MCAsmInfo.cpp?rev=194865&r1=194864&r2=194865&view=diff</a><br>

==============================================================================<br>
--- llvm/trunk/lib/Target/AArch64/MCTargetDesc/AArch64MCAsmInfo.cpp (original)<br>
+++ llvm/trunk/lib/Target/AArch64/MCTargetDesc/AArch64MCAsmInfo.cpp Fri Nov 15 16:34:48 2013<br>
@@ -37,3 +37,5 @@ AArch64ELFMCAsmInfo::AArch64ELFMCAsmInfo<br>
   // Exceptions handling<br>
   ExceptionsType = ExceptionHandling::DwarfCFI;<br>
 }<br>
+<br>
+void AArch64ELFMCAsmInfo::anchor() {}<br>
<br>
Modified: llvm/trunk/lib/Target/AArch64/MCTargetDesc/AArch64MCAsmInfo.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AArch64/MCTargetDesc/AArch64MCAsmInfo.h?rev=194865&r1=194864&r2=194865&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AArch64/MCTargetDesc/AArch64MCAsmInfo.h?rev=194865&r1=194864&r2=194865&view=diff</a><br>

==============================================================================<br>
--- llvm/trunk/lib/Target/AArch64/MCTargetDesc/AArch64MCAsmInfo.h (original)<br>
+++ llvm/trunk/lib/Target/AArch64/MCTargetDesc/AArch64MCAsmInfo.h Fri Nov 15 16:34:48 2013<br>
@@ -18,9 +18,12 @@<br>
<br>
 namespace llvm {<br>
<br>
-  struct AArch64ELFMCAsmInfo : public MCAsmInfoELF {<br>
-    explicit AArch64ELFMCAsmInfo();<br>
-  };<br>
+struct AArch64ELFMCAsmInfo : public MCAsmInfoELF {<br>
+  explicit AArch64ELFMCAsmInfo();<br>
+<br>
+private:<br>
+  virtual void anchor();<br>
+};<br>
<br>
 } // namespace llvm<br>
<br>
<br>
Modified: llvm/trunk/lib/Target/ARM/ARMBaseInstrInfo.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMBaseInstrInfo.cpp?rev=194865&r1=194864&r2=194865&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMBaseInstrInfo.cpp?rev=194865&r1=194864&r2=194865&view=diff</a><br>

==============================================================================<br>
--- llvm/trunk/lib/Target/ARM/ARMBaseInstrInfo.cpp (original)<br>
+++ llvm/trunk/lib/Target/ARM/ARMBaseInstrInfo.cpp Fri Nov 15 16:34:48 2013<br>
@@ -37,7 +37,7 @@<br>
 #include "llvm/Support/Debug.h"<br>
 #include "llvm/Support/ErrorHandling.h"<br>
<br>
-#define GET_INSTRINFO_CTOR<br>
+#define GET_INSTRINFO_CTOR_DTOR<br>
 #include "ARMGenInstrInfo.inc"<br>
<br>
 using namespace llvm;<br>
<br>
Modified: llvm/trunk/lib/Target/Hexagon/CMakeLists.txt<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Hexagon/CMakeLists.txt?rev=194865&r1=194864&r2=194865&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Hexagon/CMakeLists.txt?rev=194865&r1=194864&r2=194865&view=diff</a><br>

==============================================================================<br>
--- llvm/trunk/lib/Target/Hexagon/CMakeLists.txt (original)<br>
+++ llvm/trunk/lib/Target/Hexagon/CMakeLists.txt Fri Nov 15 16:34:48 2013<br>
@@ -17,6 +17,7 @@ add_llvm_target(HexagonCodeGen<br>
   HexagonFrameLowering.cpp<br>
   HexagonHardwareLoops.cpp<br>
   HexagonFixupHwLoops.cpp<br>
+  HexagonMachineFunctionInfo.cpp<br>
   HexagonMachineScheduler.cpp<br>
   HexagonMCInstLower.cpp<br>
   HexagonInstrInfo.cpp<br>
<br>
Modified: llvm/trunk/lib/Target/Hexagon/HexagonInstrInfo.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Hexagon/HexagonInstrInfo.cpp?rev=194865&r1=194864&r2=194865&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Hexagon/HexagonInstrInfo.cpp?rev=194865&r1=194864&r2=194865&view=diff</a><br>

==============================================================================<br>
--- llvm/trunk/lib/Target/Hexagon/HexagonInstrInfo.cpp (original)<br>
+++ llvm/trunk/lib/Target/Hexagon/HexagonInstrInfo.cpp Fri Nov 15 16:34:48 2013<br>
@@ -26,7 +26,7 @@<br>
 #include "llvm/Support/Debug.h"<br>
 #include "llvm/Support/MathExtras.h"<br>
 #include "llvm/Support/raw_ostream.h"<br>
-#define GET_INSTRINFO_CTOR<br>
+#define GET_INSTRINFO_CTOR_DTOR<br>
 #define GET_INSTRMAP_INFO<br>
 #include "HexagonGenInstrInfo.inc"<br>
 #include "HexagonGenDFAPacketizer.inc"<br>
@@ -55,6 +55,8 @@ const int Hexagon_MEMH_AUTOINC_MIN = -16<br>
 const int Hexagon_MEMB_AUTOINC_MAX = 7;<br>
 const int Hexagon_MEMB_AUTOINC_MIN = -8;<br>
<br>
+// pin vtable to this file<br>
+void HexagonInstrInfo::anchor() {}<br>
<br>
 HexagonInstrInfo::HexagonInstrInfo(HexagonSubtarget &ST)<br>
   : HexagonGenInstrInfo(Hexagon::ADJCALLSTACKDOWN, Hexagon::ADJCALLSTACKUP),<br>
<br>
Modified: llvm/trunk/lib/Target/Hexagon/HexagonInstrInfo.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Hexagon/HexagonInstrInfo.h?rev=194865&r1=194864&r2=194865&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Hexagon/HexagonInstrInfo.h?rev=194865&r1=194864&r2=194865&view=diff</a><br>

==============================================================================<br>
--- llvm/trunk/lib/Target/Hexagon/HexagonInstrInfo.h (original)<br>
+++ llvm/trunk/lib/Target/Hexagon/HexagonInstrInfo.h Fri Nov 15 16:34:48 2013<br>
@@ -30,6 +30,8 @@ class HexagonInstrInfo : public HexagonG<br>
   const HexagonSubtarget &Subtarget;<br>
   typedef unsigned Opcode_t;<br>
<br>
+  virtual void anchor();<br>
+<br>
 public:<br>
   explicit HexagonInstrInfo(HexagonSubtarget &ST);<br>
<br>
<br>
Copied: llvm/trunk/lib/Target/Hexagon/HexagonMachineFunctionInfo.cpp (from r194862, llvm/trunk/lib/Target/R600/R600MachineFunctionInfo.cpp)<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Hexagon/HexagonMachineFunctionInfo.cpp?p2=llvm/trunk/lib/Target/Hexagon/HexagonMachineFunctionInfo.cpp&p1=llvm/trunk/lib/Target/R600/R600MachineFunctionInfo.cpp&r1=194862&r2=194865&rev=194865&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Hexagon/HexagonMachineFunctionInfo.cpp?p2=llvm/trunk/lib/Target/Hexagon/HexagonMachineFunctionInfo.cpp&p1=llvm/trunk/lib/Target/R600/R600MachineFunctionInfo.cpp&r1=194862&r2=194865&rev=194865&view=diff</a><br>

==============================================================================<br>
--- llvm/trunk/lib/Target/R600/R600MachineFunctionInfo.cpp (original)<br>
+++ llvm/trunk/lib/Target/Hexagon/HexagonMachineFunctionInfo.cpp Fri Nov 15 16:34:48 2013<br>
@@ -1,18 +1,16 @@<br>
-//===-- R600MachineFunctionInfo.cpp - R600 Machine Function Info-*- C++ -*-===//<br>
+//= HexagonMachineFunctionInfo.cpp - Hexagon machine function info *- C++ -*-=//<br>
 //<br>
 //                     The LLVM Compiler Infrastructure<br>
 //<br>
 // This file is distributed under the University of Illinois Open Source<br>
 // License. See LICENSE.TXT for details.<br>
 //<br>
-/// \file<br>
 //===----------------------------------------------------------------------===//<br>
<br>
-#include "R600MachineFunctionInfo.h"<br>
+#include "HexagonMachineFunctionInfo.h"<br>
<br>
 using namespace llvm;<br>
<br>
-R600MachineFunctionInfo::R600MachineFunctionInfo(const MachineFunction &MF)<br>
-  : AMDGPUMachineFunction(MF) { }<br>
-<br>
+// pin vtable to this file<br>
+void HexagonMachineFunctionInfo::anchor() {}<br>
<br>
<br>
Modified: llvm/trunk/lib/Target/Hexagon/HexagonMachineFunctionInfo.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Hexagon/HexagonMachineFunctionInfo.h?rev=194865&r1=194864&r2=194865&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Hexagon/HexagonMachineFunctionInfo.h?rev=194865&r1=194864&r2=194865&view=diff</a><br>

==============================================================================<br>
--- llvm/trunk/lib/Target/Hexagon/HexagonMachineFunctionInfo.h (original)<br>
+++ llvm/trunk/lib/Target/Hexagon/HexagonMachineFunctionInfo.h Fri Nov 15 16:34:48 2013<br>
@@ -1,4 +1,4 @@<br>
-//=- HexagonMachineFuctionInfo.h - Hexagon machine function info --*- C++ -*-=//<br>
+//=- HexagonMachineFunctionInfo.h - Hexagon machine function info -*- C++ -*-=//<br>
 //<br>
 //                     The LLVM Compiler Infrastructure<br>
 //<br>
@@ -10,6 +10,7 @@<br>
 #ifndef HexagonMACHINEFUNCTIONINFO_H<br>
 #define HexagonMACHINEFUNCTIONINFO_H<br>
<br>
+#include <map><br>
 #include "llvm/CodeGen/MachineFunction.h"<br>
<br>
 namespace llvm {<br>
@@ -33,6 +34,7 @@ class HexagonMachineFunctionInfo : publi<br>
<br>
   std::map<const MachineInstr*, unsigned> PacketInfo;<br>
<br>
+  virtual void anchor();<br>
<br>
 public:<br>
   HexagonMachineFunctionInfo() : SRetReturnReg(0), HasClobberLR(0),<br>
<br>
Modified: llvm/trunk/lib/Target/Hexagon/HexagonSubtarget.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Hexagon/HexagonSubtarget.cpp?rev=194865&r1=194864&r2=194865&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Hexagon/HexagonSubtarget.cpp?rev=194865&r1=194864&r2=194865&view=diff</a><br>

==============================================================================<br>
--- llvm/trunk/lib/Target/Hexagon/HexagonSubtarget.cpp (original)<br>
+++ llvm/trunk/lib/Target/Hexagon/HexagonSubtarget.cpp Fri Nov 15 16:34:48 2013<br>
@@ -86,3 +86,4 @@ HexagonSubtarget::HexagonSubtarget(Strin<br>
     ModeIEEERndNear = false;<br>
 }<br>
<br>
+HexagonSubtarget::~HexagonSubtarget() {}<br>
<br>
Modified: llvm/trunk/lib/Target/Hexagon/HexagonSubtarget.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Hexagon/HexagonSubtarget.h?rev=194865&r1=194864&r2=194865&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Hexagon/HexagonSubtarget.h?rev=194865&r1=194864&r2=194865&view=diff</a><br>

==============================================================================<br>
--- llvm/trunk/lib/Target/Hexagon/HexagonSubtarget.h (original)<br>
+++ llvm/trunk/lib/Target/Hexagon/HexagonSubtarget.h Fri Nov 15 16:34:48 2013<br>
@@ -42,6 +42,7 @@ public:<br>
<br>
 public:<br>
   HexagonSubtarget(StringRef TT, StringRef CPU, StringRef FS);<br>
+  virtual ~HexagonSubtarget();<br>
<br>
   /// getInstrItins - Return the instruction itineraies based on subtarget<br>
   /// selection.<br>
<br>
Modified: llvm/trunk/lib/Target/Hexagon/MCTargetDesc/HexagonMCAsmInfo.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Hexagon/MCTargetDesc/HexagonMCAsmInfo.cpp?rev=194865&r1=194864&r2=194865&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Hexagon/MCTargetDesc/HexagonMCAsmInfo.cpp?rev=194865&r1=194864&r2=194865&view=diff</a><br>

==============================================================================<br>
--- llvm/trunk/lib/Target/Hexagon/MCTargetDesc/HexagonMCAsmInfo.cpp (original)<br>
+++ llvm/trunk/lib/Target/Hexagon/MCTargetDesc/HexagonMCAsmInfo.cpp Fri Nov 15 16:34:48 2013<br>
@@ -15,6 +15,9 @@<br>
<br>
 using namespace llvm;<br>
<br>
+// pin vtable to this file<br>
+void HexagonMCAsmInfo::anchor() {}<br>
+<br>
 HexagonMCAsmInfo::HexagonMCAsmInfo(StringRef TT) {<br>
   Data16bitsDirective = "\t.half\t";<br>
   Data32bitsDirective = "\t.word\t";<br>
<br>
Modified: llvm/trunk/lib/Target/Hexagon/MCTargetDesc/HexagonMCAsmInfo.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Hexagon/MCTargetDesc/HexagonMCAsmInfo.h?rev=194865&r1=194864&r2=194865&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Hexagon/MCTargetDesc/HexagonMCAsmInfo.h?rev=194865&r1=194864&r2=194865&view=diff</a><br>

==============================================================================<br>
--- llvm/trunk/lib/Target/Hexagon/MCTargetDesc/HexagonMCAsmInfo.h (original)<br>
+++ llvm/trunk/lib/Target/Hexagon/MCTargetDesc/HexagonMCAsmInfo.h Fri Nov 15 16:34:48 2013<br>
@@ -19,6 +19,7 @@<br>
<br>
 namespace llvm {<br>
   class HexagonMCAsmInfo : public MCAsmInfoELF {<br>
+    virtual void anchor();<br>
   public:<br>
     explicit HexagonMCAsmInfo(StringRef TT);<br>
   };<br>
<br>
Modified: llvm/trunk/lib/Target/MSP430/MSP430InstrInfo.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/MSP430/MSP430InstrInfo.cpp?rev=194865&r1=194864&r2=194865&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/MSP430/MSP430InstrInfo.cpp?rev=194865&r1=194864&r2=194865&view=diff</a><br>

==============================================================================<br>
--- llvm/trunk/lib/Target/MSP430/MSP430InstrInfo.cpp (original)<br>
+++ llvm/trunk/lib/Target/MSP430/MSP430InstrInfo.cpp Fri Nov 15 16:34:48 2013<br>
@@ -22,11 +22,14 @@<br>
 #include "llvm/Support/ErrorHandling.h"<br>
 #include "llvm/Support/TargetRegistry.h"<br>
<br>
-#define GET_INSTRINFO_CTOR<br>
+#define GET_INSTRINFO_CTOR_DTOR<br>
 #include "MSP430GenInstrInfo.inc"<br>
<br>
 using namespace llvm;<br>
<br>
+// pin vtable to this file<br>
+void MSP430InstrInfo::anchor() {}<br>
+<br>
 MSP430InstrInfo::MSP430InstrInfo(MSP430TargetMachine &tm)<br>
   : MSP430GenInstrInfo(MSP430::ADJCALLSTACKDOWN, MSP430::ADJCALLSTACKUP),<br>
     RI(tm) {}<br>
<br>
Modified: llvm/trunk/lib/Target/MSP430/MSP430InstrInfo.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/MSP430/MSP430InstrInfo.h?rev=194865&r1=194864&r2=194865&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/MSP430/MSP430InstrInfo.h?rev=194865&r1=194864&r2=194865&view=diff</a><br>

==============================================================================<br>
--- llvm/trunk/lib/Target/MSP430/MSP430InstrInfo.h (original)<br>
+++ llvm/trunk/lib/Target/MSP430/MSP430InstrInfo.h Fri Nov 15 16:34:48 2013<br>
@@ -42,6 +42,7 @@ namespace MSP430II {<br>
<br>
 class MSP430InstrInfo : public MSP430GenInstrInfo {<br>
   const MSP430RegisterInfo RI;<br>
+  virtual void anchor();<br>
 public:<br>
   explicit MSP430InstrInfo(MSP430TargetMachine &TM);<br>
<br>
<br>
Modified: llvm/trunk/lib/Target/Mips/MCTargetDesc/MipsMCTargetDesc.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/MCTargetDesc/MipsMCTargetDesc.cpp?rev=194865&r1=194864&r2=194865&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/MCTargetDesc/MipsMCTargetDesc.cpp?rev=194865&r1=194864&r2=194865&view=diff</a><br>

==============================================================================<br>
--- llvm/trunk/lib/Target/Mips/MCTargetDesc/MipsMCTargetDesc.cpp (original)<br>
+++ llvm/trunk/lib/Target/Mips/MCTargetDesc/MipsMCTargetDesc.cpp Fri Nov 15 16:34:48 2013<br>
@@ -42,6 +42,9 @@ using namespace llvm;<br>
 static cl::opt<bool> PrintHackDirectives("print-hack-directives",<br>
                                          cl::init(false), cl::Hidden);<br>
<br>
+// pin vtable to this file<br>
+void MipsTargetStreamer::anchor() {}<br>
+<br>
 static std::string ParseMipsTriple(StringRef TT, StringRef CPU) {<br>
   std::string MipsArchFeature;<br>
   size_t DashPosition = 0;<br>
<br>
Modified: llvm/trunk/lib/Target/Mips/MipsInstrInfo.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/MipsInstrInfo.cpp?rev=194865&r1=194864&r2=194865&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/MipsInstrInfo.cpp?rev=194865&r1=194864&r2=194865&view=diff</a><br>

==============================================================================<br>
--- llvm/trunk/lib/Target/Mips/MipsInstrInfo.cpp (original)<br>
+++ llvm/trunk/lib/Target/Mips/MipsInstrInfo.cpp Fri Nov 15 16:34:48 2013<br>
@@ -22,11 +22,14 @@<br>
 #include "llvm/Support/ErrorHandling.h"<br>
 #include "llvm/Support/TargetRegistry.h"<br>
<br>
-#define GET_INSTRINFO_CTOR<br>
+#define GET_INSTRINFO_CTOR_DTOR<br>
 #include "MipsGenInstrInfo.inc"<br>
<br>
 using namespace llvm;<br>
<br>
+// pin vtable to this file<br>
+void MipsInstrInfo::anchor() {}<br>
+<br>
 MipsInstrInfo::MipsInstrInfo(MipsTargetMachine &tm, unsigned UncondBr)<br>
   : MipsGenInstrInfo(Mips::ADJCALLSTACKDOWN, Mips::ADJCALLSTACKUP),<br>
     TM(tm), UncondBrOpc(UncondBr) {}<br>
<br>
Modified: llvm/trunk/lib/Target/Mips/MipsInstrInfo.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/MipsInstrInfo.h?rev=194865&r1=194864&r2=194865&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/MipsInstrInfo.h?rev=194865&r1=194864&r2=194865&view=diff</a><br>

==============================================================================<br>
--- llvm/trunk/lib/Target/Mips/MipsInstrInfo.h (original)<br>
+++ llvm/trunk/lib/Target/Mips/MipsInstrInfo.h Fri Nov 15 16:34:48 2013<br>
@@ -27,6 +27,7 @@<br>
 namespace llvm {<br>
<br>
 class MipsInstrInfo : public MipsGenInstrInfo {<br>
+  virtual void anchor();<br>
 protected:<br>
   MipsTargetMachine &TM;<br>
   unsigned UncondBrOpc;<br>
<br>
Modified: llvm/trunk/lib/Target/Mips/MipsTargetStreamer.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/MipsTargetStreamer.h?rev=194865&r1=194864&r2=194865&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/MipsTargetStreamer.h?rev=194865&r1=194864&r2=194865&view=diff</a><br>

==============================================================================<br>
--- llvm/trunk/lib/Target/Mips/MipsTargetStreamer.h (original)<br>
+++ llvm/trunk/lib/Target/Mips/MipsTargetStreamer.h Fri Nov 15 16:34:48 2013<br>
@@ -14,6 +14,7 @@<br>
<br>
 namespace llvm {<br>
 class MipsTargetStreamer : public MCTargetStreamer {<br>
+  virtual void anchor();<br>
 public:<br>
   virtual void emitMipsHackELFFlags(unsigned Flags) = 0;<br>
   virtual void emitMipsHackSTOCG(MCSymbol *Sym, unsigned Val) = 0;<br>
<br>
Modified: llvm/trunk/lib/Target/NVPTX/NVPTXISelLowering.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/NVPTX/NVPTXISelLowering.cpp?rev=194865&r1=194864&r2=194865&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/NVPTX/NVPTXISelLowering.cpp?rev=194865&r1=194864&r2=194865&view=diff</a><br>

==============================================================================<br>
--- llvm/trunk/lib/Target/NVPTX/NVPTXISelLowering.cpp (original)<br>
+++ llvm/trunk/lib/Target/NVPTX/NVPTXISelLowering.cpp Fri Nov 15 16:34:48 2013<br>
@@ -2288,3 +2288,29 @@ void NVPTXTargetLowering::ReplaceNodeRes<br>
     return;<br>
   }<br>
 }<br>
+<br>
+// pin NVPTXSection.h and NVPTXTargetObjectFile.h vtables to this file<br>
+void NVPTXSection::anchor() {}<br>
+<br>
+NVPTXTargetObjectFile::~NVPTXTargetObjectFile() {<br>
+  delete TextSection;<br>
+  delete DataSection;<br>
+  delete BSSSection;<br>
+  delete ReadOnlySection;<br>
+<br>
+  delete StaticCtorSection;<br>
+  delete StaticDtorSection;<br>
+  delete LSDASection;<br>
+  delete EHFrameSection;<br>
+  delete DwarfAbbrevSection;<br>
+  delete DwarfInfoSection;<br>
+  delete DwarfLineSection;<br>
+  delete DwarfFrameSection;<br>
+  delete DwarfPubTypesSection;<br>
+  delete DwarfDebugInlineSection;<br>
+  delete DwarfStrSection;<br>
+  delete DwarfLocSection;<br>
+  delete DwarfARangesSection;<br>
+  delete DwarfRangesSection;<br>
+  delete DwarfMacroInfoSection;<br>
+}<br>
<br>
Modified: llvm/trunk/lib/Target/NVPTX/NVPTXInstrInfo.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/NVPTX/NVPTXInstrInfo.cpp?rev=194865&r1=194864&r2=194865&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/NVPTX/NVPTXInstrInfo.cpp?rev=194865&r1=194864&r2=194865&view=diff</a><br>

==============================================================================<br>
--- llvm/trunk/lib/Target/NVPTX/NVPTXInstrInfo.cpp (original)<br>
+++ llvm/trunk/lib/Target/NVPTX/NVPTXInstrInfo.cpp Fri Nov 15 16:34:48 2013<br>
@@ -14,7 +14,7 @@<br>
 #include "NVPTX.h"<br>
 #include "NVPTXInstrInfo.h"<br>
 #include "NVPTXTargetMachine.h"<br>
-#define GET_INSTRINFO_CTOR<br>
+#define GET_INSTRINFO_CTOR_DTOR<br>
 #include "NVPTXGenInstrInfo.inc"<br>
 #include "llvm/IR/Function.h"<br>
 #include "llvm/ADT/STLExtras.h"<br>
@@ -24,6 +24,9 @@<br>
<br>
 using namespace llvm;<br>
<br>
+// pin vtable to this file<br>
+void NVPTXInstrInfo::anchor() {}<br>
+<br>
 // FIXME: Add the subtarget support on this constructor.<br>
 NVPTXInstrInfo::NVPTXInstrInfo(NVPTXTargetMachine &tm)<br>
     : NVPTXGenInstrInfo(), TM(tm), RegInfo(*TM.getSubtargetImpl()) {}<br>
<br>
Modified: llvm/trunk/lib/Target/NVPTX/NVPTXInstrInfo.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/NVPTX/NVPTXInstrInfo.h?rev=194865&r1=194864&r2=194865&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/NVPTX/NVPTXInstrInfo.h?rev=194865&r1=194864&r2=194865&view=diff</a><br>

==============================================================================<br>
--- llvm/trunk/lib/Target/NVPTX/NVPTXInstrInfo.h (original)<br>
+++ llvm/trunk/lib/Target/NVPTX/NVPTXInstrInfo.h Fri Nov 15 16:34:48 2013<br>
@@ -26,6 +26,7 @@ namespace llvm {<br>
 class NVPTXInstrInfo : public NVPTXGenInstrInfo {<br>
   NVPTXTargetMachine &TM;<br>
   const NVPTXRegisterInfo RegInfo;<br>
+  virtual void anchor();<br>
 public:<br>
   explicit NVPTXInstrInfo(NVPTXTargetMachine &TM);<br>
<br>
<br>
Modified: llvm/trunk/lib/Target/NVPTX/NVPTXSection.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/NVPTX/NVPTXSection.h?rev=194865&r1=194864&r2=194865&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/NVPTX/NVPTXSection.h?rev=194865&r1=194864&r2=194865&view=diff</a><br>

==============================================================================<br>
--- llvm/trunk/lib/Target/NVPTX/NVPTXSection.h (original)<br>
+++ llvm/trunk/lib/Target/NVPTX/NVPTXSection.h Fri Nov 15 16:34:48 2013<br>
@@ -24,10 +24,10 @@ namespace llvm {<br>
 /// the ASMPrint interface.<br>
 ///<br>
 class NVPTXSection : public MCSection {<br>
-<br>
+  virtual void anchor();<br>
 public:<br>
   NVPTXSection(SectionVariant V, SectionKind K) : MCSection(V, K) {}<br>
-  ~NVPTXSection() {}<br>
+  virtual ~NVPTXSection() {}<br>
<br>
   /// Override this as NVPTX has its own way of printing switching<br>
   /// to a section.<br>
<br>
Modified: llvm/trunk/lib/Target/NVPTX/NVPTXSubtarget.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/NVPTX/NVPTXSubtarget.cpp?rev=194865&r1=194864&r2=194865&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/NVPTX/NVPTXSubtarget.cpp?rev=194865&r1=194864&r2=194865&view=diff</a><br>

==============================================================================<br>
--- llvm/trunk/lib/Target/NVPTX/NVPTXSubtarget.cpp (original)<br>
+++ llvm/trunk/lib/Target/NVPTX/NVPTXSubtarget.cpp Fri Nov 15 16:34:48 2013<br>
@@ -20,6 +20,9 @@<br>
 using namespace llvm;<br>
<br>
<br>
+// pin vtable to this file<br>
+void NVPTXSubtarget::anchor() {}<br>
+<br>
 NVPTXSubtarget::NVPTXSubtarget(const std::string &TT, const std::string &CPU,<br>
                                const std::string &FS, bool is64Bit)<br>
     : NVPTXGenSubtargetInfo(TT, CPU, FS), Is64Bit(is64Bit), PTXVersion(0),<br>
<br>
Modified: llvm/trunk/lib/Target/NVPTX/NVPTXSubtarget.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/NVPTX/NVPTXSubtarget.h?rev=194865&r1=194864&r2=194865&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/NVPTX/NVPTXSubtarget.h?rev=194865&r1=194864&r2=194865&view=diff</a><br>

==============================================================================<br>
--- llvm/trunk/lib/Target/NVPTX/NVPTXSubtarget.h (original)<br>
+++ llvm/trunk/lib/Target/NVPTX/NVPTXSubtarget.h Fri Nov 15 16:34:48 2013<br>
@@ -36,6 +36,8 @@ class NVPTXSubtarget : public NVPTXGenSu<br>
   // SM version x.y is represented as 10*x+y, e.g. 3.1 == 31<br>
   unsigned int SmVersion;<br>
<br>
+  virtual void anchor();<br>
+<br>
 public:<br>
   /// This constructor initializes the data members to match that<br>
   /// of the specified module.<br>
<br>
Modified: llvm/trunk/lib/Target/NVPTX/NVPTXTargetObjectFile.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/NVPTX/NVPTXTargetObjectFile.h?rev=194865&r1=194864&r2=194865&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/NVPTX/NVPTXTargetObjectFile.h?rev=194865&r1=194864&r2=194865&view=diff</a><br>

==============================================================================<br>
--- llvm/trunk/lib/Target/NVPTX/NVPTXTargetObjectFile.h (original)<br>
+++ llvm/trunk/lib/Target/NVPTX/NVPTXTargetObjectFile.h Fri Nov 15 16:34:48 2013<br>
@@ -44,28 +44,7 @@ public:<br>
     DwarfMacroInfoSection = 0;<br>
   }<br>
<br>
-  ~NVPTXTargetObjectFile() {<br>
-    delete TextSection;<br>
-    delete DataSection;<br>
-    delete BSSSection;<br>
-    delete ReadOnlySection;<br>
-<br>
-    delete StaticCtorSection;<br>
-    delete StaticDtorSection;<br>
-    delete LSDASection;<br>
-    delete EHFrameSection;<br>
-    delete DwarfAbbrevSection;<br>
-    delete DwarfInfoSection;<br>
-    delete DwarfLineSection;<br>
-    delete DwarfFrameSection;<br>
-    delete DwarfPubTypesSection;<br>
-    delete DwarfDebugInlineSection;<br>
-    delete DwarfStrSection;<br>
-    delete DwarfLocSection;<br>
-    delete DwarfARangesSection;<br>
-    delete DwarfRangesSection;<br>
-    delete DwarfMacroInfoSection;<br>
-  }<br>
+  virtual ~NVPTXTargetObjectFile();<br>
<br>
   virtual void Initialize(MCContext &ctx, const TargetMachine &TM) {<br>
     TargetLoweringObjectFile::Initialize(ctx, TM);<br>
<br>
Modified: llvm/trunk/lib/Target/PowerPC/MCTargetDesc/PPCMCTargetDesc.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/MCTargetDesc/PPCMCTargetDesc.cpp?rev=194865&r1=194864&r2=194865&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/MCTargetDesc/PPCMCTargetDesc.cpp?rev=194865&r1=194864&r2=194865&view=diff</a><br>

==============================================================================<br>
--- llvm/trunk/lib/Target/PowerPC/MCTargetDesc/PPCMCTargetDesc.cpp (original)<br>
+++ llvm/trunk/lib/Target/PowerPC/MCTargetDesc/PPCMCTargetDesc.cpp Fri Nov 15 16:34:48 2013<br>
@@ -37,6 +37,9 @@<br>
<br>
 using namespace llvm;<br>
<br>
+// pin vtable to this file<br>
+PPCTargetStreamer::~PPCTargetStreamer() {}<br>
+<br>
 static MCInstrInfo *createPPCMCInstrInfo() {<br>
   MCInstrInfo *X = new MCInstrInfo();<br>
   InitPPCMCInstrInfo(X);<br>
<br>
Modified: llvm/trunk/lib/Target/PowerPC/PPCInstrInfo.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/PPCInstrInfo.cpp?rev=194865&r1=194864&r2=194865&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/PPCInstrInfo.cpp?rev=194865&r1=194864&r2=194865&view=diff</a><br>

==============================================================================<br>
--- llvm/trunk/lib/Target/PowerPC/PPCInstrInfo.cpp (original)<br>
+++ llvm/trunk/lib/Target/PowerPC/PPCInstrInfo.cpp Fri Nov 15 16:34:48 2013<br>
@@ -33,7 +33,7 @@<br>
 #include "llvm/Support/raw_ostream.h"<br>
<br>
 #define GET_INSTRMAP_INFO<br>
-#define GET_INSTRINFO_CTOR<br>
+#define GET_INSTRINFO_CTOR_DTOR<br>
 #include "PPCGenInstrInfo.inc"<br>
<br>
 using namespace llvm;<br>
@@ -45,6 +45,9 @@ opt<bool> DisableCTRLoopAnal("disable-pp<br>
 static cl::opt<bool> DisableCmpOpt("disable-ppc-cmp-opt",<br>
 cl::desc("Disable compare instruction optimization"), cl::Hidden);<br>
<br>
+//pin vtable to this file<br>
+void PPCInstrInfo::anchor() {}<br>
+<br>
 PPCInstrInfo::PPCInstrInfo(PPCTargetMachine &tm)<br>
   : PPCGenInstrInfo(PPC::ADJCALLSTACKDOWN, PPC::ADJCALLSTACKUP),<br>
     TM(tm), RI(*TM.getSubtargetImpl()) {}<br>
<br>
Modified: llvm/trunk/lib/Target/PowerPC/PPCInstrInfo.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/PPCInstrInfo.h?rev=194865&r1=194864&r2=194865&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/PPCInstrInfo.h?rev=194865&r1=194864&r2=194865&view=diff</a><br>

==============================================================================<br>
--- llvm/trunk/lib/Target/PowerPC/PPCInstrInfo.h (original)<br>
+++ llvm/trunk/lib/Target/PowerPC/PPCInstrInfo.h Fri Nov 15 16:34:48 2013<br>
@@ -78,6 +78,7 @@ class PPCInstrInfo : public PPCGenInstrI<br>
                             const TargetRegisterClass *RC,<br>
                             SmallVectorImpl<MachineInstr*> &NewMIs,<br>
                             bool &NonRI, bool &SpillsVRS) const;<br>
+  virtual void anchor();<br>
 public:<br>
   explicit PPCInstrInfo(PPCTargetMachine &TM);<br>
<br>
<br>
Modified: llvm/trunk/lib/Target/PowerPC/PPCTargetStreamer.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/PPCTargetStreamer.h?rev=194865&r1=194864&r2=194865&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/PPCTargetStreamer.h?rev=194865&r1=194864&r2=194865&view=diff</a><br>

==============================================================================<br>
--- llvm/trunk/lib/Target/PowerPC/PPCTargetStreamer.h (original)<br>
+++ llvm/trunk/lib/Target/PowerPC/PPCTargetStreamer.h Fri Nov 15 16:34:48 2013<br>
@@ -15,6 +15,7 @@<br>
 namespace llvm {<br>
 class PPCTargetStreamer : public MCTargetStreamer {<br>
 public:<br>
+  virtual ~PPCTargetStreamer();<br>
   virtual void emitTCEntry(const MCSymbol &S) = 0;<br>
 };<br>
 }<br>
<br>
Modified: llvm/trunk/lib/Target/R600/AMDGPUInstrInfo.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/R600/AMDGPUInstrInfo.cpp?rev=194865&r1=194864&r2=194865&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/R600/AMDGPUInstrInfo.cpp?rev=194865&r1=194864&r2=194865&view=diff</a><br>

==============================================================================<br>
--- llvm/trunk/lib/Target/R600/AMDGPUInstrInfo.cpp (original)<br>
+++ llvm/trunk/lib/Target/R600/AMDGPUInstrInfo.cpp Fri Nov 15 16:34:48 2013<br>
@@ -20,13 +20,17 @@<br>
 #include "llvm/CodeGen/MachineInstrBuilder.h"<br>
 #include "llvm/CodeGen/MachineRegisterInfo.h"<br>
<br>
-#define GET_INSTRINFO_CTOR<br>
+#define GET_INSTRINFO_CTOR_DTOR<br>
 #define GET_INSTRINFO_NAMED_OPS<br>
 #define GET_INSTRMAP_INFO<br>
 #include "AMDGPUGenInstrInfo.inc"<br>
<br>
 using namespace llvm;<br>
<br>
+<br>
+// pin vtable to this file<br>
+void AMDGPUInstrInfo::anchor() {}<br>
+<br>
 AMDGPUInstrInfo::AMDGPUInstrInfo(TargetMachine &tm)<br>
   : AMDGPUGenInstrInfo(-1,-1), RI(tm), TM(tm) { }<br>
<br>
<br>
Modified: llvm/trunk/lib/Target/R600/AMDGPUInstrInfo.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/R600/AMDGPUInstrInfo.h?rev=194865&r1=194864&r2=194865&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/R600/AMDGPUInstrInfo.h?rev=194865&r1=194864&r2=194865&view=diff</a><br>

==============================================================================<br>
--- llvm/trunk/lib/Target/R600/AMDGPUInstrInfo.h (original)<br>
+++ llvm/trunk/lib/Target/R600/AMDGPUInstrInfo.h Fri Nov 15 16:34:48 2013<br>
@@ -43,6 +43,7 @@ private:<br>
   const AMDGPURegisterInfo RI;<br>
   bool getNextBranchInstr(MachineBasicBlock::iterator &iter,<br>
                           MachineBasicBlock &MBB) const;<br>
+  virtual void anchor();<br>
 protected:<br>
   TargetMachine &TM;<br>
 public:<br>
<br>
Modified: llvm/trunk/lib/Target/R600/AMDGPUMachineFunction.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/R600/AMDGPUMachineFunction.cpp?rev=194865&r1=194864&r2=194865&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/R600/AMDGPUMachineFunction.cpp?rev=194865&r1=194864&r2=194865&view=diff</a><br>

==============================================================================<br>
--- llvm/trunk/lib/Target/R600/AMDGPUMachineFunction.cpp (original)<br>
+++ llvm/trunk/lib/Target/R600/AMDGPUMachineFunction.cpp Fri Nov 15 16:34:48 2013<br>
@@ -6,6 +6,9 @@ using namespace llvm;<br>
<br>
 static const char *const ShaderTypeAttribute = "ShaderType";<br>
<br>
+// pin vtable to this file<br>
+void AMDGPUMachineFunction::anchor() {}<br>
+<br>
 AMDGPUMachineFunction::AMDGPUMachineFunction(const MachineFunction &MF) :<br>
     MachineFunctionInfo() {<br>
   ShaderType = ShaderType::COMPUTE;<br>
<br>
Modified: llvm/trunk/lib/Target/R600/AMDGPUMachineFunction.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/R600/AMDGPUMachineFunction.h?rev=194865&r1=194864&r2=194865&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/R600/AMDGPUMachineFunction.h?rev=194865&r1=194864&r2=194865&view=diff</a><br>

==============================================================================<br>
--- llvm/trunk/lib/Target/R600/AMDGPUMachineFunction.h (original)<br>
+++ llvm/trunk/lib/Target/R600/AMDGPUMachineFunction.h Fri Nov 15 16:34:48 2013<br>
@@ -19,6 +19,7 @@<br>
 namespace llvm {<br>
<br>
 class AMDGPUMachineFunction : public MachineFunctionInfo {<br>
+  virtual void anchor();<br>
 public:<br>
   AMDGPUMachineFunction(const MachineFunction &MF);<br>
   unsigned ShaderType;<br>
<br>
Added: llvm/trunk/lib/Target/R600/MCTargetDesc/AMDGPUMCCodeEmitter.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/R600/MCTargetDesc/AMDGPUMCCodeEmitter.cpp?rev=194865&view=auto" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/R600/MCTargetDesc/AMDGPUMCCodeEmitter.cpp?rev=194865&view=auto</a><br>

==============================================================================<br>
--- llvm/trunk/lib/Target/R600/MCTargetDesc/AMDGPUMCCodeEmitter.cpp (added)<br>
+++ llvm/trunk/lib/Target/R600/MCTargetDesc/AMDGPUMCCodeEmitter.cpp Fri Nov 15 16:34:48 2013<br>
@@ -0,0 +1,21 @@<br>
+//===-- AMDGPUCodeEmitter.cpp - AMDGPU Code Emitter interface -------------===//<br>
+//<br>
+//                     The LLVM Compiler Infrastructure<br>
+//<br>
+// This file is distributed under the University of Illinois Open Source<br>
+// License. See LICENSE.TXT for details.<br>
+//<br>
+//===----------------------------------------------------------------------===//<br>
+//<br>
+/// \file<br>
+/// \brief CodeEmitter interface for R600 and SI codegen.<br>
+//<br>
+//===----------------------------------------------------------------------===//<br>
+<br>
+#include "AMDGPUMCCodeEmitter.h"<br>
+<br>
+using namespace llvm;<br>
+<br>
+// pin vtable to this file<br>
+void AMDGPUMCCodeEmitter::anchor() {}<br>
+<br>
<br>
Modified: llvm/trunk/lib/Target/R600/MCTargetDesc/AMDGPUMCCodeEmitter.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/R600/MCTargetDesc/AMDGPUMCCodeEmitter.h?rev=194865&r1=194864&r2=194865&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/R600/MCTargetDesc/AMDGPUMCCodeEmitter.h?rev=194865&r1=194864&r2=194865&view=diff</a><br>

==============================================================================<br>
--- llvm/trunk/lib/Target/R600/MCTargetDesc/AMDGPUMCCodeEmitter.h (original)<br>
+++ llvm/trunk/lib/Target/R600/MCTargetDesc/AMDGPUMCCodeEmitter.h Fri Nov 15 16:34:48 2013<br>
@@ -24,6 +24,7 @@ class MCInst;<br>
 class MCOperand;<br>
<br>
 class AMDGPUMCCodeEmitter : public MCCodeEmitter {<br>
+  virtual void anchor();<br>
 public:<br>
<br>
   uint64_t getBinaryCodeForInstr(const MCInst &MI,<br>
<br>
Modified: llvm/trunk/lib/Target/R600/MCTargetDesc/CMakeLists.txt<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/R600/MCTargetDesc/CMakeLists.txt?rev=194865&r1=194864&r2=194865&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/R600/MCTargetDesc/CMakeLists.txt?rev=194865&r1=194864&r2=194865&view=diff</a><br>

==============================================================================<br>
--- llvm/trunk/lib/Target/R600/MCTargetDesc/CMakeLists.txt (original)<br>
+++ llvm/trunk/lib/Target/R600/MCTargetDesc/CMakeLists.txt Fri Nov 15 16:34:48 2013<br>
@@ -2,6 +2,7 @@<br>
 add_llvm_library(LLVMR600Desc<br>
   AMDGPUAsmBackend.cpp<br>
   AMDGPUELFObjectWriter.cpp<br>
+  AMDGPUMCCodeEmitter.cpp<br>
   AMDGPUMCTargetDesc.cpp<br>
   AMDGPUMCAsmInfo.cpp<br>
   R600MCCodeEmitter.cpp<br>
<br>
Modified: llvm/trunk/lib/Target/R600/R600InstrInfo.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/R600/R600InstrInfo.cpp?rev=194865&r1=194864&r2=194865&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/R600/R600InstrInfo.cpp?rev=194865&r1=194864&r2=194865&view=diff</a><br>

==============================================================================<br>
--- llvm/trunk/lib/Target/R600/R600InstrInfo.cpp (original)<br>
+++ llvm/trunk/lib/Target/R600/R600InstrInfo.cpp Fri Nov 15 16:34:48 2013<br>
@@ -23,7 +23,7 @@<br>
 #include "llvm/CodeGen/MachineInstrBuilder.h"<br>
 #include "llvm/CodeGen/MachineRegisterInfo.h"<br>
<br>
-#define GET_INSTRINFO_CTOR<br>
+#define GET_INSTRINFO_CTOR_DTOR<br>
 #include "AMDGPUGenDFAPacketizer.inc"<br>
<br>
 using namespace llvm;<br>
<br>
Modified: llvm/trunk/lib/Target/R600/R600MachineFunctionInfo.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/R600/R600MachineFunctionInfo.cpp?rev=194865&r1=194864&r2=194865&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/R600/R600MachineFunctionInfo.cpp?rev=194865&r1=194864&r2=194865&view=diff</a><br>

==============================================================================<br>
--- llvm/trunk/lib/Target/R600/R600MachineFunctionInfo.cpp (original)<br>
+++ llvm/trunk/lib/Target/R600/R600MachineFunctionInfo.cpp Fri Nov 15 16:34:48 2013<br>
@@ -12,7 +12,9 @@<br>
<br>
 using namespace llvm;<br>
<br>
-R600MachineFunctionInfo::R600MachineFunctionInfo(const MachineFunction &MF)<br>
-  : AMDGPUMachineFunction(MF) { }<br>
<br>
+// pin vtable to this file<br>
+void R600MachineFunctionInfo::anchor() {}<br>
<br>
+R600MachineFunctionInfo::R600MachineFunctionInfo(const MachineFunction &MF)<br>
+  : AMDGPUMachineFunction(MF) { }<br>
<br>
Modified: llvm/trunk/lib/Target/R600/R600MachineFunctionInfo.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/R600/R600MachineFunctionInfo.h?rev=194865&r1=194864&r2=194865&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/R600/R600MachineFunctionInfo.h?rev=194865&r1=194864&r2=194865&view=diff</a><br>

==============================================================================<br>
--- llvm/trunk/lib/Target/R600/R600MachineFunctionInfo.h (original)<br>
+++ llvm/trunk/lib/Target/R600/R600MachineFunctionInfo.h Fri Nov 15 16:34:48 2013<br>
@@ -21,6 +21,7 @@<br>
 namespace llvm {<br>
<br>
 class R600MachineFunctionInfo : public AMDGPUMachineFunction {<br>
+  virtual void anchor();<br>
 public:<br>
   R600MachineFunctionInfo(const MachineFunction &MF);<br>
   SmallVector<unsigned, 4> LiveOuts;<br>
<br>
Modified: llvm/trunk/lib/Target/R600/SIMachineFunctionInfo.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/R600/SIMachineFunctionInfo.cpp?rev=194865&r1=194864&r2=194865&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/R600/SIMachineFunctionInfo.cpp?rev=194865&r1=194864&r2=194865&view=diff</a><br>

==============================================================================<br>
--- llvm/trunk/lib/Target/R600/SIMachineFunctionInfo.cpp (original)<br>
+++ llvm/trunk/lib/Target/R600/SIMachineFunctionInfo.cpp Fri Nov 15 16:34:48 2013<br>
@@ -13,6 +13,10 @@<br>
<br>
 using namespace llvm;<br>
<br>
+<br>
+// pin vtable to this file<br>
+void SIMachineFunctionInfo::anchor() {}<br>
+<br>
 SIMachineFunctionInfo::SIMachineFunctionInfo(const MachineFunction &MF)<br>
   : AMDGPUMachineFunction(MF),<br>
     PSInputAddr(0) { }<br>
<br>
Modified: llvm/trunk/lib/Target/R600/SIMachineFunctionInfo.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/R600/SIMachineFunctionInfo.h?rev=194865&r1=194864&r2=194865&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/R600/SIMachineFunctionInfo.h?rev=194865&r1=194864&r2=194865&view=diff</a><br>

==============================================================================<br>
--- llvm/trunk/lib/Target/R600/SIMachineFunctionInfo.h (original)<br>
+++ llvm/trunk/lib/Target/R600/SIMachineFunctionInfo.h Fri Nov 15 16:34:48 2013<br>
@@ -22,6 +22,7 @@ namespace llvm {<br>
 /// This class keeps track of the SPI_SP_INPUT_ADDR config register, which<br>
 /// tells the hardware which interpolation parameters to load.<br>
 class SIMachineFunctionInfo : public AMDGPUMachineFunction {<br>
+  virtual void anchor();<br>
 public:<br>
   SIMachineFunctionInfo(const MachineFunction &MF);<br>
   unsigned PSInputAddr;<br>
<br>
Modified: llvm/trunk/lib/Target/Sparc/SparcInstrInfo.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Sparc/SparcInstrInfo.cpp?rev=194865&r1=194864&r2=194865&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Sparc/SparcInstrInfo.cpp?rev=194865&r1=194864&r2=194865&view=diff</a><br>

==============================================================================<br>
--- llvm/trunk/lib/Target/Sparc/SparcInstrInfo.cpp (original)<br>
+++ llvm/trunk/lib/Target/Sparc/SparcInstrInfo.cpp Fri Nov 15 16:34:48 2013<br>
@@ -24,11 +24,15 @@<br>
 #include "llvm/Support/ErrorHandling.h"<br>
 #include "llvm/Support/TargetRegistry.h"<br>
<br>
-#define GET_INSTRINFO_CTOR<br>
+#define GET_INSTRINFO_CTOR_DTOR<br>
 #include "SparcGenInstrInfo.inc"<br>
<br>
 using namespace llvm;<br>
<br>
+<br>
+// pin vtable to this file<br>
+void SparcInstrInfo::anchor() {}<br>
+<br>
 SparcInstrInfo::SparcInstrInfo(SparcSubtarget &ST)<br>
   : SparcGenInstrInfo(SP::ADJCALLSTACKDOWN, SP::ADJCALLSTACKUP),<br>
     RI(ST), Subtarget(ST) {<br>
<br>
Modified: llvm/trunk/lib/Target/Sparc/SparcInstrInfo.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Sparc/SparcInstrInfo.h?rev=194865&r1=194864&r2=194865&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Sparc/SparcInstrInfo.h?rev=194865&r1=194864&r2=194865&view=diff</a><br>

==============================================================================<br>
--- llvm/trunk/lib/Target/Sparc/SparcInstrInfo.h (original)<br>
+++ llvm/trunk/lib/Target/Sparc/SparcInstrInfo.h Fri Nov 15 16:34:48 2013<br>
@@ -37,6 +37,7 @@ namespace SPII {<br>
 class SparcInstrInfo : public SparcGenInstrInfo {<br>
   const SparcRegisterInfo RI;<br>
   const SparcSubtarget& Subtarget;<br>
+  virtual void anchor();<br>
 public:<br>
   explicit SparcInstrInfo(SparcSubtarget &ST);<br>
<br>
<br>
Modified: llvm/trunk/lib/Target/SystemZ/CMakeLists.txt<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/SystemZ/CMakeLists.txt?rev=194865&r1=194864&r2=194865&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/SystemZ/CMakeLists.txt?rev=194865&r1=194864&r2=194865&view=diff</a><br>

==============================================================================<br>
--- llvm/trunk/lib/Target/SystemZ/CMakeLists.txt (original)<br>
+++ llvm/trunk/lib/Target/SystemZ/CMakeLists.txt Fri Nov 15 16:34:48 2013<br>
@@ -21,6 +21,7 @@ add_llvm_target(SystemZCodeGen<br>
   SystemZISelLowering.cpp<br>
   SystemZInstrInfo.cpp<br>
   SystemZLongBranch.cpp<br>
+  SystemZMachineFunctionInfo.cpp<br>
   SystemZMCInstLower.cpp<br>
   SystemZRegisterInfo.cpp<br>
   SystemZSelectionDAGInfo.cpp<br>
<br>
Modified: llvm/trunk/lib/Target/SystemZ/SystemZInstrInfo.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/SystemZ/SystemZInstrInfo.cpp?rev=194865&r1=194864&r2=194865&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/SystemZ/SystemZInstrInfo.cpp?rev=194865&r1=194864&r2=194865&view=diff</a><br>

==============================================================================<br>
--- llvm/trunk/lib/Target/SystemZ/SystemZInstrInfo.cpp (original)<br>
+++ llvm/trunk/lib/Target/SystemZ/SystemZInstrInfo.cpp Fri Nov 15 16:34:48 2013<br>
@@ -17,7 +17,7 @@<br>
 #include "llvm/CodeGen/LiveVariables.h"<br>
 #include "llvm/CodeGen/MachineRegisterInfo.h"<br>
<br>
-#define GET_INSTRINFO_CTOR<br>
+#define GET_INSTRINFO_CTOR_DTOR<br>
 #define GET_INSTRMAP_INFO<br>
 #include "SystemZGenInstrInfo.inc"<br>
<br>
@@ -37,6 +37,9 @@ static bool isHighReg(unsigned int Reg)<br>
   return false;<br>
 }<br>
<br>
+// pin vtable to this file<br>
+void SystemZInstrInfo::anchor() {}<br>
+<br>
 SystemZInstrInfo::SystemZInstrInfo(SystemZTargetMachine &tm)<br>
   : SystemZGenInstrInfo(SystemZ::ADJCALLSTACKDOWN, SystemZ::ADJCALLSTACKUP),<br>
     RI(tm), TM(tm) {<br>
<br>
Modified: llvm/trunk/lib/Target/SystemZ/SystemZInstrInfo.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/SystemZ/SystemZInstrInfo.h?rev=194865&r1=194864&r2=194865&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/SystemZ/SystemZInstrInfo.h?rev=194865&r1=194864&r2=194865&view=diff</a><br>

==============================================================================<br>
--- llvm/trunk/lib/Target/SystemZ/SystemZInstrInfo.h (original)<br>
+++ llvm/trunk/lib/Target/SystemZ/SystemZInstrInfo.h Fri Nov 15 16:34:48 2013<br>
@@ -127,6 +127,7 @@ class SystemZInstrInfo : public SystemZG<br>
   void emitGRX32Move(MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI,<br>
                      DebugLoc DL, unsigned DestReg, unsigned SrcReg,<br>
                      unsigned LowLowOpcode, unsigned Size, bool KillSrc) const;<br>
+  virtual void anchor();<br>
<br>
 public:<br>
   explicit SystemZInstrInfo(SystemZTargetMachine &TM);<br>
<br>
Copied: llvm/trunk/lib/Target/SystemZ/SystemZMachineFunctionInfo.cpp (from r194862, llvm/trunk/lib/Target/R600/R600MachineFunctionInfo.cpp)<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/SystemZ/SystemZMachineFunctionInfo.cpp?p2=llvm/trunk/lib/Target/SystemZ/SystemZMachineFunctionInfo.cpp&p1=llvm/trunk/lib/Target/R600/R600MachineFunctionInfo.cpp&r1=194862&r2=194865&rev=194865&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/SystemZ/SystemZMachineFunctionInfo.cpp?p2=llvm/trunk/lib/Target/SystemZ/SystemZMachineFunctionInfo.cpp&p1=llvm/trunk/lib/Target/R600/R600MachineFunctionInfo.cpp&r1=194862&r2=194865&rev=194865&view=diff</a><br>

==============================================================================<br>
--- llvm/trunk/lib/Target/R600/R600MachineFunctionInfo.cpp (original)<br>
+++ llvm/trunk/lib/Target/SystemZ/SystemZMachineFunctionInfo.cpp Fri Nov 15 16:34:48 2013<br>
@@ -1,18 +1,17 @@<br>
-//===-- R600MachineFunctionInfo.cpp - R600 Machine Function Info-*- C++ -*-===//<br>
+//== SystemZMachineFuctionInfo.cpp - SystemZ machine function info-*- C++ -*-=//<br>
 //<br>
 //                     The LLVM Compiler Infrastructure<br>
 //<br>
 // This file is distributed under the University of Illinois Open Source<br>
 // License. See LICENSE.TXT for details.<br>
 //<br>
-/// \file<br>
 //===----------------------------------------------------------------------===//<br>
<br>
-#include "R600MachineFunctionInfo.h"<br>
+#include "SystemZMachineFunctionInfo.h"<br>
<br>
 using namespace llvm;<br>
<br>
-R600MachineFunctionInfo::R600MachineFunctionInfo(const MachineFunction &MF)<br>
-  : AMDGPUMachineFunction(MF) { }<br>
<br>
+// pin vtable to this file<br>
+void SystemZMachineFunctionInfo::anchor() {}<br>
<br>
<br>
Modified: llvm/trunk/lib/Target/SystemZ/SystemZMachineFunctionInfo.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/SystemZ/SystemZMachineFunctionInfo.h?rev=194865&r1=194864&r2=194865&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/SystemZ/SystemZMachineFunctionInfo.h?rev=194865&r1=194864&r2=194865&view=diff</a><br>

==============================================================================<br>
--- llvm/trunk/lib/Target/SystemZ/SystemZMachineFunctionInfo.h (original)<br>
+++ llvm/trunk/lib/Target/SystemZ/SystemZMachineFunctionInfo.h Fri Nov 15 16:34:48 2013<br>
@@ -23,6 +23,8 @@ class SystemZMachineFunctionInfo : publi<br>
   unsigned RegSaveFrameIndex;<br>
   bool ManipulatesSP;<br>
<br>
+  virtual void anchor();<br>
+<br>
 public:<br>
   explicit SystemZMachineFunctionInfo(MachineFunction &MF)<br>
     : LowSavedGPR(0), HighSavedGPR(0), VarArgsFirstGPR(0), VarArgsFirstFPR(0),<br>
<br>
Modified: llvm/trunk/lib/Target/SystemZ/SystemZSubtarget.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/SystemZ/SystemZSubtarget.cpp?rev=194865&r1=194864&r2=194865&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/SystemZ/SystemZSubtarget.cpp?rev=194865&r1=194864&r2=194865&view=diff</a><br>

==============================================================================<br>
--- llvm/trunk/lib/Target/SystemZ/SystemZSubtarget.cpp (original)<br>
+++ llvm/trunk/lib/Target/SystemZ/SystemZSubtarget.cpp Fri Nov 15 16:34:48 2013<br>
@@ -18,6 +18,9 @@<br>
<br>
 using namespace llvm;<br>
<br>
+// pin vtabel to this file<br>
+void SystemZSubtarget::anchor() {}<br>
+<br>
 SystemZSubtarget::SystemZSubtarget(const std::string &TT,<br>
                                    const std::string &CPU,<br>
                                    const std::string &FS)<br>
<br>
Modified: llvm/trunk/lib/Target/SystemZ/SystemZSubtarget.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/SystemZ/SystemZSubtarget.h?rev=194865&r1=194864&r2=194865&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/SystemZ/SystemZSubtarget.h?rev=194865&r1=194864&r2=194865&view=diff</a><br>

==============================================================================<br>
--- llvm/trunk/lib/Target/SystemZ/SystemZSubtarget.h (original)<br>
+++ llvm/trunk/lib/Target/SystemZ/SystemZSubtarget.h Fri Nov 15 16:34:48 2013<br>
@@ -26,6 +26,7 @@ class GlobalValue;<br>
 class StringRef;<br>
<br>
 class SystemZSubtarget : public SystemZGenSubtargetInfo {<br>
+  virtual void anchor();<br>
 protected:<br>
   bool HasDistinctOps;<br>
   bool HasLoadStoreOnCond;<br>
<br>
Modified: llvm/trunk/lib/Target/X86/MCTargetDesc/X86WinCOFFObjectWriter.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/MCTargetDesc/X86WinCOFFObjectWriter.cpp?rev=194865&r1=194864&r2=194865&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/MCTargetDesc/X86WinCOFFObjectWriter.cpp?rev=194865&r1=194864&r2=194865&view=diff</a><br>

==============================================================================<br>
--- llvm/trunk/lib/Target/X86/MCTargetDesc/X86WinCOFFObjectWriter.cpp (original)<br>
+++ llvm/trunk/lib/Target/X86/MCTargetDesc/X86WinCOFFObjectWriter.cpp Fri Nov 15 16:34:48 2013<br>
@@ -27,7 +27,7 @@ namespace {<br>
<br>
   public:<br>
     X86WinCOFFObjectWriter(bool Is64Bit_);<br>
-    ~X86WinCOFFObjectWriter();<br>
+    virtual ~X86WinCOFFObjectWriter();<br>
<br>
     virtual unsigned getRelocType(const MCValue &Target,<br>
                                   const MCFixup &Fixup,<br>
<br>
Modified: llvm/trunk/lib/Target/X86/X86InstrInfo.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86InstrInfo.cpp?rev=194865&r1=194864&r2=194865&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86InstrInfo.cpp?rev=194865&r1=194864&r2=194865&view=diff</a><br>

==============================================================================<br>
--- llvm/trunk/lib/Target/X86/X86InstrInfo.cpp (original)<br>
+++ llvm/trunk/lib/Target/X86/X86InstrInfo.cpp Fri Nov 15 16:34:48 2013<br>
@@ -36,7 +36,7 @@<br>
 #include "llvm/Target/TargetOptions.h"<br>
 #include <limits><br>
<br>
-#define GET_INSTRINFO_CTOR<br>
+#define GET_INSTRINFO_CTOR_DTOR<br>
 #include "X86GenInstrInfo.inc"<br>
<br>
 using namespace llvm;<br>
@@ -92,6 +92,9 @@ struct X86OpTblEntry {<br>
   uint16_t Flags;<br>
 };<br>
<br>
+// pin vtable to this file<br>
+void X86InstrInfo::anchor() {}<br>
+<br>
 X86InstrInfo::X86InstrInfo(X86TargetMachine &tm)<br>
   : X86GenInstrInfo((tm.getSubtarget<X86Subtarget>().is64Bit()<br>
                      ? X86::ADJCALLSTACKDOWN64<br>
<br>
Modified: llvm/trunk/lib/Target/X86/X86InstrInfo.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86InstrInfo.h?rev=194865&r1=194864&r2=194865&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86InstrInfo.h?rev=194865&r1=194864&r2=194865&view=diff</a><br>

==============================================================================<br>
--- llvm/trunk/lib/Target/X86/X86InstrInfo.h (original)<br>
+++ llvm/trunk/lib/Target/X86/X86InstrInfo.h Fri Nov 15 16:34:48 2013<br>
@@ -152,6 +152,8 @@ class X86InstrInfo : public X86GenInstrI<br>
                             MemOp2RegOpTableType &M2RTable,<br>
                             unsigned RegOp, unsigned MemOp, unsigned Flags);<br>
<br>
+  virtual void anchor();<br>
+<br>
 public:<br>
   explicit X86InstrInfo(X86TargetMachine &tm);<br>
<br>
<br>
Modified: llvm/trunk/lib/Target/XCore/XCoreInstrInfo.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/XCore/XCoreInstrInfo.cpp?rev=194865&r1=194864&r2=194865&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/XCore/XCoreInstrInfo.cpp?rev=194865&r1=194864&r2=194865&view=diff</a><br>

==============================================================================<br>
--- llvm/trunk/lib/Target/XCore/XCoreInstrInfo.cpp (original)<br>
+++ llvm/trunk/lib/Target/XCore/XCoreInstrInfo.cpp Fri Nov 15 16:34:48 2013<br>
@@ -22,7 +22,7 @@<br>
 #include "llvm/Support/ErrorHandling.h"<br>
 #include "llvm/Support/TargetRegistry.h"<br>
<br>
-#define GET_INSTRINFO_CTOR<br>
+#define GET_INSTRINFO_CTOR_DTOR<br>
 #include "XCoreGenInstrInfo.inc"<br>
<br>
 namespace llvm {<br>
@@ -39,6 +39,10 @@ namespace XCore {<br>
<br>
 using namespace llvm;<br>
<br>
+<br>
+// pin vtable to this file<br>
+void XCoreInstrInfo::anchor() {}<br>
+<br>
 XCoreInstrInfo::XCoreInstrInfo()<br>
   : XCoreGenInstrInfo(XCore::ADJCALLSTACKDOWN, XCore::ADJCALLSTACKUP),<br>
     RI() {<br>
<br>
Modified: llvm/trunk/lib/Target/XCore/XCoreInstrInfo.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/XCore/XCoreInstrInfo.h?rev=194865&r1=194864&r2=194865&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/XCore/XCoreInstrInfo.h?rev=194865&r1=194864&r2=194865&view=diff</a><br>

==============================================================================<br>
--- llvm/trunk/lib/Target/XCore/XCoreInstrInfo.h (original)<br>
+++ llvm/trunk/lib/Target/XCore/XCoreInstrInfo.h Fri Nov 15 16:34:48 2013<br>
@@ -24,6 +24,7 @@ namespace llvm {<br>
<br>
 class XCoreInstrInfo : public XCoreGenInstrInfo {<br>
   const XCoreRegisterInfo RI;<br>
+  virtual void anchor();<br>
 public:<br>
   XCoreInstrInfo();<br>
<br>
<br>
Modified: llvm/trunk/tools/llvm-stress/llvm-stress.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-stress/llvm-stress.cpp?rev=194865&r1=194864&r2=194865&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-stress/llvm-stress.cpp?rev=194865&r1=194864&r2=194865&view=diff</a><br>

==============================================================================<br>
--- llvm/trunk/tools/llvm-stress/llvm-stress.cpp (original)<br>
+++ llvm/trunk/tools/llvm-stress/llvm-stress.cpp Fri Nov 15 16:34:48 2013<br>
@@ -128,7 +128,7 @@ public:<br>
     BB(Block),PT(PT),Ran(R),Context(BB->getContext()) {}<br>
<br>
   /// virtual D'tor to silence warnings.<br>
-  virtual ~Modifier() {}<br>
+  virtual ~Modifier();<br>
<br>
   /// Add a new instruction.<br>
   virtual void Act() = 0;<br>
@@ -285,8 +285,11 @@ protected:<br>
   LLVMContext &Context;<br>
 };<br>
<br>
+Modifier::~Modifier() {}<br>
+<br>
 struct LoadModifier: public Modifier {<br>
   LoadModifier(BasicBlock *BB, PieceTable *PT, Random *R):Modifier(BB, PT, R) {}<br>
+  virtual ~LoadModifier();<br>
   virtual void Act() {<br>
     // Try to use predefined pointers. If non exist, use undef pointer value;<br>
     Value *Ptr = getRandomPointerValue();<br>
@@ -295,8 +298,11 @@ struct LoadModifier: public Modifier {<br>
   }<br>
 };<br>
<br>
+LoadModifier::~LoadModifier() {}<br>
+<br>
 struct StoreModifier: public Modifier {<br>
   StoreModifier(BasicBlock *BB, PieceTable *PT, Random *R):Modifier(BB, PT, R) {}<br>
+  virtual ~StoreModifier();<br>
   virtual void Act() {<br>
     // Try to use predefined pointers. If non exist, use undef pointer value;<br>
     Value *Ptr = getRandomPointerValue();<br>
@@ -313,8 +319,11 @@ struct StoreModifier: public Modifier {<br>
   }<br>
 };<br>
<br>
+StoreModifier::~StoreModifier() {}<br>
+<br>
 struct BinModifier: public Modifier {<br>
   BinModifier(BasicBlock *BB, PieceTable *PT, Random *R):Modifier(BB, PT, R) {}<br>
+  virtual ~BinModifier();<br>
<br>
   virtual void Act() {<br>
     Value *Val0 = getRandomVal();<br>
@@ -356,9 +365,13 @@ struct BinModifier: public Modifier {<br>
   }<br>
 };<br>
<br>
+BinModifier::~BinModifier() {}<br>
+<br>
 /// Generate constant values.<br>
 struct ConstModifier: public Modifier {<br>
   ConstModifier(BasicBlock *BB, PieceTable *PT, Random *R):Modifier(BB, PT, R) {}<br>
+  virtual ~ConstModifier();<br>
+<br>
   virtual void Act() {<br>
     Type *Ty = pickType();<br>
<br>
@@ -403,8 +416,11 @@ struct ConstModifier: public Modifier {<br>
   }<br>
 };<br>
<br>
+ConstModifier::~ConstModifier() {}<br>
+<br>
 struct AllocaModifier: public Modifier {<br>
   AllocaModifier(BasicBlock *BB, PieceTable *PT, Random *R):Modifier(BB, PT, R){}<br>
+  virtual ~AllocaModifier();<br>
<br>
   virtual void Act() {<br>
     Type *Tp = pickType();<br>
@@ -412,9 +428,12 @@ struct AllocaModifier: public Modifier {<br>
   }<br>
 };<br>
<br>
+AllocaModifier::~AllocaModifier() {}<br>
+<br>
 struct ExtractElementModifier: public Modifier {<br>
   ExtractElementModifier(BasicBlock *BB, PieceTable *PT, Random *R):<br>
     Modifier(BB, PT, R) {}<br>
+  virtual ~ExtractElementModifier();<br>
<br>
   virtual void Act() {<br>
     Value *Val0 = getRandomVectorValue();<br>
@@ -426,8 +445,12 @@ struct ExtractElementModifier: public Mo<br>
   }<br>
 };<br>
<br>
+ExtractElementModifier::~ExtractElementModifier() {}<br>
+<br>
 struct ShuffModifier: public Modifier {<br>
   ShuffModifier(BasicBlock *BB, PieceTable *PT, Random *R):Modifier(BB, PT, R) {}<br>
+  virtual ~ShuffModifier();<br>
+<br>
   virtual void Act() {<br>
<br>
     Value *Val0 = getRandomVectorValue();<br>
@@ -453,9 +476,12 @@ struct ShuffModifier: public Modifier {<br>
   }<br>
 };<br>
<br>
+ShuffModifier::~ShuffModifier() {}<br>
+<br>
 struct InsertElementModifier: public Modifier {<br>
   InsertElementModifier(BasicBlock *BB, PieceTable *PT, Random *R):<br>
     Modifier(BB, PT, R) {}<br>
+  virtual ~InsertElementModifier();<br>
<br>
   virtual void Act() {<br>
     Value *Val0 = getRandomVectorValue();<br>
@@ -470,8 +496,12 @@ struct InsertElementModifier: public Mod<br>
<br>
 };<br>
<br>
+InsertElementModifier::~InsertElementModifier() {}<br>
+<br>
 struct CastModifier: public Modifier {<br>
   CastModifier(BasicBlock *BB, PieceTable *PT, Random *R):Modifier(BB, PT, R) {}<br>
+  virtual ~CastModifier();<br>
+<br>
   virtual void Act() {<br>
<br>
     Value *V = getRandomVal();<br>
@@ -555,9 +585,12 @@ struct CastModifier: public Modifier {<br>
<br>
 };<br>
<br>
+CastModifier::~CastModifier() {}<br>
+<br>
 struct SelectModifier: public Modifier {<br>
   SelectModifier(BasicBlock *BB, PieceTable *PT, Random *R):<br>
     Modifier(BB, PT, R) {}<br>
+  virtual ~SelectModifier();<br>
<br>
   virtual void Act() {<br>
     // Try a bunch of different select configuration until a valid one is found.<br>
@@ -579,9 +612,12 @@ struct SelectModifier: public Modifier {<br>
   }<br>
 };<br>
<br>
+SelectModifier::~SelectModifier() {}<br>
<br>
 struct CmpModifier: public Modifier {<br>
   CmpModifier(BasicBlock *BB, PieceTable *PT, Random *R):Modifier(BB, PT, R) {}<br>
+  virtual ~CmpModifier();<br>
+<br>
   virtual void Act() {<br>
<br>
     Value *Val0 = getRandomVal();<br>
@@ -607,6 +643,8 @@ struct CmpModifier: public Modifier {<br>
   }<br>
 };<br>
<br>
+CmpModifier::~CmpModifier() {}<br>
+<br>
 void FillFunction(Function *F, Random &R) {<br>
   // Create a legal entry block.<br>
   BasicBlock *BB = BasicBlock::Create(F->getContext(), "BB", F);<br>
<br>
Modified: llvm/trunk/unittests/ADT/IntrusiveRefCntPtrTest.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/ADT/IntrusiveRefCntPtrTest.cpp?rev=194865&r1=194864&r2=194865&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/ADT/IntrusiveRefCntPtrTest.cpp?rev=194865&r1=194864&r2=194865&view=diff</a><br>

==============================================================================<br>
--- llvm/trunk/unittests/ADT/IntrusiveRefCntPtrTest.cpp (original)<br>
+++ llvm/trunk/unittests/ADT/IntrusiveRefCntPtrTest.cpp Fri Nov 15 16:34:48 2013<br>
@@ -13,9 +13,11 @@<br>
 namespace llvm {<br>
<br>
 struct VirtualRefCounted : public RefCountedBaseVPTR {<br>
-  virtual void f() {}<br>
+  virtual void f();<br>
 };<br>
<br>
+void VirtualRefCounted::f() {}<br>
+<br>
 // Run this test with valgrind to detect memory leaks.<br>
 TEST(IntrusiveRefCntPtr, RefCountedBaseVPTRCopyDoesNotLeak) {<br>
   VirtualRefCounted *V1 = new VirtualRefCounted;<br>
<br>
Modified: llvm/trunk/unittests/ExecutionEngine/MCJIT/MCJITCAPITest.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/ExecutionEngine/MCJIT/MCJITCAPITest.cpp?rev=194865&r1=194864&r2=194865&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/ExecutionEngine/MCJIT/MCJITCAPITest.cpp?rev=194865&r1=194864&r2=194865&view=diff</a><br>

==============================================================================<br>
--- llvm/trunk/unittests/ExecutionEngine/MCJIT/MCJITCAPITest.cpp (original)<br>
+++ llvm/trunk/unittests/ExecutionEngine/MCJIT/MCJITCAPITest.cpp Fri Nov 15 16:34:48 2013<br>
@@ -83,14 +83,8 @@ protected:<br>
     UnsupportedOSs.push_back(Triple::Cygwin);<br>
   }<br>
<br>
-  virtual void SetUp() {<br>
-    didCallAllocateCodeSection = false;<br>
-    Module = 0;<br>
-    Function = 0;<br>
-    Engine = 0;<br>
-    Error = 0;<br>
-  }<br>
-<br>
+  virtual void SetUp();<br>
+<br>
   virtual void TearDown() {<br>
     if (Engine)<br>
       LLVMDisposeExecutionEngine(Engine);<br>
@@ -157,6 +151,14 @@ protected:<br>
   char *Error;<br>
 };<br>
<br>
+void MCJITCAPITest::SetUp() {<br>
+  didCallAllocateCodeSection = false;<br>
+  Module = 0;<br>
+  Function = 0;<br>
+  Engine = 0;<br>
+  Error = 0;<br>
+}<br>
+<br>
 TEST_F(MCJITCAPITest, simple_function) {<br>
   SKIP_UNSUPPORTED_PLATFORM;<br>
<br>
<br>
Modified: llvm/trunk/unittests/ExecutionEngine/MCJIT/MCJITMultipleModuleTest.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/ExecutionEngine/MCJIT/MCJITMultipleModuleTest.cpp?rev=194865&r1=194864&r2=194865&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/ExecutionEngine/MCJIT/MCJITMultipleModuleTest.cpp?rev=194865&r1=194864&r2=194865&view=diff</a><br>

==============================================================================<br>
--- llvm/trunk/unittests/ExecutionEngine/MCJIT/MCJITMultipleModuleTest.cpp (original)<br>
+++ llvm/trunk/unittests/ExecutionEngine/MCJIT/MCJITMultipleModuleTest.cpp Fri Nov 15 16:34:48 2013<br>
@@ -18,7 +18,13 @@<br>
<br>
 using namespace llvm;<br>
<br>
-class MCJITMultipleModuleTest : public testing::Test, public MCJITTestBase {};<br>
+class MCJITMultipleModuleTest : public testing::Test,<br>
+                                public MCJITTestBase {<br>
+public:<br>
+  virtual ~MCJITMultipleModuleTest();<br>
+};<br>
+<br>
+MCJITMultipleModuleTest::~MCJITMultipleModuleTest() {}<br>
<br>
 namespace {<br>
<br>
<br>
Modified: llvm/trunk/unittests/ExecutionEngine/MCJIT/MCJITTest.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/ExecutionEngine/MCJIT/MCJITTest.cpp?rev=194865&r1=194864&r2=194865&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/ExecutionEngine/MCJIT/MCJITTest.cpp?rev=194865&r1=194864&r2=194865&view=diff</a><br>

==============================================================================<br>
--- llvm/trunk/unittests/ExecutionEngine/MCJIT/MCJITTest.cpp (original)<br>
+++ llvm/trunk/unittests/ExecutionEngine/MCJIT/MCJITTest.cpp Fri Nov 15 16:34:48 2013<br>
@@ -21,11 +21,13 @@ using namespace llvm;<br>
 class MCJITTest : public testing::Test, public MCJITTestBase {<br>
 protected:<br>
<br>
-  virtual void SetUp() {<br>
-    M.reset(createEmptyModule("<main>"));<br>
-  }<br>
+  virtual void SetUp();<br>
 };<br>
<br>
+void MCJITTest::SetUp() {<br>
+  M.reset(createEmptyModule("<main>"));<br>
+}<br>
+<br>
 namespace {<br>
<br>
 // FIXME: Ensure creating an execution engine does not crash when constructed<br>
<br>
Modified: llvm/trunk/utils/TableGen/CodeGenSchedule.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/CodeGenSchedule.cpp?rev=194865&r1=194864&r2=194865&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/CodeGenSchedule.cpp?rev=194865&r1=194864&r2=194865&view=diff</a><br>

==============================================================================<br>
--- llvm/trunk/utils/TableGen/CodeGenSchedule.cpp (original)<br>
+++ llvm/trunk/utils/TableGen/CodeGenSchedule.cpp Fri Nov 15 16:34:48 2013<br>
@@ -38,12 +38,15 @@ static void dumpIdxVec(const SmallVector<br>
<br>
 // (instrs a, b, ...) Evaluate and union all arguments. Identical to AddOp.<br>
 struct InstrsOp : public SetTheory::Operator {<br>
-  void apply(SetTheory &ST, DagInit *Expr, SetTheory::RecSet &Elts,<br>
-             ArrayRef<SMLoc> Loc) {<br>
-    ST.evaluate(Expr->arg_begin(), Expr->arg_end(), Elts, Loc);<br>
-  }<br>
+  virtual void apply(SetTheory &ST, DagInit *Expr, SetTheory::RecSet &Elts,<br>
+                     ArrayRef<SMLoc> Loc);<br>
 };<br>
<br>
+void InstrsOp::apply(SetTheory &ST, DagInit *Expr, SetTheory::RecSet &Elts,<br>
+                     ArrayRef<SMLoc> Loc) {<br>
+  ST.evaluate(Expr->arg_begin(), Expr->arg_end(), Elts, Loc);<br>
+}<br>
+<br>
 // (instregex "OpcPat",...) Find all instructions matching an opcode pattern.<br>
 //<br>
 // TODO: Since this is a prefix match, perform a binary search over the<br>
@@ -56,34 +59,37 @@ struct InstRegexOp : public SetTheory::O<br>
   const CodeGenTarget &Target;<br>
   InstRegexOp(const CodeGenTarget &t): Target(t) {}<br>
<br>
-  void apply(SetTheory &ST, DagInit *Expr, SetTheory::RecSet &Elts,<br>
-             ArrayRef<SMLoc> Loc) {<br>
-    SmallVector<Regex*, 4> RegexList;<br>
-    for (DagInit::const_arg_iterator<br>
-           AI = Expr->arg_begin(), AE = Expr->arg_end(); AI != AE; ++AI) {<br>
-      StringInit *SI = dyn_cast<StringInit>(*AI);<br>
-      if (!SI)<br>
-        PrintFatalError(Loc, "instregex requires pattern string: "<br>
-          + Expr->getAsString());<br>
-      std::string pat = SI->getValue();<br>
-      // Implement a python-style prefix match.<br>
-      if (pat[0] != '^') {<br>
-        pat.insert(0, "^(");<br>
-        pat.insert(pat.end(), ')');<br>
-      }<br>
-      RegexList.push_back(new Regex(pat));<br>
+  virtual void apply(SetTheory &ST, DagInit *Expr, SetTheory::RecSet &Elts,<br>
+                     ArrayRef<SMLoc> Loc);<br>
+};<br>
+<br>
+void InstRegexOp::apply(SetTheory &ST, DagInit *Expr, SetTheory::RecSet &Elts,<br>
+                       ArrayRef<SMLoc> Loc) {<br>
+  SmallVector<Regex*, 4> RegexList;<br>
+  for (DagInit::const_arg_iterator<br>
+       AI = Expr->arg_begin(), AE = Expr->arg_end(); AI != AE; ++AI) {<br>
+    StringInit *SI = dyn_cast<StringInit>(*AI);<br>
+    if (!SI)<br>
+      PrintFatalError(Loc, "instregex requires pattern string: "<br>
+                      + Expr->getAsString());<br>
+    std::string pat = SI->getValue();<br>
+    // Implement a python-style prefix match.<br>
+    if (pat[0] != '^') {<br>
+      pat.insert(0, "^(");<br>
+      pat.insert(pat.end(), ')');<br>
     }<br>
-    for (CodeGenTarget::inst_iterator I = Target.inst_begin(),<br>
-           E = Target.inst_end(); I != E; ++I) {<br>
-      for (SmallVectorImpl<Regex*>::iterator<br>
-             RI = RegexList.begin(), RE = RegexList.end(); RI != RE; ++RI) {<br>
-        if ((*RI)->match((*I)->TheDef->getName()))<br>
-          Elts.insert((*I)->TheDef);<br>
-      }<br>
+    RegexList.push_back(new Regex(pat));<br>
+  }<br>
+  for (CodeGenTarget::inst_iterator I = Target.inst_begin(),<br>
+       E = Target.inst_end(); I != E; ++I) {<br>
+    for (SmallVectorImpl<Regex*>::iterator<br>
+         RI = RegexList.begin(), RE = RegexList.end(); RI != RE; ++RI) {<br>
+      if ((*RI)->match((*I)->TheDef->getName()))<br>
+        Elts.insert((*I)->TheDef);<br>
     }<br>
-    DeleteContainerPointers(RegexList);<br>
   }<br>
-};<br>
+  DeleteContainerPointers(RegexList);<br>
+}<br>
<br>
 /// CodeGenModels ctor interprets machine model records and populates maps.<br>
 CodeGenSchedModels::CodeGenSchedModels(RecordKeeper &RK,<br>
<br>
Modified: llvm/trunk/utils/TableGen/InstrInfoEmitter.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/InstrInfoEmitter.cpp?rev=194865&r1=194864&r2=194865&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/InstrInfoEmitter.cpp?rev=194865&r1=194864&r2=194865&view=diff</a><br>

==============================================================================<br>
--- llvm/trunk/utils/TableGen/InstrInfoEmitter.cpp (original)<br>
+++ llvm/trunk/utils/TableGen/InstrInfoEmitter.cpp Fri Nov 15 16:34:48 2013<br>
@@ -408,13 +408,14 @@ void InstrInfoEmitter::run(raw_ostream &<br>
   OS << "namespace llvm {\n";<br>
   OS << "struct " << ClassName << " : public TargetInstrInfo {\n"<br>
      << "  explicit " << ClassName << "(int SO = -1, int DO = -1);\n"<br>
+     << "  virtual ~" << ClassName << "();\n"<br>
      << "};\n";<br>
   OS << "} // End llvm namespace \n";<br>
<br>
   OS << "#endif // GET_INSTRINFO_HEADER\n\n";<br>
<br>
-  OS << "\n#ifdef GET_INSTRINFO_CTOR\n";<br>
-  OS << "#undef GET_INSTRINFO_CTOR\n";<br>
+  OS << "\n#ifdef GET_INSTRINFO_CTOR_DTOR\n";<br>
+  OS << "#undef GET_INSTRINFO_CTOR_DTOR\n";<br>
<br>
   OS << "namespace llvm {\n";<br>
   OS << "extern const MCInstrDesc " << TargetName << "Insts[];\n";<br>
@@ -424,10 +425,11 @@ void InstrInfoEmitter::run(raw_ostream &<br>
      << "  : TargetInstrInfo(SO, DO) {\n"<br>
      << "  InitMCInstrInfo(" << TargetName << "Insts, "<br>
      << TargetName << "InstrNameIndices, " << TargetName << "InstrNameData, "<br>
-     << NumberedInstructions.size() << ");\n}\n";<br>
+     << NumberedInstructions.size() << ");\n}\n"<br>
+     << ClassName << "::~" << ClassName << "() {}\n";<br>
   OS << "} // End llvm namespace \n";<br>
<br>
-  OS << "#endif // GET_INSTRINFO_CTOR\n\n";<br>
+  OS << "#endif // GET_INSTRINFO_CTOR_DTOR\n\n";<br>
<br>
   emitOperandNameMappings(OS, Target, NumberedInstructions);<br>
 }<br>
<br>
Modified: llvm/trunk/utils/TableGen/SetTheory.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/SetTheory.cpp?rev=194865&r1=194864&r2=194865&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/SetTheory.cpp?rev=194865&r1=194864&r2=194865&view=diff</a><br>

==============================================================================<br>
--- llvm/trunk/utils/TableGen/SetTheory.cpp (original)<br>
+++ llvm/trunk/utils/TableGen/SetTheory.cpp Fri Nov 15 16:34:48 2013<br>
@@ -27,14 +27,16 @@ typedef SetTheory::RecVec RecVec;<br>
<br>
 // (add a, b, ...) Evaluate and union all arguments.<br>
 struct AddOp : public SetTheory::Operator {<br>
-  void apply(SetTheory &ST, DagInit *Expr, RecSet &Elts, ArrayRef<SMLoc> Loc) {<br>
+  virtual void apply(SetTheory &ST, DagInit *Expr, RecSet &Elts,<br>
+                     ArrayRef<SMLoc> Loc) {<br>
     ST.evaluate(Expr->arg_begin(), Expr->arg_end(), Elts, Loc);<br>
   }<br>
 };<br>
<br>
 // (sub Add, Sub, ...) Set difference.<br>
 struct SubOp : public SetTheory::Operator {<br>
-  void apply(SetTheory &ST, DagInit *Expr, RecSet &Elts, ArrayRef<SMLoc> Loc) {<br>
+  virtual void apply(SetTheory &ST, DagInit *Expr, RecSet &Elts,<br>
+                     ArrayRef<SMLoc> Loc) {<br>
     if (Expr->arg_size() < 2)<br>
       PrintFatalError(Loc, "Set difference needs at least two arguments: " +<br>
         Expr->getAsString());<br>
@@ -49,7 +51,8 @@ struct SubOp : public SetTheory::Operato<br>
<br>
 // (and S1, S2) Set intersection.<br>
 struct AndOp : public SetTheory::Operator {<br>
-  void apply(SetTheory &ST, DagInit *Expr, RecSet &Elts, ArrayRef<SMLoc> Loc) {<br>
+  virtual void apply(SetTheory &ST, DagInit *Expr, RecSet &Elts,<br>
+                     ArrayRef<SMLoc> Loc) {<br>
     if (Expr->arg_size() != 2)<br>
       PrintFatalError(Loc, "Set intersection requires two arguments: " +<br>
         Expr->getAsString());<br>
@@ -68,7 +71,8 @@ struct SetIntBinOp : public SetTheory::O<br>
                      RecSet &Set, int64_t N,<br>
                      RecSet &Elts, ArrayRef<SMLoc> Loc) =0;<br>
<br>
-  void apply(SetTheory &ST, DagInit *Expr, RecSet &Elts, ArrayRef<SMLoc> Loc) {<br>
+  virtual void apply(SetTheory &ST, DagInit *Expr, RecSet &Elts,<br>
+                     ArrayRef<SMLoc> Loc) {<br>
     if (Expr->arg_size() != 2)<br>
       PrintFatalError(Loc, "Operator requires (Op Set, Int) arguments: " +<br>
         Expr->getAsString());<br>
@@ -84,9 +88,9 @@ struct SetIntBinOp : public SetTheory::O<br>
<br>
 // (shl S, N) Shift left, remove the first N elements.<br>
 struct ShlOp : public SetIntBinOp {<br>
-  void apply2(SetTheory &ST, DagInit *Expr,<br>
-             RecSet &Set, int64_t N,<br>
-             RecSet &Elts, ArrayRef<SMLoc> Loc) {<br>
+  virtual void apply2(SetTheory &ST, DagInit *Expr,<br>
+                      RecSet &Set, int64_t N,<br>
+                      RecSet &Elts, ArrayRef<SMLoc> Loc) {<br>
     if (N < 0)<br>
       PrintFatalError(Loc, "Positive shift required: " +<br>
         Expr->getAsString());<br>
@@ -97,9 +101,9 @@ struct ShlOp : public SetIntBinOp {<br>
<br>
 // (trunc S, N) Truncate after the first N elements.<br>
 struct TruncOp : public SetIntBinOp {<br>
-  void apply2(SetTheory &ST, DagInit *Expr,<br>
-             RecSet &Set, int64_t N,<br>
-             RecSet &Elts, ArrayRef<SMLoc> Loc) {<br>
+  virtual void apply2(SetTheory &ST, DagInit *Expr,<br>
+                      RecSet &Set, int64_t N,<br>
+                      RecSet &Elts, ArrayRef<SMLoc> Loc) {<br>
     if (N < 0)<br>
       PrintFatalError(Loc, "Positive length required: " +<br>
         Expr->getAsString());<br>
@@ -115,9 +119,9 @@ struct RotOp : public SetIntBinOp {<br>
<br>
   RotOp(bool Rev) : Reverse(Rev) {}<br>
<br>
-  void apply2(SetTheory &ST, DagInit *Expr,<br>
-             RecSet &Set, int64_t N,<br>
-             RecSet &Elts, ArrayRef<SMLoc> Loc) {<br>
+  virtual void apply2(SetTheory &ST, DagInit *Expr,<br>
+                      RecSet &Set, int64_t N,<br>
+                      RecSet &Elts, ArrayRef<SMLoc> Loc) {<br>
     if (Reverse)<br>
       N = -N;<br>
     // N > 0 -> rotate left, N < 0 -> rotate right.<br>
@@ -134,9 +138,9 @@ struct RotOp : public SetIntBinOp {<br>
<br>
 // (decimate S, N) Pick every N'th element of S.<br>
 struct DecimateOp : public SetIntBinOp {<br>
-  void apply2(SetTheory &ST, DagInit *Expr,<br>
-             RecSet &Set, int64_t N,<br>
-             RecSet &Elts, ArrayRef<SMLoc> Loc) {<br>
+  virtual void apply2(SetTheory &ST, DagInit *Expr,<br>
+                      RecSet &Set, int64_t N,<br>
+                      RecSet &Elts, ArrayRef<SMLoc> Loc) {<br>
     if (N <= 0)<br>
       PrintFatalError(Loc, "Positive stride required: " +<br>
         Expr->getAsString());<br>
@@ -147,7 +151,8 @@ struct DecimateOp : public SetIntBinOp {<br>
<br>
 // (interleave S1, S2, ...) Interleave elements of the arguments.<br>
 struct InterleaveOp : public SetTheory::Operator {<br>
-  void apply(SetTheory &ST, DagInit *Expr, RecSet &Elts, ArrayRef<SMLoc> Loc) {<br>
+  virtual void apply(SetTheory &ST, DagInit *Expr, RecSet &Elts,<br>
+                     ArrayRef<SMLoc> Loc) {<br>
     // Evaluate the arguments individually.<br>
     SmallVector<RecSet, 4> Args(Expr->getNumArgs());<br>
     unsigned MaxSize = 0;<br>
@@ -165,7 +170,8 @@ struct InterleaveOp : public SetTheory::<br>
<br>
 // (sequence "Format", From, To) Generate a sequence of records by name.<br>
 struct SequenceOp : public SetTheory::Operator {<br>
-  void apply(SetTheory &ST, DagInit *Expr, RecSet &Elts, ArrayRef<SMLoc> Loc) {<br>
+  virtual void apply(SetTheory &ST, DagInit *Expr, RecSet &Elts,<br>
+                     ArrayRef<SMLoc> Loc) {<br>
     int Step = 1;<br>
     if (Expr->arg_size() > 4)<br>
       PrintFatalError(Loc, "Bad args to (sequence \"Format\", From, To): " +<br>
@@ -232,15 +238,16 @@ struct FieldExpander : public SetTheory:<br>
<br>
   FieldExpander(StringRef fn) : FieldName(fn) {}<br>
<br>
-  void expand(SetTheory &ST, Record *Def, RecSet &Elts) {<br>
+  virtual void expand(SetTheory &ST, Record *Def, RecSet &Elts) {<br>
     ST.evaluate(Def->getValueInit(FieldName), Elts, Def->getLoc());<br>
   }<br>
 };<br>
 } // end anonymous namespace<br>
<br>
-void SetTheory::Operator::anchor() { }<br>
+// pin vtables to this file<br>
+void SetTheory::Operator::anchor() {}<br>
+void SetTheory::Expander::anchor() {}<br>
<br>
-void SetTheory::Expander::anchor() { }<br>
<br>
 SetTheory::SetTheory() {<br>
   addOperator("add", new AddOp);<br>
<br>
Modified: llvm/trunk/utils/TableGen/TGValueTypes.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/TGValueTypes.cpp?rev=194865&r1=194864&r2=194865&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/TGValueTypes.cpp?rev=194865&r1=194864&r2=194865&view=diff</a><br>

==============================================================================<br>
--- llvm/trunk/utils/TableGen/TGValueTypes.cpp (original)<br>
+++ llvm/trunk/utils/TableGen/TGValueTypes.cpp Fri Nov 15 16:34:48 2013<br>
@@ -35,9 +35,11 @@ public:<br>
   }<br>
   Type(TypeKind K) : Kind(K) {}<br>
   virtual unsigned getSizeInBits() const = 0;<br>
-  virtual ~Type() {}<br>
+  virtual ~Type();<br>
 };<br>
<br>
+Type::~Type() {}<br>
+<br>
 }<br>
<br>
 class ExtendedIntegerType : public Type {<br>
@@ -45,10 +47,11 @@ class ExtendedIntegerType : public Type<br>
 public:<br>
   explicit ExtendedIntegerType(unsigned bits)<br>
     : Type(TK_ExtendedIntegerType), BitWidth(bits) {}<br>
+  virtual ~ExtendedIntegerType();<br>
   static bool classof(const Type *T) {<br>
     return T->getKind() == TK_ExtendedIntegerType;<br>
   }<br>
-  unsigned getSizeInBits() const {<br>
+  virtual unsigned getSizeInBits() const {<br>
     return getBitWidth();<br>
   }<br>
   unsigned getBitWidth() const {<br>
@@ -56,16 +59,20 @@ public:<br>
   }<br>
 };<br>
<br>
+ExtendedIntegerType::~ExtendedIntegerType() {}<br>
+<br>
+<br>
 class ExtendedVectorType : public Type {<br>
   EVT ElementType;<br>
   unsigned NumElements;<br>
 public:<br>
   ExtendedVectorType(EVT elty, unsigned num)<br>
     : Type(TK_ExtendedVectorType), ElementType(elty), NumElements(num) {}<br>
+  virtual ~ExtendedVectorType();<br>
   static bool classof(const Type *T) {<br>
     return T->getKind() == TK_ExtendedVectorType;<br>
   }<br>
-  unsigned getSizeInBits() const {<br>
+  virtual unsigned getSizeInBits() const {<br>
     return getNumElements() * getElementType().getSizeInBits();<br>
   }<br>
   EVT getElementType() const {<br>
@@ -76,6 +83,9 @@ public:<br>
   }<br>
 };<br>
<br>
+ExtendedVectorType::~ExtendedVectorType() {}<br>
+<br>
+<br>
 static std::map<unsigned, const Type *><br>
   ExtendedIntegerTypeMap;<br>
 static std::map<std::pair<uintptr_t, uintptr_t>, const Type *><br>
<br>
Modified: llvm/trunk/utils/unittest/googletest/include/gtest/gtest-test-part.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/unittest/googletest/include/gtest/gtest-test-part.h?rev=194865&r1=194864&r2=194865&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/unittest/googletest/include/gtest/gtest-test-part.h?rev=194865&r1=194864&r2=194865&view=diff</a><br>

==============================================================================<br>
--- llvm/trunk/utils/unittest/googletest/include/gtest/gtest-test-part.h (original)<br>
+++ llvm/trunk/utils/unittest/googletest/include/gtest/gtest-test-part.h Fri Nov 15 16:34:48 2013<br>
@@ -142,7 +142,7 @@ class GTEST_API_ TestPartResultArray {<br>
 // This interface knows how to report a test part result.<br>
 class TestPartResultReporterInterface {<br>
  public:<br>
-  virtual ~TestPartResultReporterInterface() {}<br>
+  virtual ~TestPartResultReporterInterface();<br>
<br>
   virtual void ReportTestPartResult(const TestPartResult& result) = 0;<br>
 };<br>
<br>
Modified: llvm/trunk/utils/unittest/googletest/include/gtest/gtest.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/unittest/googletest/include/gtest/gtest.h?rev=194865&r1=194864&r2=194865&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/unittest/googletest/include/gtest/gtest.h?rev=194865&r1=194864&r2=194865&view=diff</a><br>

==============================================================================<br>
--- llvm/trunk/utils/unittest/googletest/include/gtest/gtest.h (original)<br>
+++ llvm/trunk/utils/unittest/googletest/include/gtest/gtest.h Fri Nov 15 16:34:48 2013<br>
@@ -910,7 +910,7 @@ class GTEST_API_ TestCase {<br>
 class Environment {<br>
  public:<br>
   // The d'tor is virtual as we need to subclass Environment.<br>
-  virtual ~Environment() {}<br>
+  virtual ~Environment();<br>
<br>
   // Override this to define how to set up the environment.<br>
   virtual void SetUp() {}<br>
@@ -928,7 +928,7 @@ class Environment {<br>
 // the order the corresponding events are fired.<br>
 class TestEventListener {<br>
  public:<br>
-  virtual ~TestEventListener() {}<br>
+  virtual ~TestEventListener();<br>
<br>
   // Fired before any test activity starts.<br>
   virtual void OnTestProgramStart(const UnitTest& unit_test) = 0;<br>
@@ -980,6 +980,7 @@ class TestEventListener {<br>
 // comments about each method please see the definition of TestEventListener<br>
 // above.<br>
 class EmptyTestEventListener : public TestEventListener {<br>
+  virtual void anchor();<br>
  public:<br>
   virtual void OnTestProgramStart(const UnitTest& /*unit_test*/) {}<br>
   virtual void OnTestIterationStart(const UnitTest& /*unit_test*/,<br>
<br>
Modified: llvm/trunk/utils/unittest/googletest/include/gtest/internal/gtest-death-test-internal.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/unittest/googletest/include/gtest/internal/gtest-death-test-internal.h?rev=194865&r1=194864&r2=194865&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/unittest/googletest/include/gtest/internal/gtest-death-test-internal.h?rev=194865&r1=194864&r2=194865&view=diff</a><br>

==============================================================================<br>
--- llvm/trunk/utils/unittest/googletest/include/gtest/internal/gtest-death-test-internal.h (original)<br>
+++ llvm/trunk/utils/unittest/googletest/include/gtest/internal/gtest-death-test-internal.h Fri Nov 15 16:34:48 2013<br>
@@ -79,7 +79,7 @@ class GTEST_API_ DeathTest {<br>
   static bool Create(const char* statement, const RE* regex,<br>
                      const char* file, int line, DeathTest** test);<br>
   DeathTest();<br>
-  virtual ~DeathTest() { }<br>
+  virtual ~DeathTest();<br>
<br>
   // A helper class that aborts a death test when it's deleted.<br>
   class ReturnSentinel {<br>
@@ -139,7 +139,7 @@ class GTEST_API_ DeathTest {<br>
 // Factory interface for death tests.  May be mocked out for testing.<br>
 class DeathTestFactory {<br>
  public:<br>
-  virtual ~DeathTestFactory() { }<br>
+  virtual ~DeathTestFactory();<br>
   virtual bool Create(const char* statement, const RE* regex,<br>
                       const char* file, int line, DeathTest** test) = 0;<br>
 };<br>
<br>
Modified: llvm/trunk/utils/unittest/googletest/include/gtest/internal/gtest-internal.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/unittest/googletest/include/gtest/internal/gtest-internal.h?rev=194865&r1=194864&r2=194865&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/unittest/googletest/include/gtest/internal/gtest-internal.h?rev=194865&r1=194864&r2=194865&view=diff</a><br>

==============================================================================<br>
--- llvm/trunk/utils/unittest/googletest/include/gtest/internal/gtest-internal.h (original)<br>
+++ llvm/trunk/utils/unittest/googletest/include/gtest/internal/gtest-internal.h Fri Nov 15 16:34:48 2013<br>
@@ -105,6 +105,7 @@<br>
 #if !GTEST_NO_LLVM_RAW_OSTREAM<br>
 namespace llvm {<br>
 class convertible_fwd_ostream : public std::ostream {<br>
+  virtual void anchor();<br>
   raw_os_ostream ros_;<br>
<br>
 public:<br>
@@ -536,7 +537,7 @@ GTEST_API_ TypeId GetTestTypeId();<br>
 // of a Test object.<br>
 class TestFactoryBase {<br>
  public:<br>
-  virtual ~TestFactoryBase() {}<br>
+  virtual ~TestFactoryBase();<br>
<br>
   // Creates a test instance to run. The instance is both created and destroyed<br>
   // within TestInfoImpl::Run()<br>
<br>
Modified: llvm/trunk/utils/unittest/googletest/include/gtest/internal/gtest-param-util.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/unittest/googletest/include/gtest/internal/gtest-param-util.h?rev=194865&r1=194864&r2=194865&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/unittest/googletest/include/gtest/internal/gtest-param-util.h?rev=194865&r1=194864&r2=194865&view=diff</a><br>

==============================================================================<br>
--- llvm/trunk/utils/unittest/googletest/include/gtest/internal/gtest-param-util.h (original)<br>
+++ llvm/trunk/utils/unittest/googletest/include/gtest/internal/gtest-param-util.h Fri Nov 15 16:34:48 2013<br>
@@ -414,7 +414,7 @@ class TestMetaFactory<br>
 // and calls RegisterTests() on each of them when asked.<br>
 class ParameterizedTestCaseInfoBase {<br>
  public:<br>
-  virtual ~ParameterizedTestCaseInfoBase() {}<br>
+  virtual ~ParameterizedTestCaseInfoBase();<br>
<br>
   // Base part of test case name for display purposes.<br>
   virtual const string& GetTestCaseName() const = 0;<br>
<br>
Modified: llvm/trunk/utils/unittest/googletest/include/gtest/internal/gtest-port.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/unittest/googletest/include/gtest/internal/gtest-port.h?rev=194865&r1=194864&r2=194865&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/unittest/googletest/include/gtest/internal/gtest-port.h?rev=194865&r1=194864&r2=194865&view=diff</a><br>

==============================================================================<br>
--- llvm/trunk/utils/unittest/googletest/include/gtest/internal/gtest-port.h (original)<br>
+++ llvm/trunk/utils/unittest/googletest/include/gtest/internal/gtest-port.h Fri Nov 15 16:34:48 2013<br>
@@ -1116,7 +1116,7 @@ class Notification {<br>
 // problem.<br>
 class ThreadWithParamBase {<br>
  public:<br>
-  virtual ~ThreadWithParamBase() {}<br>
+  virtual ~ThreadWithParamBase();<br>
   virtual void Run() = 0;<br>
 };<br>
<br>
@@ -1290,7 +1290,7 @@ typedef GTestMutexLock MutexLock;<br>
 // ThreadLocalValueHolderBase.<br>
 class ThreadLocalValueHolderBase {<br>
  public:<br>
-  virtual ~ThreadLocalValueHolderBase() {}<br>
+  virtual ~ThreadLocalValueHolderBase();<br>
 };<br>
<br>
 // Called by pthread to delete thread-local data stored by<br>
<br>
Modified: llvm/trunk/utils/unittest/googletest/src/gtest-death-test.cc<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/unittest/googletest/src/gtest-death-test.cc?rev=194865&r1=194864&r2=194865&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/unittest/googletest/src/gtest-death-test.cc?rev=194865&r1=194864&r2=194865&view=diff</a><br>

==============================================================================<br>
--- llvm/trunk/utils/unittest/googletest/src/gtest-death-test.cc (original)<br>
+++ llvm/trunk/utils/unittest/googletest/src/gtest-death-test.cc Fri Nov 15 16:34:48 2013<br>
@@ -300,6 +300,8 @@ DeathTest::DeathTest() {<br>
   }<br>
 }<br>
<br>
+DeathTest::~DeathTest() {}<br>
+<br>
 // Creates and returns a death test by dispatching to the current<br>
 // death test factory.<br>
 bool DeathTest::Create(const char* statement, const RE* regex,<br>
@@ -733,6 +735,8 @@ DeathTest::TestRole WindowsDeathTest::As<br>
 }<br>
 # else  // We are not on Windows.<br>
<br>
+DeathTestFactory::~DeathTestFactory() {}<br>
+<br>
 // ForkingDeathTest provides implementations for most of the abstract<br>
 // methods of the DeathTest interface.  Only the AssumeRole method is<br>
 // left undefined.<br>
<br>
Modified: llvm/trunk/utils/unittest/googletest/src/gtest-internal-inl.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/unittest/googletest/src/gtest-internal-inl.h?rev=194865&r1=194864&r2=194865&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/unittest/googletest/src/gtest-internal-inl.h?rev=194865&r1=194864&r2=194865&view=diff</a><br>

==============================================================================<br>
--- llvm/trunk/utils/unittest/googletest/src/gtest-internal-inl.h (original)<br>
+++ llvm/trunk/utils/unittest/googletest/src/gtest-internal-inl.h Fri Nov 15 16:34:48 2013<br>
@@ -408,7 +408,7 @@ GTEST_API_ FilePath GetCurrentExecutable<br>
 class OsStackTraceGetterInterface {<br>
  public:<br>
   OsStackTraceGetterInterface() {}<br>
-  virtual ~OsStackTraceGetterInterface() {}<br>
+  virtual ~OsStackTraceGetterInterface();<br>
<br>
   // Returns the current OS stack trace as a String.  Parameters:<br>
   //<br>
<br>
Modified: llvm/trunk/utils/unittest/googletest/src/gtest-port.cc<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/unittest/googletest/src/gtest-port.cc?rev=194865&r1=194864&r2=194865&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/unittest/googletest/src/gtest-port.cc?rev=194865&r1=194864&r2=194865&view=diff</a><br>

==============================================================================<br>
--- llvm/trunk/utils/unittest/googletest/src/gtest-port.cc (original)<br>
+++ llvm/trunk/utils/unittest/googletest/src/gtest-port.cc Fri Nov 15 16:34:48 2013<br>
@@ -746,5 +746,15 @@ const char* StringFromGTestEnv(const cha<br>
   return value == NULL ? default_value : value;<br>
 }<br>
<br>
+ThreadWithParamBase::~ThreadWithParamBase() {}<br>
+ThreadLocalValueHolderBase::~ThreadLocalValueHolderBase() {}<br>
+TestFactoryBase::~TestFactoryBase() {}<br>
+<br>
 }  // namespace internal<br>
 }  // namespace testing<br>
+<br>
+#if !GTEST_NO_LLVM_RAW_OSTREAM<br>
+namespace llvm {<br>
+void convertible_fwd_ostream::anchor() {}<br>
+}<br>
+#endif<br>
<br>
Modified: llvm/trunk/utils/unittest/googletest/src/gtest.cc<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/unittest/googletest/src/gtest.cc?rev=194865&r1=194864&r2=194865&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/unittest/googletest/src/gtest.cc?rev=194865&r1=194864&r2=194865&view=diff</a><br>

==============================================================================<br>
--- llvm/trunk/utils/unittest/googletest/src/gtest.cc (original)<br>
+++ llvm/trunk/utils/unittest/googletest/src/gtest.cc Fri Nov 15 16:34:48 2013<br>
@@ -4863,4 +4863,13 @@ void InitGoogleTest(int* argc, wchar_t**<br>
   internal::InitGoogleTestImpl(argc, argv);<br>
 }<br>
<br>
+Environment::~Environment() {}<br>
+TestPartResultReporterInterface::~TestPartResultReporterInterface() {}<br>
+TestEventListener::~TestEventListener() {}<br>
+void EmptyTestEventListener::anchor() {}<br>
+namespace internal {<br>
+OsStackTraceGetterInterface::~OsStackTraceGetterInterface() {}<br>
+ParameterizedTestCaseInfoBase::~ParameterizedTestCaseInfoBase() {}<br>
+}<br>
+<br>
 }  // namespace testing<br>
<br>
<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div>Alexey Samsonov, MSK</div>
</div>