aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/Transforms/IPO/PartialSpecialization.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/Transforms/IPO/PartialSpecialization.cpp b/lib/Transforms/IPO/PartialSpecialization.cpp
index 4e72d51c7d..d46879f509 100644
--- a/lib/Transforms/IPO/PartialSpecialization.cpp
+++ b/lib/Transforms/IPO/PartialSpecialization.cpp
@@ -83,10 +83,9 @@ SpecializeFunction(Function* F,
Value::use_iterator i = ii;
++ii;
User *U = *i;
- if (isa<CallInst>(U) || isa<InvokeInst>(U)) {
- CallSite CS(cast<Instruction>(U));
+ CallSite CS(U);
+ if (CS) {
if (CS.getCalledFunction() == F) {
-
SmallVector<Value*, 6> args;
// Assemble the non-specialized arguments for the updated callsite.
// In the process, make sure that the specialized arguments are