[LLVMdev] Problems with the tools
Andreas Rumpf
Rumpf_A at web.de
Tue Jun 12 01:34:00 PDT 2007
I just built LLVM 2.0 on Windows with Visual C++ 2005. After a few tweaks, it produced several nice .exe files.
I tried to compile a simple Hello-World program as given in the documentation:
--------------------------------------------------------------------------------------
; Declare the string constant as a global constant...
%.LC0 = internal constant [13 x i8 ] c"hello world\0A\00" ; [13 x i8 ]*
; External declaration of the puts function
declare i32 %puts(i8 *) ; i32(i8 *)*
; Definition of main function
define i32 %main() { ; i32()*
; Convert [13x i8 ]* to i8 *...
%cast210 = getelementptr [13 x i8 ]* %.LC0, i64 0, i64 0 ; i8 *
; Call puts function to write out the string to stdout...
call i32 %puts(i8 * %cast210) ; i32
ret i32 0
}
----------------------------------------------------------------------------------------
However this is all I get:
C:\Eigenes\compiler\llvm-2.0\win32\release>llvm-as hellow.ll
llvm-as: hellow.ll:2,0: hellow.ll:2: error: syntax error, unexpected INTERNAL, e
xpecting TYPE while reading token: 'internal'
_______________________________________________________________
SMS schreiben mit WEB.DE FreeMail - einfach, schnell und
kostenguenstig. Jetzt gleich testen! http://f.web.de/?mc=021192
More information about the llvm-dev
mailing list