Suppose the following simple C file
#include <stdlib.h>
int main (void) {
return EXIT_SUCCESS;
}
and its LLVM IR representation (created with LLVM 3.5 and clang -emit-llvm -S hello.c -o hello.c.bc)
; ModuleID = 'hello.c'
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"
; Function Attrs: nounwind uwtable
define i32 @main() #0 {
%1 = alloca i32, align 4
store i32 0, i32* %1
ret i32 0
}
attributes #0 = { nounwind uwtable "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "unsafe-fp-math"="false" "use-soft-float"="false" }
!llvm.ident = !{!0}
!0 = metadata !{metadata !"clang version 3.5.2 (tags/RELEASE_352/final)"}
If I call llvm2kittel on the LLVM file then I get the following error message LLVM bitcode file doesn't contain a valid module..
What is missing here? Do I need an additional flag for clang?
Thank you!
Suppose the following simple C file
and its LLVM IR representation (created with LLVM 3.5 and
clang -emit-llvm -S hello.c -o hello.c.bc)If I call llvm2kittel on the LLVM file then I get the following error message
LLVM bitcode file doesn't contain a valid module..What is missing here? Do I need an additional flag for clang?
Thank you!