To materialize a module, you need to know what functions NEED to be read and
authorMisha Brukman <brukman+llvm@gmail.com>
Wed, 21 Jan 2004 22:54:10 +0000 (22:54 +0000)
committerMisha Brukman <brukman+llvm@gmail.com>
Wed, 21 Jan 2004 22:54:10 +0000 (22:54 +0000)
which ones don't, which is state that the parent class doesn't know without
knowing the implementation. Let the children classes implement
materializeModule().

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10942 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/ModuleProvider.h

index 07b7ae3bab9685af6c09d8c36b0f4209ed9a521d..a9422c2afb0feddb5cbb5ba8e45dfdbdffd579fd 100644 (file)
@@ -41,7 +41,7 @@ public:
 
   /// materializeModule - make sure the entire Module has been completely read.
   ///
-  Module* materializeModule();
+  virtual Module* materializeModule() = 0;
 
   /// releaseModule - no longer delete the Module* when provider is destroyed.
   ///
@@ -64,6 +64,7 @@ struct ExistingModuleProvider : public ModuleProvider {
     TheModule = M;
   }
   void materializeFunction(Function *F) {}
+  Module* materializeModule() { return TheModule; }
 };
 
 } // End llvm namespace