<div dir="ltr">Hello, <br><div><br></div><div>I have some difficulties building the pass specified in lib/Transform/Hello.cpp. <br><br>I use LLVM 3.6.0 built by CMake. The system is on Mac OS 10.9.<br><br>As required by the documentation of LLVM 3.6,  <br><u><a href="http://llvm.org/releases/3.6.0/docs/WritingAnLLVMPass.html#quick-start-writing-hello-world">http://llvm.org/releases/3.6.0/docs/WritingAnLLVMPass.html#quick-start-writing-hello-world</a><br></u>I put the CMake project of 'Hello pass' outside the source tree. Its structure is as follows:<br></div><div><i><root_of_Hello_project><br></i></div><div><i>├── CMakeLists.txt<br>└── Hello (directory)<br>    ├── CMakeLists.txt<br>    ├── Hello.cpp<br>    └── _build  ( directory)</i><br></div><div>                 ...<br><br>I use these command lines to compile the pass:<br><i><br>$ cd <root_of_Hello_project>/Hello/_build<br>$ cmake -DLLVM_DIR=<path>/share/llvm/cmake/ ../../<br></i></div><div><i>$ make</i><br><br></div><div>where the <path> above is where I built the whole LLVM using CMake. <br><br>I get strange error message <br><br>............<br><div><i>/Users/hostname/MyLib/clang_llvm_src_bin_0409/llvm-3.6.0.src/include/llvm/ADT/Twine.h:83:10: error: ISO</i></div><div><i>      C++ forbids forward references to 'enum' types</i></div><div><i>    enum NodeKind : unsigned char {</i></div><div><i>         ^</i></div><div><i>/Users/hostname/MyLib/clang_llvm_src_bin_0409/llvm-3.6.0.src/include/llvm/ADT/Twine.h:83:30: error:</i></div><div><i>      expected '(' for function-style cast or type construction</i></div><div><i>    enum NodeKind : unsigned char {</i></div><div><i>                    ~~~~~~~~ ^</i></div><div><i>/Users/hostname/MyLib/clang_llvm_src_bin_0409/llvm-3.6.0.src/include/llvm/ADT/Twine.h:83:5: error: field</i></div><div><i>      has incomplete type 'enum NodeKind'</i></div><div><i>    enum NodeKind : unsigned char {</i></div><div><i>    ^</i></div><div><i>/Users/hostname/MyLib/clang_llvm_src_bin_0409/llvm-3.6.0.src/include/llvm/ADT/Twine.h:83:10: note:</i></div><div><i>      forward declaration of 'llvm::NodeKind'</i></div><div><i>    enum NodeKind : unsigned char {</i><br><br></div><div>Any idea to fix this? Thanks in advance. <br></div><br clear="all"><div><div class="gmail_signature">Zhoulai</div></div>
</div><div>
</div>
</div>