IntegerType is now contextifed.

Requires llvm >= 78969. resistor says this will be the last context API change :)
This commit is contained in:
Benjamin Kramer
2009-08-14 00:39:18 +02:00
parent f3aad137c5
commit c220dcac05
31 changed files with 290 additions and 289 deletions

View File

@@ -83,13 +83,13 @@ LLGlobalVariable * IrStruct::getClassInfoSymbol()
// Construct the fields
MDNodeField* mdVals[CD_NumFields];
mdVals[CD_BodyType] = llvm::UndefValue::get(bodyType);
mdVals[CD_Finalize] = LLConstantInt::get(LLType::Int1Ty, hasDestructor);
mdVals[CD_CustomDelete] = LLConstantInt::get(LLType::Int1Ty, hasCustomDelete);
mdVals[CD_Finalize] = LLConstantInt::get(LLType::getInt1Ty(gIR->context()), hasDestructor);
mdVals[CD_CustomDelete] = LLConstantInt::get(LLType::getInt1Ty(gIR->context()), hasCustomDelete);
// Construct the metadata
llvm::MetadataBase* metadata = llvm::MDNode::get(gIR->context(), mdVals, CD_NumFields);
// Insert it into the module
std::string metaname = CD_PREFIX + initname;
llvm::NamedMDNode::Create(metaname, &metadata, 1, gIR->module);
llvm::NamedMDNode::Create(gIR->context(), metaname, &metadata, 1, gIR->module);
}
#endif // USE_METADATA