diff options
author | Bob Wilson <bob.wilson@apple.com> | 2009-07-17 19:05:13 +0000 |
---|---|---|
committer | Bob Wilson <bob.wilson@apple.com> | 2009-07-17 19:05:13 +0000 |
commit | d8aa9fc06274604eae2b5156045a71857a8f18c4 (patch) | |
tree | f400f2b4710e91bf54f46b1955fb4c6683893119 | |
parent | b4cfd15d9901883cfb46ac3826e0a27573089372 (diff) | |
download | external_llvm-d8aa9fc06274604eae2b5156045a71857a8f18c4.zip external_llvm-d8aa9fc06274604eae2b5156045a71857a8f18c4.tar.gz external_llvm-d8aa9fc06274604eae2b5156045a71857a8f18c4.tar.bz2 |
Fix a crash in SROA. The FunctionPass::doInitialization method was never
being called so that Context was never initialized. I'm not sure if this
is the right fix but at least it keeps opt from crashing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76220 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | tools/opt/opt.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/opt/opt.cpp b/tools/opt/opt.cpp index b962ad9..739fed1 100644 --- a/tools/opt/opt.cpp +++ b/tools/opt/opt.cpp @@ -504,6 +504,7 @@ int main(int argc, char **argv) { } if (OptLevelO1 || OptLevelO2 || OptLevelO3) { + FPasses->doInitialization(); for (Module::iterator I = M.get()->begin(), E = M.get()->end(); I != E; ++I) FPasses->run(*I); |