Fix generating singleton value after Nothing-typed expression
This commit is contained in:
committed by
SvyatoslavScherbina
parent
e4757c2033
commit
00f0ea97ed
+1
-1
@@ -694,11 +694,11 @@ internal class FunctionGenerationContext(val function: LLVMValueRef,
|
|||||||
|
|
||||||
val shared = descriptor.objectIsShared && context.config.threadsAreAllowed
|
val shared = descriptor.objectIsShared && context.config.threadsAreAllowed
|
||||||
val objectPtr = codegen.getObjectInstanceStorage(descriptor, shared)
|
val objectPtr = codegen.getObjectInstanceStorage(descriptor, shared)
|
||||||
val bbCurrent = currentBlock
|
|
||||||
val bbInit = basicBlock("label_init", locationInfo)
|
val bbInit = basicBlock("label_init", locationInfo)
|
||||||
val bbExit = basicBlock("label_continue", locationInfo)
|
val bbExit = basicBlock("label_continue", locationInfo)
|
||||||
val objectVal = loadSlot(objectPtr, false)
|
val objectVal = loadSlot(objectPtr, false)
|
||||||
val objectInitialized = icmpUGt(ptrToInt(objectVal, codegen.intPtrType), codegen.immOneIntPtrType)
|
val objectInitialized = icmpUGt(ptrToInt(objectVal, codegen.intPtrType), codegen.immOneIntPtrType)
|
||||||
|
val bbCurrent = currentBlock
|
||||||
condBr(objectInitialized, bbExit, bbInit)
|
condBr(objectInitialized, bbExit, bbInit)
|
||||||
|
|
||||||
positionAtEnd(bbInit)
|
positionAtEnd(bbInit)
|
||||||
|
|||||||
Reference in New Issue
Block a user