diff options
author | Adrian Prantl <aprantl@apple.com> | 2016-06-24 21:35:09 +0000 |
---|---|---|
committer | Adrian Prantl <aprantl@apple.com> | 2016-06-24 21:35:09 +0000 |
commit | 29ce701a06fe779614ee16ed06460f6ddb43e1b3 (patch) | |
tree | 8ccbfdf76b782ba51a6c5e9ec93ed6bb19dd98b8 /llvm/lib/CodeGen | |
parent | 0fa668072f4c7e1c9d9ff870f742058ce1e2dc14 (diff) | |
download | bcm5719-llvm-29ce701a06fe779614ee16ed06460f6ddb43e1b3.tar.gz bcm5719-llvm-29ce701a06fe779614ee16ed06460f6ddb43e1b3.zip |
Fix the type signature of DwarfExpression::Add.*Constant to support values >32 bits.
This fixes an embarrassing bug when emitting .debug_loc entries for 64-bit+ constants,
which were previously silently truncated to 32 bits.
<rdar://problem/26843232>
llvm-svn: 273736
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/DwarfExpression.cpp | 4 | ||||
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/DwarfExpression.h | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfExpression.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfExpression.cpp index b66084be821..7dbc6cb3995 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfExpression.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/DwarfExpression.cpp @@ -166,13 +166,13 @@ void DwarfExpression::AddStackValue() { EmitOp(dwarf::DW_OP_stack_value); } -void DwarfExpression::AddSignedConstant(int Value) { +void DwarfExpression::AddSignedConstant(int64_t Value) { EmitOp(dwarf::DW_OP_consts); EmitSigned(Value); AddStackValue(); } -void DwarfExpression::AddUnsignedConstant(unsigned Value) { +void DwarfExpression::AddUnsignedConstant(uint64_t Value) { EmitOp(dwarf::DW_OP_constu); EmitUnsigned(Value); AddStackValue(); diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfExpression.h b/llvm/lib/CodeGen/AsmPrinter/DwarfExpression.h index e8a8025add9..5fff28d8a13 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfExpression.h +++ b/llvm/lib/CodeGen/AsmPrinter/DwarfExpression.h @@ -96,9 +96,9 @@ public: unsigned PieceOffsetInBits = 0); /// Emit a signed constant. - void AddSignedConstant(int Value); + void AddSignedConstant(int64_t Value); /// Emit an unsigned constant. - void AddUnsignedConstant(unsigned Value); + void AddUnsignedConstant(uint64_t Value); /// Emit an unsigned constant. void AddUnsignedConstant(const APInt &Value); |