[K/N][codegen] Bug fix in debug info generator

This commit is contained in:
Igor Chevdar
2021-09-16 10:53:10 +05:00
parent 3eb7d32b21
commit f865238062
2 changed files with 2 additions and 0 deletions
@@ -619,6 +619,7 @@ internal class Llvm(val context: Context, val llvmModule: LLVMModuleRef) : Runti
}
}
val llvmInt1 = int1Type
val llvmInt8 = int8Type
val llvmInt16 = int16Type
val llvmInt32 = int32Type
@@ -223,6 +223,7 @@ internal fun IrType.alignment(context:Context) = context.debugInfo.llvmTypeAlign
internal fun IrType.llvmType(context:Context): LLVMTypeRef = context.debugInfo.llvmTypes.getOrElse(this) {
when(computePrimitiveBinaryTypeOrNull()) {
PrimitiveBinaryType.BOOLEAN -> context.llvm.llvmInt1
PrimitiveBinaryType.BYTE -> context.llvm.llvmInt8
PrimitiveBinaryType.SHORT -> context.llvm.llvmInt16
PrimitiveBinaryType.INT -> context.llvm.llvmInt32