Hello;<div><br></div><div>I wanted to insert two new terminator instructions in LLVM IR.  I modified the necessary files (as mentioned in the tutorial in LLVM site and some more to meet the new structure of LLVM, (e.g no Lexer.l now, we have LLLexer.cpp.  Again in the tutorial, files like LLVMBitCodes.h, include/llvm-c/core.h that need to be modified are not mentioned) But I am getting the error while building LLVM.  The SelectionDagBuilder.cpp file is giving the error.</div>
<div><br></div><div><div><i><b>In file included from /home/arnie/llvm-svn/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp:946:0:</b></i></div><div><i><b>/home/arnie/llvm-svn/llvm/include/llvm/Instruction.def: In member function ‘void llvm::SelectionDAGBuilder::visit(unsigned int, const llvm::User&)’:</b></i></div>
<div><i><b>/home/arnie/llvm-svn/llvm/include/llvm/Instruction.def:104:1: error: ‘visitXXX’ was not declared in this scope</b></i></div><div><i><b>/home/arnie/llvm-svn/llvm/include/llvm/Instruction.def:105:1: error: ‘visitYYY’ was not declared in this scope</b></i></div>
</div><div><br></div><div>But part of my Instruction.def looks like this (after inserting XXX and YYY)- .</div><div>.......</div><div><div>HANDLE_TERM_INST  ( 7, Unreachable, UnreachableInst)</div><div>HANDLE_TERM_INST  ( 8, XXX      , XXXInst)</div>
<div>HANDLE_TERM_INST  ( 9, YYY     , YYYInst)</div></div><div>  LAST_TERM_INST  ( 9)</div><div>.......</div><div>Can anybody guess what may be the reason of this error?  Did I miss any files that need to be modified. Below are the list of files I modified to add new LLVM IR instruction.</div>
<div><br></div><div><div>llvm/include/llvm/Instruction.def</div><div>llvm/include/llvm/Instructions.h</div>
<div>llvm/include/llvm/Support/InstVisitor.h</div><div>llvm/lib/AsmParser/< necessary files></div><div>llvm/include/llvm/Bitcode/LLVMBitCodes.h</div><div>llvm/lib/Bitcode/Reader/BitcodeReader.cpp</div><div>llvm/lib/VMCore/Instruction.cpp</div>

<div>llvm/lib/VMCore/Instructions.cpp</div></div><div>llvm/include/llvm-c/core.h</div><div><br></div><div>Thank you;</div><div><br clear="all"><div><br></div>-- <br>Arnamoy Bhattacharyya<br>Athabasca Hall 143<br>Department of Computing Science - University of Alberta<br>

Edmonton, Alberta, Canada, T6G 2E8<br><a href="tel:780-680-7073" value="+17806807073" target="_blank">780-680-7073</a><br>
</div>