<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#ffffff" text="#000000">
    On 5/3/11 9:10 AM, tarun agrawal wrote:
    <blockquote
      cite="mid:BANLkTinyWN9o-E1Ve1gJxKK=J+UO87_K9g@mail.gmail.com"
      type="cite">
      <meta http-equiv="Content-Type" content="text/html;
        charset=windows-1252">
      Hi<br>
      <br>
      While compiling the ConstantProp.cpp I am getting the following
      error.<br>
    </blockquote>
    <br>
    Is ConstantProp.cpp from a version of LLVM other than LLVM 2.6?<br>
    <br>
    LLVM's internal API changes between releases, so a source file
    written for one version of LLVM will not necessarily compile against
    an earlier or later version of LLVM.<br>
    <br>
    As an aside, I've been told that writing transformations using
    IRBuilder tends to require fewer changes between LLVM releases,
    although I haven't tried using it myself yet.<br>
    <br>
    -- John T.<br>
    <br>
    <blockquote
      cite="mid:BANLkTinyWN9o-E1Ve1gJxKK=J+UO87_K9g@mail.gmail.com"
      type="cite"><br>
      error: too few arguments to function ‘llvm::Constant*
      llvm::ConstantFoldInstruction(
      <div id=":1kg">llvm::Instruction*, llvm::LLVMContext&, const
        llvm::TargetData*)<br>
      </div>
      <br>
      <br>
      I am using llvm-2.6  and the ConstProp.cpp file is <a
        moz-do-not-send="true"
        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/
      <div id=":cv">LLVM/llvm-2.6/include/llvm/Analysis/ConstantFolding.h:
        In member function ‘virtual
bool<unnamed>::ConstantPropagation::runOnFunction(llvm::Function&)’:<br>
        /home/tarun/Desktop/compiler/LLVM/llvm-2.6/include/llvm/Analysis/ConstantFolding.h:32:
        error: too few arguments to function ‘llvm::Constant*
        llvm::ConstantFoldInstruction(llvm::Instruction*,
        llvm::LLVMContext&, const llvm::TargetData*)’<br>
        /home/tarun/Desktop/compiler/LLVM/llvm-2.6/lib/Transforms/Hello/ConstantProp.cpp:71:
        error: at this point in file<br>
        make: ***
        [/home/tarun/Desktop/compiler/LLVM/build/lib/Transforms/Hello/Release/ConstantProp.o]
        Error 1<br>
        <br>
        Regards <br>
        Tarun<br>
        <br>
        <br>
        <br>
      </div>
      <pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
LLVM Developers mailing list
<a class="moz-txt-link-abbreviated" href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a>         <a class="moz-txt-link-freetext" href="http://llvm.cs.uiuc.edu">http://llvm.cs.uiuc.edu</a>
<a class="moz-txt-link-freetext" href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>