aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/ModuleProvider.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/ModuleProvider.h')
-rw-r--r--include/llvm/ModuleProvider.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/llvm/ModuleProvider.h b/include/llvm/ModuleProvider.h
index de9616fe2e..07b7ae3bab 100644
--- a/include/llvm/ModuleProvider.h
+++ b/include/llvm/ModuleProvider.h
@@ -54,6 +54,18 @@ public:
}
};
+
+/// 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