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

Chris Lattner lattner at cs.uiuc.edu
Mon Dec 29 20:45:01 PST 2003


Changes in directory llvm/include/llvm:

ModuleProvider.h updated: 1.7 -> 1.8

---
Log message:

Add a new class useful for providing fully materialized modules to ExecutionEngine's


---
Diffs of the changes:  (+12 -0)

Index: llvm/include/llvm/ModuleProvider.h
diff -u llvm/include/llvm/ModuleProvider.h:1.7 llvm/include/llvm/ModuleProvider.h:1.8
--- llvm/include/llvm/ModuleProvider.h:1.7	Tue Nov 11 16:41:30 2003
+++ llvm/include/llvm/ModuleProvider.h	Mon Dec 29 20:44:04 2003
@@ -54,6 +54,18 @@
   }
 };
 
+
+/// ExistingModuleProvider - Allow conversion from a fully materialized Module
+/// into a ModuleProvider, allowing code that expects a ModuleProvider to work
+/// if we just have a Module.  Note that the ModuleProvider takes ownership of
+/// the Module specified.
+struct ExistingModuleProvider : public ModuleProvider {
+  ExistingModuleProvider(Module *M) {
+    TheModule = M;
+  }
+  void materializeFunction(Function *F) {}
+};
+
 } // End llvm namespace
 
 #endif





More information about the llvm-commits mailing list