mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-02-09 08:23:20 +01:00
Added back option to disable metadata generation and users. Set USE_METADATA to OFF in ccmake.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user