summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Utils/InlineFunction.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Transforms/Utils/InlineFunction.cpp')
-rw-r--r--llvm/lib/Transforms/Utils/InlineFunction.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/llvm/lib/Transforms/Utils/InlineFunction.cpp b/llvm/lib/Transforms/Utils/InlineFunction.cpp
index a29fbc81c4c..6438d2d9f3b 100644
--- a/llvm/lib/Transforms/Utils/InlineFunction.cpp
+++ b/llvm/lib/Transforms/Utils/InlineFunction.cpp
@@ -1041,11 +1041,10 @@ static void AddAliasScopeMetadata(CallSite CS, ValueToValueMapTy &VMap,
SmallSetVector<const Argument *, 4> NAPtrArgs;
for (const Value *V : PtrArgs) {
- SmallVector<Value *, 4> Objects;
- GetUnderlyingObjects(const_cast<Value*>(V),
- Objects, DL, /* LI = */ nullptr);
+ SmallVector<const Value *, 4> Objects;
+ GetUnderlyingObjects(V, Objects, DL, /* LI = */ nullptr);
- for (Value *O : Objects)
+ for (const Value *O : Objects)
ObjSet.insert(O);
}
OpenPOWER on IntegriCloud