[llvm-commits] CVS: llvm/tools/lli/JIT/VM.cpp

Chris Lattner lattner at cs.uiuc.edu
Thu May 8 16:09:04 PDT 2003


Changes in directory llvm/tools/lli/JIT:

VM.cpp updated: 1.2 -> 1.3

---
Log message:

assert early instead of late for unimplemented feature


---
Diffs of the changes:

Index: llvm/tools/lli/JIT/VM.cpp
diff -u llvm/tools/lli/JIT/VM.cpp:1.2 llvm/tools/lli/JIT/VM.cpp:1.3
--- llvm/tools/lli/JIT/VM.cpp:1.2	Sun Jan 12 19:00:38 2003
+++ llvm/tools/lli/JIT/VM.cpp	Thu May  8 16:08:43 2003
@@ -81,10 +81,17 @@
   if (F->isExternal())
     return Addr = getPointerToNamedFunction(F->getName());
 
-  // JIT all of the functions in the module.  Eventually this will JIT functions
-  // on demand.  This has the effect of populating all of the non-external
-  // functions into the GlobalAddress table.
+  static bool isAlreadyCodeGenerating = false;
+  if (isAlreadyCodeGenerating) {
+    assert(0 && "Recursive function stubs not handled yet!");
+  }
+
+  // FIXME: JIT all of the functions in the module.  Eventually this will JIT
+  // functions on demand.  This has the effect of populating all of the
+  // non-external functions into the GlobalAddress table.
+  isAlreadyCodeGenerating = true;
   PM.run(getModule());
+  isAlreadyCodeGenerating = false;
 
   assert(Addr && "Code generation didn't add function to GlobalAddress table!");
   return Addr;





More information about the llvm-commits mailing list