mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-04-30 23:20:40 +03:00
Fix and refactor Objective-C state
Tie the state to an LLVM module/object file instead of having a global one. And finalize it once per LLVM module instead of once per D module (previously, as part of ModuleInfo generation). Fixes issue #2388.
This commit is contained in:
parent
183f97cd4e
commit
95915a8ab8
9 changed files with 130 additions and 112 deletions
|
@ -247,6 +247,8 @@ 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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue