[llvm-commits] [llvm-gcc] Cast Fix

Chris Lattner clattner at apple.com
Mon Dec 18 14:50:51 PST 2006

On Dec 18, 2006, at 11:25 AM, Reid Spencer wrote:

> All,
> This patch is needed to update llvm-gcc to avoid inferred casts as  
> no longer supports them.  This patch is sufficient for getting llvm- 
> gcc
> to compile/work for an X86 target.
> This cast does not include needed changes to gcc/config/rs6000/ 
> rs6000.h
> Those changes will be sent in a subsequent patch.

Jim already applied this (thx Jim!), so this is just an FYI:

You're basing all of the checks here on whether or not the LLVM types  
are signed.  I understand that this is the most expedient way to get  
stuff working in the short term, but this isn't going to work long  
term, as the ->isSigned() methods are not going to exist any more.   
You should eventually migrate these to using TREE_UNSIGNED and  
similar macros, checking properties from the GCC trees.

Further, the casts in i386.h that call getCastOpcode, should be  
updated to use the appropriate cast.  However, I'm not sure what they  
are, you can work with Evan to figure them out.


More information about the llvm-commits mailing list