diff options
| author | Devang Patel <dpatel@apple.com> | 2006-12-12 23:15:28 +0000 |
|---|---|---|
| committer | Devang Patel <dpatel@apple.com> | 2006-12-12 23:15:28 +0000 |
| commit | 745a696050eff7558fed9143a8c04db7b79468f0 (patch) | |
| tree | 23c17403e7e3f2a4e49d69f4c9d9fa428ac2b8d0 /llvm | |
| parent | 47d7df74077136bb38cb9ec5927a4e0255cbd5af (diff) | |
| download | bcm5719-llvm-745a696050eff7558fed9143a8c04db7b79468f0.tar.gz bcm5719-llvm-745a696050eff7558fed9143a8c04db7b79468f0.zip | |
Do not runOnFunction on external functions.
llvm-svn: 32510
Diffstat (limited to 'llvm')
| -rw-r--r-- | llvm/lib/VMCore/PassManager.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/llvm/lib/VMCore/PassManager.cpp b/llvm/lib/VMCore/PassManager.cpp index 06f7af86bba..f8bfe59dd94 100644 --- a/llvm/lib/VMCore/PassManager.cpp +++ b/llvm/lib/VMCore/PassManager.cpp @@ -761,6 +761,9 @@ BasicBlockPassManager_New::addPass(Pass *P) { bool BasicBlockPassManager_New::runOnFunction(Function &F) { + if (F.isExternal()) + return false; + bool Changed = doInitialization(F); initializeAnalysisInfo(); @@ -972,6 +975,10 @@ bool FunctionPassManagerImpl_New::runOnModule(Module &M) { bool FunctionPassManagerImpl_New::runOnFunction(Function &F) { bool Changed = false; + + if (F.isExternal()) + return false; + initializeAnalysisInfo(); for (std::vector<Pass *>::iterator itr = passVectorBegin(), |

