Does anyone know what this error means? I get an error when I try to parse a file written by LLVMWriteBitcodeToFile. When I reset the module using LLVMDumpModule and manually assemble and parse the file, an error does not occur. The module I'm trying to compile (from LLVMDumpModule) is as follows:
; ModuleID = 'Test'
define i32 @a(i32) {
entry:
%icmp = icmp eq i32 %0, 1 ; <i1> [
br i1 %icmp, label %_L2, label %_L3
_L1: ; preds = %_L3
ret i32 %0
call void @RAISE(i32 1)
unreachable
_L2: ; preds = %entry
ret i32 1
_L3: ; preds = %entry
br label %_L1
}
declare void @RAISE(i32)
Any clues?
source
share