summaryrefslogtreecommitdiffstats
path: root/llvm/test/Assembler
diff options
context:
space:
mode:
authorAdrian Prantl <aprantl@apple.com>2016-12-05 18:04:47 +0000
committerAdrian Prantl <aprantl@apple.com>2016-12-05 18:04:47 +0000
commit941fa7588bbee856a8d3f634c5b88f101089d30f (patch)
treea27a566046fe17ba1ab5691911b2468395a91e52 /llvm/test/Assembler
parentfc78d7cb8e5c0c849950fca7d69d81485f3513e1 (diff)
downloadbcm5719-llvm-941fa7588bbee856a8d3f634c5b88f101089d30f.tar.gz
bcm5719-llvm-941fa7588bbee856a8d3f634c5b88f101089d30f.zip
[DIExpression] Introduce a dedicated DW_OP_LLVM_fragment operation
so we can stop using DW_OP_bit_piece with the wrong semantics. The entire back story can be found here: http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20161114/405934.html The gist is that in LLVM we've been misinterpreting DW_OP_bit_piece's offset field to mean the offset into the source variable rather than the offset into the location at the top the DWARF expression stack. In order to be able to fix this in a subsequent patch, this patch introduces a dedicated DW_OP_LLVM_fragment operation with the semantics that we used to apply to DW_OP_bit_piece, which is what we actually need while inside of LLVM. This patch is complete with a bitcode upgrade for expressions using the old format. It does not yet fix the DWARF backend to use DW_OP_bit_piece correctly. Implementation note: We discussed several options for implementing this, including reserving a dedicated field in DIExpression for the fragment size and offset, but using an custom operator at the end of the expression works just fine and is more efficient because we then only pay for it when we need it. Differential Revision: https://reviews.llvm.org/D27361 rdar://problem/29335809 llvm-svn: 288683
Diffstat (limited to 'llvm/test/Assembler')
-rw-r--r--llvm/test/Assembler/diexpression.ll8
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/test/Assembler/diexpression.ll b/llvm/test/Assembler/diexpression.ll
index 31be86cef2d..dd69c0edecc 100644
--- a/llvm/test/Assembler/diexpression.ll
+++ b/llvm/test/Assembler/diexpression.ll
@@ -7,10 +7,10 @@
; CHECK: !0 = !DIExpression()
; CHECK-NEXT: !1 = !DIExpression(DW_OP_deref)
; CHECK-NEXT: !2 = !DIExpression(DW_OP_plus, 3)
-; CHECK-NEXT: !3 = !DIExpression(DW_OP_bit_piece, 3, 7)
-; CHECK-NEXT: !4 = !DIExpression(DW_OP_deref, DW_OP_plus, 3, DW_OP_bit_piece, 3, 7)
+; CHECK-NEXT: !3 = !DIExpression(DW_OP_LLVM_fragment, 3, 7)
+; CHECK-NEXT: !4 = !DIExpression(DW_OP_deref, DW_OP_plus, 3, DW_OP_LLVM_fragment, 3, 7)
!0 = !DIExpression()
!1 = !DIExpression(DW_OP_deref)
!2 = !DIExpression(DW_OP_plus, 3)
-!3 = !DIExpression(DW_OP_bit_piece, 3, 7)
-!4 = !DIExpression(DW_OP_deref, DW_OP_plus, 3, DW_OP_bit_piece, 3, 7)
+!3 = !DIExpression(DW_OP_LLVM_fragment, 3, 7)
+!4 = !DIExpression(DW_OP_deref, DW_OP_plus, 3, DW_OP_LLVM_fragment, 3, 7)
OpenPOWER on IntegriCloud