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

Chris Lattner clattner at apple.com
Wed Nov 5 00:44:11 PST 2008


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?

-Chris




More information about the llvm-commits mailing list