diff options
author | Misha Brukman <brukman+llvm@gmail.com> | 2004-03-12 16:20:49 +0000 |
---|---|---|
committer | Misha Brukman <brukman+llvm@gmail.com> | 2004-03-12 16:20:49 +0000 |
commit | 85f5e11c065a7e236d31cf6ef20a20e9eeab7e95 (patch) | |
tree | aedb4cba81f4f3dcbc034fb458f9ad963894ed8a | |
parent | a24653cdfc1e4ec7a8055d8f086e2a210cfd7bac (diff) |
Simplify code to process CallSites (thanks to Chris).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12334 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Analysis/AliasAnalysisEvaluator.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/Analysis/AliasAnalysisEvaluator.cpp b/lib/Analysis/AliasAnalysisEvaluator.cpp index df1a9b84f2..19d44dd9c8 100644 --- a/lib/Analysis/AliasAnalysisEvaluator.cpp +++ b/lib/Analysis/AliasAnalysisEvaluator.cpp @@ -91,10 +91,8 @@ bool AAEval::runOnFunction(Function &F) { } for (inst_iterator I = inst_begin(F), E = inst_end(F); I != E; ++I) { - if (CallInst *CI = dyn_cast<CallInst>(*I)) - CallSites.insert(CallSite(CI)); - else if (InvokeInst *II = dyn_cast<InvokeInst>(*I)) - CallSites.insert(CallSite(II)); + CallSite CS = CallSite::get(*I); + if (CS.getInstruction()) CallSites.insert(CS); } if (PrintNoAlias || PrintMayAlias || PrintMustAlias || |