[llvm-commits] CVS: llvm/include/llvm/Module.h

Chris Lattner lattner at cs.uiuc.edu
Sun Dec 4 21:30:34 PST 2005



Changes in directory llvm/include/llvm:

Module.h updated: 1.64 -> 1.65
---
Log message:

Add a flag to Module::getGlobalVariable to allow it to return vars with
internal linkage.

Patch provided by Evan Jones, thanks!



---
Diffs of the changes:  (+7 -6)

 Module.h |   13 +++++++------
 1 files changed, 7 insertions(+), 6 deletions(-)


Index: llvm/include/llvm/Module.h
diff -u llvm/include/llvm/Module.h:1.64 llvm/include/llvm/Module.h:1.65
--- llvm/include/llvm/Module.h:1.64	Tue Oct 25 12:58:00 2005
+++ llvm/include/llvm/Module.h	Sun Dec  4 23:30:21 2005
@@ -137,13 +137,14 @@
   //
 
   /// getGlobalVariable - Look up the specified global variable in the module
-  /// symbol table.  If it does not exist, return null.  Note that this only
-  /// returns a global variable if it does not have internal linkage.  The type
-  /// argument should be the underlying type of the global, i.e., it should not
-  /// have the top-level PointerType, which represents the address of the
-  /// global.
+  /// symbol table.  If it does not exist, return null.  The type argument
+  /// should be the underlying type of the global, i.e., it should not have
+  /// the top-level PointerType, which represents the address of the global.
+  /// If AllowInternal is set to true, this function will return types that
+  /// have InternalLinkage. By default, these types are not returned.
   ///
-  GlobalVariable *getGlobalVariable(const std::string &Name, const Type *Ty);
+  GlobalVariable *getGlobalVariable(const std::string &Name, const Type *Ty,
+                                    bool AllowInternal = false);
 
 
   //===--------------------------------------------------------------------===//






More information about the llvm-commits mailing list