mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-01-23 16:23:14 +01:00
Fixed ModuleInfo module name emission.
The name string is actually emitted inline, not as a pointer to a global. GitHub: Fixes #243.
This commit is contained in:
@@ -510,8 +510,12 @@ void Module::genmoduleinfo()
|
||||
b.push(localClasses);
|
||||
}
|
||||
|
||||
// Put out module name as a 0-terminated string, to save bytes
|
||||
b.push(DtoConstStringPtr(toPrettyChars()));
|
||||
// Put out module name as a 0-terminated string.
|
||||
const char *name = toPrettyChars();
|
||||
const size_t len = strlen(name) + 1;
|
||||
llvm::IntegerType *it = llvm::IntegerType::getInt8Ty(gIR->context());
|
||||
llvm::ArrayType *at = llvm::ArrayType::get(it, len);
|
||||
b.push(toConstantArray(it, at, name, len, false));
|
||||
|
||||
// create and set initializer
|
||||
b.finalize(moduleInfoType, moduleInfoSymbol());
|
||||
|
||||
Reference in New Issue
Block a user