[llvm-commits] CVS: llvm/tools/lli/ExecutionEngine.h

Chris Lattner lattner at cs.uiuc.edu
Thu May 8 22:30:01 PDT 2003


Changes in directory llvm/tools/lli:

ExecutionEngine.h updated: 1.2 -> 1.3

---
Log message:

Add new method to check to see if a global is available


---
Diffs of the changes:

Index: llvm/tools/lli/ExecutionEngine.h
diff -u llvm/tools/lli/ExecutionEngine.h:1.2 llvm/tools/lli/ExecutionEngine.h:1.3
--- llvm/tools/lli/ExecutionEngine.h:1.2	Thu May  8 11:52:16 2003
+++ llvm/tools/lli/ExecutionEngine.h	Thu May  8 22:29:03 2003
@@ -62,6 +62,14 @@
     CurVal = Addr;
   }
 
+  // getPointerToGlobalIfAvailable - This returns the address of the specified
+  // global value if it is available, otherwise it returns null.
+  //
+  void *getPointerToGlobalIfAvailable(const GlobalValue *GV) {
+    std::map<const GlobalValue*, void*>::iterator I = GlobalAddress.find(GV);
+    return I != GlobalAddress.end() ? I->second : 0;
+  }
+
   // getPointerToGlobal - This returns the address of the specified global
   // value.  This may involve code generation if it's a function.
   //





More information about the llvm-commits mailing list