[LLVMdev] Compile error for the Hello pass example
Trevor Harmon
Trevor.W.Harmon at nasa.gov
Fri Aug 13 14:00:38 PDT 2010
On Aug 11, 2010, at 8:54 PM, θΏͺ wrote:
> I got the compile errors:
>
> Hello.cpp:20: error: expected identifier before string constant
> Hello.cpp:20: error: expected ',' or '...' before string constant
> Hello.cpp:20: error: expected constructor, destructor, or type
> conversion before ';' token
>
> which is the line "INITIALIZE_PASS(Hello, "Hello", "Hello World
> Pass", false, false);" in the code.
The docs you cited are for the LLVM trunk, and you may be using LLVM
2.7, which may not have a definition of INITIALIZE_PASS. Use the 2.7
docs instead:
http://llvm.org/releases/2.7/docs/WritingAnLLVMPass.html#basiccode
Trevor
More information about the llvm-dev
mailing list