So <br><br><div class="gmail_quote">On Sun, Apr 17, 2011 at 6:05 AM, Eli Friedman <span dir="ltr"><<a href="mailto:eli.friedman@gmail.com">eli.friedman@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">

<div class="im">On Sat, Apr 16, 2011 at 5:27 PM, tarun agrawal <<a href="mailto:tarun@cse.iitb.ac.in">tarun@cse.iitb.ac.in</a>> wrote:<br>
> I am using llvm-2.6  and the ConstProp.cpp file is<br>
> <a href="http://llvm.org/docs/doxygen/html/ConstantProp_8cpp_source.html" target="_blank">http://llvm.org/docs/doxygen/html/ConstantProp_8cpp_source.html</a><br>
><br>
> and the exact error message is:<br>
><br>
> llvm[0]: Compiling ConstantProp.cpp for Release build  (PIC)<br>
> /home/tarun/Desktop/compiler/LLVM/llvm-2.6/include/llvm/Analysis/ConstantFolding.h:<br>
> In member function ‘virtual<br>
> bool<unnamed>::ConstantPropagation::runOnFunction(llvm::Function&)’:<br>
> /home/tarun/Desktop/compiler/LLVM/llvm-2.6/include/llvm/Analysis/ConstantFolding.h:32:<br>
> error: too few arguments to function ‘llvm::Constant*<br>
> llvm::ConstantFoldInstruction(llvm::Instruction*, llvm::LLVMContext&, const<br>
> llvm::TargetData*)’<br>
> /home/tarun/Desktop/compiler/LLVM/llvm-2.6/lib/Transforms/Hello/ConstantProp.cpp:71:<br>
> error: at this point in file<br>
> make: ***<br>
> [/home/tarun/Desktop/compiler/LLVM/build/lib/Transforms/Hello/Release/ConstantProp.o]<br>
> Error 1<br>
<br>
</div>The LLVM C++ API is not stable; you can't copy-paste code from a newer<br>
LLVM version into an older one and expect it to work.<br>
<font color="#888888"><br>
-Eli<br>
</font><div><div></div><div class="h5"><br>
<br></div></div></blockquote><div> Thanks for the advice. I will work on the newer version.<br><br>Tarun <br></div></div><br>