[LLVMdev] Compilation error with LLVM 2.9

Eric Christopher echristo at apple.com
Thu Apr 21 13:16:39 PDT 2011


On Apr 21, 2011, at 1:31 PM, Julien Henry wrote:

> Hi all,
> 
>     I wrote code that compiled with llvm 2.8, but now I'm using llvm 
> 2.9 and it doesn't compile anymore:
> 
> My code looks like this:
> 
> User *U;
> ...
> if (PHINode * phi = dyn_cast<PHINode>(U)) {
>             ...
>             BasicBlock * Pred = phi->getIncomingBlock(I);
>             ...
> }
> 
> And when I compile it with clang:
> 
> 
> Live.cc:130:27: error: member access into incomplete type 'llvm::PHINode'
>                         BasicBlock * Pred = phi->getIncomingBlock(I);
>    

Looks like something you were including that had the phi node class included
isn't doing so anymore. You should include more files :)

-eric



More information about the llvm-dev mailing list