diff options
author | Pavel Labath <labath@google.com> | 2018-04-06 08:49:57 +0000 |
---|---|---|
committer | Pavel Labath <labath@google.com> | 2018-04-06 08:49:57 +0000 |
commit | 54ca2d688aa001b08b9f147a448b478b2198fb77 (patch) | |
tree | fb28014418f815e7164836e70ceae1072819f7de /clang/lib/Basic/SourceManager.cpp | |
parent | c8de52ed15e7bf19bb02e83b5ef0b6b208885ccd (diff) | |
download | llvm-54ca2d688aa001b08b9f147a448b478b2198fb77.zip llvm-54ca2d688aa001b08b9f147a448b478b2198fb77.tar.gz llvm-54ca2d688aa001b08b9f147a448b478b2198fb77.tar.bz2 |
[debug_loc] Fix typo in DWARFExpression constructor
Summary:
The positions of the DwarfVersion and AddressSize arguments were
reversed, which caused parsing for dwarf opcodes which contained
address-size-dependent operands (such as DW_OP_addr). Amusingly enough,
none of the address-size asserts fired, as dwarf version was always 4,
which is a valid address size.
I ran into this when constructing weird inputs for the DWARF verifier. I
I add a test case as hand-written dwarf -- I am not sure how to trigger
this differently, as having a DW_OP_addr inside a location list is a
fairly non-standard thing to do.
Fixing this error exposed a bug in the debug_loc.dwo parser, which was
always being constructed with an address size of 0. I fix that as well
by following the pattern in the non-dwo parser of picking up the address
size from the first compile unit (which is technically not correct, but
probably good enough in practice).
Reviewers: JDevlieghere, aprantl, dblaikie
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D45324
llvm-svn: 329381
Diffstat (limited to 'clang/lib/Basic/SourceManager.cpp')
0 files changed, 0 insertions, 0 deletions