[cfe-commits] [PATCH] Enable directly emitting native objects

Chris Lattner clattner at apple.com
Sun Jan 11 11:37:56 PST 2009


On Jan 10, 2009, at 7:07 AM, Dan Villiom Podlaski Christiansen wrote:

> Hi,
>
> Attached below is a patch against Clang, which adds a ‘-c’ action  
> that uses LLVM to emit native objects. As the support in LLVM for  
> generating objects directly is somewhat immature, I tagged the flag  
> as ‘experimental’. While at it, I added support for -O4, with  
> similar behaviour to LLVM GCC for both ‘-S’ and ‘-c’. It's in this  
> context that the ‘-c’ option is most useful.

The patch basically looks fine to me.  However, in various places you  
have things like this:

+  default:
+    Error = std::string("Unreachable code reached in ") +  
__PRETTY_FUNCTION__;
+    return false;

Please just make these: default: assert(0 && "some explanation");  
before the first case.

Thanks Dan!

-Chris



More information about the cfe-commits mailing list