[LLVMdev] diffs for vc7.1

Reid Spencer reid at x10sys.com
Fri Sep 3 13:03:29 PDT 2004


That looks like it should work. Its only the declaration that
it is complaining about. PLease prepare a patch that includes initialization of 
  the PN variable to zero and I will apply the patch.

Reid.

Anshu Dasgupta wrote:

> Hi Paolo,
> 
>> <snip>
>> for (BasicBlock::iterator I = Dest->begin(); PHINode *PN = 
>> dyn_cast<PHINode>(I); ++I)
>>     visitPHINode(*PN);
>> <snip>
>>
>> build_vc71\lib\Transforms\Scalar\SCCP.cpp(202) : error C2275: 
>> 'llvm::PHINode' : illegal use of this type as an expression
>>
>> but I think is a NO-NO, so suggestions?
> 
> 
> Since it's fussy about a declaration in the for construct, perhaps 
> something like this might work:
> 
> PHINode *PN;
> for (BasicBlock::iterator I = Dest->begin(); (PN = 
> dyn_cast<PHINode>(I)); ++I)
>    ...
> 
> However, I haven't worked with Visual C++ and so am not familiar with 
> its peculiarities.
> 
> -Anshu
> 
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://mail.cs.uiuc.edu/mailman/listinfo/llvmdev
> 




More information about the llvm-dev mailing list