mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-04-29 06:30:39 +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
|
@ -35,7 +35,7 @@ IRScope &IRScope::operator=(const IRScope &rhs) {
|
|||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
IRState::IRState(const char *name, llvm::LLVMContext &context)
|
||||
: module(name, context), DBuilder(this) {
|
||||
: module(name, context), DBuilder(this), objc(module) {
|
||||
ir.state = this;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue