Added back option to disable metadata generation and users. Set USE_METADATA to OFF in ccmake.

This commit is contained in:
Tomas Lindquist Olsen
2009-07-31 11:28:31 +02:00
parent b7b671ce48
commit d5d3ecdb05
9 changed files with 31 additions and 1 deletions

View File

@@ -71,6 +71,7 @@ LLGlobalVariable * IrStruct::getClassInfoSymbol()
classInfo = new llvm::GlobalVariable(
*gIR->module, tc->getPA().get(), false, _linkage, NULL, initname);
#if USE_METADATA
// Generate some metadata on this ClassInfo if it's for a class.
ClassDeclaration* classdecl = aggrdecl->isClassDeclaration();
if (classdecl && !aggrdecl->isInterfaceDeclaration()) {
@@ -90,6 +91,7 @@ LLGlobalVariable * IrStruct::getClassInfoSymbol()
std::string metaname = CD_PREFIX + initname;
llvm::NamedMDNode::Create(metaname, &metadata, 1, gIR->module);
}
#endif // USE_METADATA
return classInfo;
}