[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 16:19:59 PST 2008
On Wed, Nov 5, 2008 at 12:44 AM, Chris Lattner <clattner at apple.com> 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?
>
If I understand correctly, that's what this change is doing. :-) Or do
you want to create another "derived type" called GlobalType similar to
FunctionType and use that?
-bw
More information about the llvm-commits
mailing list