[LLVMbugs] [Bug 6284] New: IRBuilder CreatePointerCast compilation error

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Fri Feb 12 05:58:08 PST 2010


http://llvm.org/bugs/show_bug.cgi?id=6284

           Summary: IRBuilder CreatePointerCast compilation error
           Product: new-bugs
           Version: unspecified
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: new bugs
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: edwintorok at gmail.com
                CC: llvmbugs at cs.uiuc.edu


Value *CreatePointerCast(Value *V, const Type *DestTy,
                           const Twine &Name = "") {
    if (V->getType() == DestTy)
      return V;
    if (Constant *VC = dyn_cast<Constant>(V))
      return Folder.CreatePointerCast(VC, DestTy);
    return Insert(CastInst::CreatePointerCast(V, DestTy), Name);
  }

But there is no CreatePointerCast() in TargetFolder, resulting in build errors
such as this:
include/llvm/Support/IRBuilder.h: In member function ‘llvm::Value*
llvm::IRBuilder<preserveNames, T, Inserter>::CreatePointerCast(llvm::Value*,
const llvm::Type*, const llvm::Twine&) [with bool preserveNames = false, T =
llvm::TargetFolder, Inserter = llvm::IRBuilderDefaultInserter<false>]’:       
include/llvm/Support/IRBuilder.h:739: error: ‘class llvm::TargetFolder’ has
no member named ‘CreatePointerCast’    

As a workaround CreateBitcast() can be used.


-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list