obj2yaml: Use the correct relocation type for different machine types
[oota-llvm.git] / lib / IR / LLVMContextImpl.cpp
index 8fc9379e5bf9c58ac83572c7bc93c43675118be2..ebff9d3a51f69631d38e93e05e6f84691a2d5d84 100644 (file)
@@ -35,8 +35,10 @@ LLVMContextImpl::LLVMContextImpl(LLVMContext &C)
     Int16Ty(C, 16),
     Int32Ty(C, 32),
     Int64Ty(C, 64) {
-  DiagHandler = 0;
-  DiagContext = 0;
+  InlineAsmDiagHandler = 0;
+  InlineAsmDiagContext = 0;
+  DiagnosticHandler = 0;
+  DiagnosticContext = 0;
   NamedStructTypesUniqueID = 0;
 }
 
@@ -109,6 +111,13 @@ LLVMContextImpl::~LLVMContextImpl() {
     delete &*Elem;
   }
 
+  // Destroy attribute node lists.
+  for (FoldingSetIterator<AttributeSetNode> I = AttrsSetNodes.begin(),
+         E = AttrsSetNodes.end(); I != E; ) {
+    FoldingSetIterator<AttributeSetNode> Elem = I++;
+    delete &*Elem;
+  }
+
   // Destroy MDNodes.  ~MDNode can move and remove nodes between the MDNodeSet
   // and the NonUniquedMDNodes sets, so copy the values out first.
   SmallVector<MDNode*, 8> MDNodes;