summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Utils/Local.cpp
diff options
context:
space:
mode:
authorAdrian Prantl <aprantl@apple.com>2016-12-22 05:27:12 +0000
committerAdrian Prantl <aprantl@apple.com>2016-12-22 05:27:12 +0000
commit49797ca6be3f13148dc8a92681579a3278519d06 (patch)
tree465a4157921bb722005fa76c96c69e5b428842fd /llvm/lib/Transforms/Utils/Local.cpp
parentb458841745c1aa624d776c7a198ed2ec12d8621f (diff)
downloadbcm5719-llvm-49797ca6be3f13148dc8a92681579a3278519d06.tar.gz
bcm5719-llvm-49797ca6be3f13148dc8a92681579a3278519d06.zip
Refactor the DIExpression fragment query interface (NFC)
... so it becomes available to DIExpressionCursor. llvm-svn: 290322
Diffstat (limited to 'llvm/lib/Transforms/Utils/Local.cpp')
-rw-r--r--llvm/lib/Transforms/Utils/Local.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/Utils/Local.cpp b/llvm/lib/Transforms/Utils/Local.cpp
index 6de0f34e94c..6e4174aa0cd 100644
--- a/llvm/lib/Transforms/Utils/Local.cpp
+++ b/llvm/lib/Transforms/Utils/Local.cpp
@@ -1112,9 +1112,10 @@ void llvm::ConvertDebugDeclareToDebugValue(DbgDeclareInst *DDI,
unsigned FragmentOffset = 0;
// If this already is a bit fragment, we drop the bit fragment from the
// expression and record the offset.
- if (DIExpr->isFragment()) {
+ auto Fragment = DIExpr->getFragmentInfo();
+ if (Fragment) {
Ops.append(DIExpr->elements_begin(), DIExpr->elements_end()-3);
- FragmentOffset = DIExpr->getFragmentOffsetInBits();
+ FragmentOffset = Fragment->OffsetInBits;
} else {
Ops.append(DIExpr->elements_begin(), DIExpr->elements_end());
}
OpenPOWER on IntegriCloud