tags:

views:

18

answers:

0

Someone know what this error means? I get the error when I try to disassemble a file written by LLVMWriteBitcodeToFile. When I dump the module using LLVMDumpModule and manually assemble and disassemble the file no error occurs. The module that i am trying to compile (from LLVMDumpModule) looks like:

; ModuleID = 'Test'

define i32 @a(i32) {
entry:
  %icmp = icmp eq i32 %0, 1                       ; <i1> [#uses=1]
  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?