diff options
author | Owen Anderson <resistor@mac.com> | 2009-07-22 00:24:57 +0000 |
---|---|---|
committer | Owen Anderson <resistor@mac.com> | 2009-07-22 00:24:57 +0000 |
commit | e922c0201916e0b980ab3cfe91e1413e68d55647 (patch) | |
tree | 663be741b84470d97945f01da459a3627af683fd /lib/Transforms/Scalar/SimplifyLibCalls.cpp | |
parent | 7cf12c7efd37dc12c3ed536a3f4c373dddac2b85 (diff) | |
download | external_llvm-e922c0201916e0b980ab3cfe91e1413e68d55647.zip external_llvm-e922c0201916e0b980ab3cfe91e1413e68d55647.tar.gz external_llvm-e922c0201916e0b980ab3cfe91e1413e68d55647.tar.bz2 |
Get rid of the Pass+Context magic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76702 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Scalar/SimplifyLibCalls.cpp')
-rw-r--r-- | lib/Transforms/Scalar/SimplifyLibCalls.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/Transforms/Scalar/SimplifyLibCalls.cpp b/lib/Transforms/Scalar/SimplifyLibCalls.cpp index 7e6b353..837024f 100644 --- a/lib/Transforms/Scalar/SimplifyLibCalls.cpp +++ b/lib/Transforms/Scalar/SimplifyLibCalls.cpp @@ -65,7 +65,7 @@ public: Caller = CI->getParent()->getParent(); this->TD = &TD; if (CI->getCalledFunction()) - Context = CI->getCalledFunction()->getContext(); + Context = &CI->getCalledFunction()->getContext(); return CallOptimizer(CI->getCalledFunction(), CI, B); } @@ -1639,7 +1639,7 @@ bool SimplifyLibCalls::runOnFunction(Function &F) { const TargetData &TD = getAnalysis<TargetData>(); - IRBuilder<> Builder(*Context); + IRBuilder<> Builder(F.getContext()); bool Changed = false; for (Function::iterator BB = F.begin(), E = F.end(); BB != E; ++BB) { @@ -1730,8 +1730,6 @@ void SimplifyLibCalls::setDoesNotAlias(Function &F, unsigned n) { /// doInitialization - Add attributes to well-known functions. /// bool SimplifyLibCalls::doInitialization(Module &M) { - Context = &M.getContext(); - Modified = false; for (Module::iterator I = M.begin(), E = M.end(); I != E; ++I) { Function &F = *I; |