aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/AsmPrinter/DwarfDebug.h
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2011-08-15 18:35:42 +0000
committerDevang Patel <dpatel@apple.com>2011-08-15 18:35:42 +0000
commit59bc4093d5009ecda4a4f70ed04c78502e28474f (patch)
tree8587355cc0d4f5353e2f0c4af167f6a4b7487f8a /lib/CodeGen/AsmPrinter/DwarfDebug.h
parent06f20ebfcf2b4dbe388f6d506b62fb2aa8af5fe8 (diff)
Refactor.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137631 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/AsmPrinter/DwarfDebug.h')
-rw-r--r--lib/CodeGen/AsmPrinter/DwarfDebug.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.h b/lib/CodeGen/AsmPrinter/DwarfDebug.h
index 178c903666..05656d531d 100644
--- a/lib/CodeGen/AsmPrinter/DwarfDebug.h
+++ b/lib/CodeGen/AsmPrinter/DwarfDebug.h
@@ -136,7 +136,13 @@ public:
void setDotDebugLocOffset(unsigned O) { DotDebugLocOffset = O; }
unsigned getDotDebugLocOffset() const { return DotDebugLocOffset; }
StringRef getName() const { return Var.getName(); }
- unsigned getTag() const { return Var.getTag(); }
+ // Translate tag to proper Dwarf tag.
+ unsigned getTag() const {
+ if (Var.getTag() == dwarf::DW_TAG_arg_variable)
+ return dwarf::DW_TAG_formal_parameter;
+
+ return dwarf::DW_TAG_variable;
+ }
bool variableHasComplexAddress() const {
assert(Var.Verify() && "Invalid complex DbgVariable!");
return Var.hasComplexAddress();