summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
diff options
context:
space:
mode:
authorAdrian Prantl <aprantl@apple.com>2013-04-26 21:57:17 +0000
committerAdrian Prantl <aprantl@apple.com>2013-04-26 21:57:17 +0000
commitd4c0dd47765c729bf502f8ee96fdec6f5b3695fe (patch)
treeebd88be1d5fca42a323c15ec3ae1c475af7a3bf6 /llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
parent9de821ebfd344b04b45df335dc324d3d126ef42a (diff)
downloadbcm5719-llvm-d4c0dd47765c729bf502f8ee96fdec6f5b3695fe.tar.gz
bcm5719-llvm-d4c0dd47765c729bf502f8ee96fdec6f5b3695fe.zip
Cleanup and document MachineLocation.
Clarify documentation and API to make the difference between register and register-indirect addressed locations more explicit. Put in a comment to point out that with the current implementation we cannot specify a register-indirect location with offset 0 (a breg 0 in DWARF). No functionality change intended. rdar://problem/13658587 llvm-svn: 180641
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
index 9187c6c2bec..864787d32fd 100644
--- a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
@@ -813,7 +813,7 @@ void AsmPrinter::EmitDwarfRegOp(const MachineLocation &MLoc) const {
// caller might be in the middle of an dwarf expression. We should
// probably assert that Reg >= 0 once debug info generation is more mature.
- if (int Offset = MLoc.getOffset()) {
+ if (MLoc.isIndirect()) {
if (Reg < 32) {
OutStreamer.AddComment(
dwarf::OperationEncodingString(dwarf::DW_OP_breg0 + Reg));
@@ -824,7 +824,7 @@ void AsmPrinter::EmitDwarfRegOp(const MachineLocation &MLoc) const {
OutStreamer.AddComment(Twine(Reg));
EmitULEB128(Reg);
}
- EmitSLEB128(Offset);
+ EmitSLEB128(MLoc.getOffset());
} else {
if (Reg < 32) {
OutStreamer.AddComment(
OpenPOWER on IntegriCloud