[llvm-commits] [llvm] r58727 - in /llvm/trunk: include/llvm/Module.h lib/CodeGen/StackProtector.cpp lib/VMCore/Module.cpp

Bill Wendling isanbard at gmail.com
Wed Nov 5 02:13:00 PST 2008


On Nov 5, 2008, at 12:44 AM, Chris Lattner wrote:

> On Nov 4, 2008, at 2:51 PM, Bill Wendling wrote:
>
>> Author: void
>> Date: Tue Nov  4 16:51:24 2008
>> New Revision: 58727
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=58727&view=rev
>> Log:
>> - Add a "getOrInsertGlobal" method to the Module class. This acts
>> similarly to
>> "getOrInsertFunction" in that it either adds a new declaration of
>> the global
>> and returns it, or returns the current one -- optionally casting it
>> to the
>> correct type.
>> - Use the new getOrInsertGlobal in the stack protector code.
>> - Use "splitBasicBlock" in the stack protector code.
>
> Awesome, thanks Bill!  One minor nit: getOrInsertFunction takes a
> function, not a pointer to the function.  Do you think it makes sense
> for getOrInsertGlobal to take the "contained" type of the global,
> instead of the pointer?
>
It's probably because it's late, but I'm not 100% sure what you mean.  
But consistency is a Good Thing(tm), so I would tend to agree with the  
sentiment.

I'll look at this again tomorrow. :-)

-bw




More information about the llvm-commits mailing list