summaryrefslogtreecommitdiffstats
path: root/llvm/test
diff options
context:
space:
mode:
authorMikael Holmen <mikael.holmen@ericsson.com>2018-01-25 10:09:26 +0000
committerMikael Holmen <mikael.holmen@ericsson.com>2018-01-25 10:09:26 +0000
commit886edf8f8a92b96634a1b715f817c32942b9f397 (patch)
tree6f29d9e0e2716fd65aa488f4f5a4cbc99e4afa0f /llvm/test
parent58d208d6e4fdb6b2641a1cf75af9abb76d2f1653 (diff)
downloadbcm5719-llvm-886edf8f8a92b96634a1b715f817c32942b9f397.tar.gz
bcm5719-llvm-886edf8f8a92b96634a1b715f817c32942b9f397.zip
[GlobalOpt] Emit fragments using field offsets from struct layout
Summary: When creating the debug fragments for a SRA'd struct, use the fields' offsets, taken from the struct layout, as the offsets for the resulting fragments. This fixes an issue where GlobalOpt would emit fragments with incorrect offsets for padded fields. This should solve PR36016. Patch by David Stenberg. Reviewers: aprantl Reviewed By: aprantl Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D42489 llvm-svn: 323411
Diffstat (limited to 'llvm/test')
-rw-r--r--llvm/test/DebugInfo/Generic/global-sra-struct.ll2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/test/DebugInfo/Generic/global-sra-struct.ll b/llvm/test/DebugInfo/Generic/global-sra-struct.ll
index 82fef911ca5..ccb93d24ce7 100644
--- a/llvm/test/DebugInfo/Generic/global-sra-struct.ll
+++ b/llvm/test/DebugInfo/Generic/global-sra-struct.ll
@@ -24,7 +24,7 @@ target triple = "x86_64-apple-macosx10.12.0"
; CHECK: ![[EL0]] = !DIGlobalVariableExpression(var: ![[VAR:.*]], expr: !DIExpression(DW_OP_LLVM_fragment, 0, 32))
; CHECK: ![[VAR]] = distinct !DIGlobalVariable(name: "static_struct"
-; CHECK: ![[EL1]] = !DIGlobalVariableExpression(var: ![[VAR]], expr: !DIExpression(DW_OP_LLVM_fragment, 32, 64))
+; CHECK: ![[EL1]] = !DIGlobalVariableExpression(var: ![[VAR]], expr: !DIExpression(DW_OP_LLVM_fragment, 64, 64))
@static_struct = internal global %struct.mystruct zeroinitializer, align 8, !dbg !0
OpenPOWER on IntegriCloud