Skip to content

Instantly share code, notes, and snippets.

@jonte
Created May 14, 2011 13:26
Show Gist options
  • Save jonte/972206 to your computer and use it in GitHub Desktop.
Save jonte/972206 to your computer and use it in GitHub Desktop.
LLVM register error
; The error:
; llvm-as: core012.ll:84:1: error: instruction expected to be numbered '%4'
; %3 = getelementptr [6 x i8]* @.const1, i32 0, i64 0
; ^
define void @printBool(i1 %par.b) {
entry:
%b = alloca i1
store i1 %par.b, i1* %b
%0 = load i1* %b
br i1 %0, label %lab0, label %lab1
lab0:
%1 = getelementptr [5 x i8]* @.const0, i32 0, i64 0
%2 = call i32 @printString(i8* %1) nounwind
br label %return
br label %lab1
lab1:
%3 = getelementptr [6 x i8]* @.const1, i32 0, i64 0 ; <---------- This is the line
%4 = call i32 @printString(i8* %3) nounwind
br label %return
br label %lab2
lab2:
br label %return
br label %return
return:
ret void
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment