summaryrefslogtreecommitdiffstats
path: root/lib/VMCore/PassManager.cpp
diff options
context:
space:
mode:
authorErick Tryzelaar <idadesub@users.sourceforge.net>2010-03-02 23:58:54 +0000
committerErick Tryzelaar <idadesub@users.sourceforge.net>2010-03-02 23:58:54 +0000
commitdf7df075b723e926e51555bf5aff6e231279a479 (patch)
tree81d043d94f964ed4a33b62f3ea6572da6ff3c439 /lib/VMCore/PassManager.cpp
parentfb444af5c9901271dc115a3197d7fa9ef4187fdd (diff)
downloadexternal_llvm-df7df075b723e926e51555bf5aff6e231279a479.zip
external_llvm-df7df075b723e926e51555bf5aff6e231279a479.tar.gz
external_llvm-df7df075b723e926e51555bf5aff6e231279a479.tar.bz2
Add Module functions in place of module providers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97608 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore/PassManager.cpp')
-rw-r--r--lib/VMCore/PassManager.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/VMCore/PassManager.cpp b/lib/VMCore/PassManager.cpp
index 499220f..c4dfe14 100644
--- a/lib/VMCore/PassManager.cpp
+++ b/lib/VMCore/PassManager.cpp
@@ -1712,8 +1712,13 @@ LLVMPassManagerRef LLVMCreatePassManager() {
return wrap(new PassManager());
}
+LLVMPassManagerRef LLVMCreateFunctionPassManagerForModule(LLVMModuleRef M) {
+ return wrap(new FunctionPassManager(unwrap(M)));
+}
+
LLVMPassManagerRef LLVMCreateFunctionPassManager(LLVMModuleProviderRef P) {
- return wrap(new FunctionPassManager(unwrap(P)));
+ return LLVMCreateFunctionPassManagerForModule(
+ reinterpret_cast<LLVMModuleRef>(P));
}
LLVMBool LLVMRunPassManager(LLVMPassManagerRef PM, LLVMModuleRef M) {