Fix issue #3221 (@assumeUsed on global union) (#3222)

This commit is contained in:
Martin Kinkelin 2019-11-11 20:56:33 +01:00 committed by GitHub
parent 637a8af264
commit 211682e710
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 18 additions and 4 deletions

View file

@ -249,16 +249,16 @@ void CodeGenerator::finishLLModule(Module *m) {
void CodeGenerator::writeAndFreeLLModule(const char *filename) {
ir_->objc.finalize();
// Issue #1829: make sure all replaced global variables are replaced
// everywhere.
ir_->replaceGlobals();
ir_->DBuilder.Finalize();
generateBitcodeForDynamicCompile(ir_);
emitLLVMUsedArray(*ir_);
emitLinkerOptions(*ir_, ir_->module, ir_->context());
// Issue #1829: make sure all replaced global variables are replaced
// everywhere.
ir_->replaceGlobals();
// Emit ldc version as llvm.ident metadata.
llvm::NamedMDNode *IdentMetadata =
ir_->module.getOrInsertNamedMetadata("llvm.ident");