Fix multiple object storage. (#131)

This commit is contained in:
Nikolay Igotti
2016-12-08 16:45:47 +03:00
committed by GitHub
parent c9f2e1ca22
commit 34077e26ac
2 changed files with 2 additions and 2 deletions
@@ -618,6 +618,8 @@ internal class CodeGeneratorVisitor(val context: Context) : IrElementVisitorVoid
if (objectPtr == null) {
objectPtr = LLVMAddGlobal(context.llvmModule, codegen.getLLVMType(value.type), objName)
LLVMSetInitializer(objectPtr, codegen.kNullObjHeaderPtr)
// Backing storage for this global is common between all modules.
LLVMSetLinkage(objectPtr, LLVMLinkage.LLVMCommonLinkage)
}
val bbCurrent = codegen.currentBlock
-2
View File
@@ -329,8 +329,6 @@ task tostring2(type: RunKonanTest) {
}
task tostring3(type: RunKonanTest) {
// Enable, once double object init fixed.
disabled = true
goldValue = "-128\n127\n-32768\n32767\n" +
"-2147483648\n2147483647\n-9223372036854775808\n9223372036854775807\n" +
"1.17549E-38\n3.40282E+38\n-INF\nINF\n" +