LLVMContext::setDiscardValueNames(true) when not compiling to textual IR.

Resolves #1749
This commit is contained in:
Johan Engelen 2016-09-13 14:52:45 +02:00
parent b17e1485ed
commit b70042a85e
4 changed files with 67 additions and 0 deletions

View file

@ -84,6 +84,13 @@ CodeGenerator::CodeGenerator(llvm::LLVMContext &context, bool singleObj)
"configured properly");
fatal();
}
#if LDC_LLVM_VER >= 309
// Set the context to discard value names when not generating textual IR.
if (!global.params.output_ll) {
context_.setDiscardValueNames(true);
}
#endif
}
CodeGenerator::~CodeGenerator() {