aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorEric Christopher <echristo@gmail.com>2013-02-27 23:49:47 +0000
committerEric Christopher <echristo@gmail.com>2013-02-27 23:49:47 +0000
commit8d45a98eb14338428155be70681a42dccc03a5ce (patch)
tree97db7f7b89cc102f363a0d9b3fb4e72acaefe3e5 /lib
parentf686cfb33b232db5f9a671ddaf1265b42c7180d5 (diff)
Rework comment slightly and fix a few typos.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176223 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp13
1 files changed, 5 insertions, 8 deletions
diff --git a/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp b/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
index 00b91e70c7..d2e0525566 100644
--- a/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
+++ b/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
@@ -1349,17 +1349,14 @@ void CompileUnit::createGlobalVariableDIE(const MDNode *N) {
// Add linkage name.
StringRef LinkageName = GV.getLinkageName();
if (!LinkageName.empty() && isGlobalVariable) {
- // From dwarf-4: DIE to which DW_AT_linkage_name may apply include:
- // TAG_commono_block, TAG_constant, TAG_entry_point, TAG_subporgram and
- // TAG_variable. For static member variables, gcc 4.7 puts
- // MIPS_linkage_name on the definition DIE only, but Darwin gdb needs
- // MIPS_linkage_name at both places.
- // Per discussion with Eric, for static member variables, we put
- // MIPS_linkage_name on the definition DIE (TAG_variable) and conditionaly
- // put MIPS_linkage_name on TAG_member when DarwinGDBCompat is on.
+ // From DWARF4: DIEs to which DW_AT_linkage_name may apply include:
+ // TAG_common_block, TAG_constant, TAG_entry_point, TAG_subprogram and
+ // TAG_variable.
addString(IsStaticMember && VariableSpecDIE ?
VariableSpecDIE : VariableDIE, dwarf::DW_AT_MIPS_linkage_name,
getRealLinkageName(LinkageName));
+ // In compatibility mode with older gdbs we put the linkage name on both
+ // the TAG_variable DIE and on the TAG_member DIE.
if (IsStaticMember && VariableSpecDIE && DD->useDarwinGDBCompat())
addString(VariableDIE, dwarf::DW_AT_MIPS_linkage_name,
getRealLinkageName(LinkageName));