[PATCH] D65172: [SafeStack] Insert the deref before remaining elements
Petr Hosek via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 23 16:16:35 PDT 2019
phosek created this revision.
phosek added reviewers: vsk, debug-info.
Herald added subscribers: llvm-commits, hiraditya.
Herald added a project: LLVM.
This is a follow up to D64971 <https://reviews.llvm.org/D64971>. While we need to insert the deref after
the offset, it needs to come before the remaining elements in the
original expression since the deref needs to happen before the LLVM
fragment if present.
Repository:
rL LLVM
https://reviews.llvm.org/D65172
Files:
llvm/lib/Transforms/Utils/Local.cpp
Index: llvm/lib/Transforms/Utils/Local.cpp
===================================================================
--- llvm/lib/Transforms/Utils/Local.cpp
+++ llvm/lib/Transforms/Utils/Local.cpp
@@ -1602,8 +1602,8 @@
if (Offset) {
SmallVector<uint64_t, 4> Ops;
DIExpression::appendOffset(Ops, Offset);
- Ops.append(DIExpr->elements_begin() + 1, DIExpr->elements_end());
Ops.push_back(dwarf::DW_OP_deref);
+ Ops.append(DIExpr->elements_begin() + 1, DIExpr->elements_end());
DIExpr = Builder.createExpression(Ops);
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D65172.211376.patch
Type: text/x-patch
Size: 545 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190723/fc26cc85/attachment.bin>
More information about the llvm-commits
mailing list