<div dir="ltr">Hello Everyone,<br><br>I'm trying to add a new instruction to LLVM; a binary operator named "increment" that adds 1 to its LHS value.<br><br>I've followed this <a href="http://llvm.org/docs/ExtendingLLVM.html">http://llvm.org/docs/ExtendingLLVM.html</a> and added my operator in the required places however, LLVM does not recognize the "increment" opcode instruction in the bitcode file; I get the error: <b>expected instruction opcode</b>. at the place of "increment".<br><br>Then i try doing a make from build directory to make sure my instruction is added to the necessary files however i get the <b>error:</b><div><b><br></b></div><div><b>/home/test/llvm/include/llvm/IR/Instruction.def: In function ‘LLVMOpcode map_to_llvmopcode(int)’:</b><div><b>/home/test/llvm/lib/IR/Core.cpp:971:54: error: ‘LLVMincrement’ was not declared in this scope</b></div><div><b> #define HANDLE_INST(num, opc, clas) case num: return LLVM##opc;</b></div><div><b>                                                      ^</b></div><div><b>/home/test/llvm/include/llvm/IR/Instruction.def:42:48: note: in expansion of macro ‘HANDLE_INST’</b></div><div><b> #define HANDLE_BINARY_INST(num, opcode, Class) HANDLE_INST(num, opcode, Class)</b></div><div><b>                                                ^</b></div><div><b>/home/test/llvm/include/llvm/IR/Instruction.def:136:1: note: in expansion of macro ‘HANDLE_BINARY_INST’</b></div><div><b> HANDLE_BINARY_INST(23, increment, BinaryOperator) . . .</b><br><br>I'm really stuck at this point and can not see the error through, any help is greatly appreciated!<br><br>Thanks! :)</div><div><br></div></div></div>