[LLVMdev] LLVM ARM code error

Seung Jae Lee lee225 at uiuc.edu
Fri Nov 17 15:05:43 PST 2006


#include <stdio.h>
   int main() {
     printf("hello world\n");
     return 0;
   }

“$ llvm-gcc hello.c -o hello”
“$ llc -march=arm hello.bc -o hello.arm" made error as follows:

llc: ARMISelDAGToDAG.cpp:73: llvm::SDOperand LowerCALL(llvm::SDOperand, llvm::SelectionDAG&): Assertion `isVarArg == false && "VarArg not supported"' failed. 
llc((anonymous namespace)::PrintStackTrace()+0x15)[0x850437d] 
llc((anonymous namespace)::SignalHandler(int)+0x139)[0x8504645] 
Aborted 

But, my fellow taught me this kind of error can be fixed by not using printf( );
So I changed the code like this:

#include <stdio.h>
   int main() {
     int i = 0;
     i++;
     return 0;
   }

And then I can make LLVM ARM code emit the ARM text assembly code.
Anyway, thank you, LLVM guys.

Seung Jae Lee




More information about the llvm-dev mailing list