diff options
author | Adrian Prantl <aprantl@apple.com> | 2014-02-12 19:34:44 +0000 |
---|---|---|
committer | Adrian Prantl <aprantl@apple.com> | 2014-02-12 19:34:44 +0000 |
commit | 4c1ea6b115235208d3f812cb4c30e0b7cd385c13 (patch) | |
tree | a35f1e940c7e287999681d76b8ffef169192f3d4 /lib/CodeGen/AsmPrinter/AsmPrinter.cpp | |
parent | 386fedd32e7c1bdbcb4d17ef948b591b639b135e (diff) | |
download | llvm-4c1ea6b115235208d3f812cb4c30e0b7cd385c13.tar.gz llvm-4c1ea6b115235208d3f812cb4c30e0b7cd385c13.tar.bz2 llvm-4c1ea6b115235208d3f812cb4c30e0b7cd385c13.tar.xz |
Debug info: Bugfix for r201190: DW_OP_piece takes bytes, not bits.
rdar://problem/16015314
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201253 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/AsmPrinter/AsmPrinter.cpp')
-rw-r--r-- | lib/CodeGen/AsmPrinter/AsmPrinter.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/lib/CodeGen/AsmPrinter/AsmPrinter.cpp index 32cf67ffb9..2f15c97f2d 100644 --- a/lib/CodeGen/AsmPrinter/AsmPrinter.cpp +++ b/lib/CodeGen/AsmPrinter/AsmPrinter.cpp @@ -931,8 +931,9 @@ void AsmPrinter::EmitDwarfRegOp(const MachineLocation &MLoc, } else { OutStreamer.AddComment("DW_OP_piece"); EmitInt8(dwarf::DW_OP_piece); - OutStreamer.AddComment(Twine(Size)); - EmitULEB128(Size); + unsigned ByteSize = Size / 8; // Assuming 8 bits per byte. + OutStreamer.AddComment(Twine(ByteSize)); + EmitULEB128(ByteSize); } } } |