Make the Node member of SUnit private, and add accessors.
[oota-llvm.git] / include / llvm / Module.h
index de1215787509f6cee12125750c05a2db43885c59..09eba81b4ebeefaf4db4a6bcad252d7a110f2f63 100644 (file)
@@ -229,6 +229,15 @@ public:
     return getGlobalVariable(Name, true);
   }
 
+  /// getOrInsertGlobal - Look up the specified global in the module symbol
+  /// table.
+  ///   1. If it does not exist, add a declaration of the global and return it.
+  ///   2. Else, the global exists but has the wrong type: return the function
+  ///      with a constantexpr cast to the right type.
+  ///   3. Finally, if the existing global is the correct delclaration, return
+  ///      the existing global.
+  Constant *getOrInsertGlobal(const std::string &Name, const Type *Ty);
+
 /// @}
 /// @name Global Alias Accessors
 /// @{