[llvm-branch-commits] [llvm-branch] r70535 - /llvm/branches/Apple/Dib/lib/CodeGen/AsmPrinter/DwarfWriter.cpp
Bill Wendling
isanbard at gmail.com
Fri May 1 01:33:45 PDT 2009
Author: void
Date: Fri May 1 03:33:45 2009
New Revision: 70535
URL: http://llvm.org/viewvc/llvm-project?rev=70535&view=rev
Log:
--- Merging r70533 into '.':
U lib/CodeGen/AsmPrinter/DwarfWriter.cpp
--- Merging r70534 into '.':
G lib/CodeGen/AsmPrinter/DwarfWriter.cpp
Modified:
llvm/branches/Apple/Dib/lib/CodeGen/AsmPrinter/DwarfWriter.cpp
Modified: llvm/branches/Apple/Dib/lib/CodeGen/AsmPrinter/DwarfWriter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/Dib/lib/CodeGen/AsmPrinter/DwarfWriter.cpp?rev=70535&r1=70534&r2=70535&view=diff
==============================================================================
--- llvm/branches/Apple/Dib/lib/CodeGen/AsmPrinter/DwarfWriter.cpp (original)
+++ llvm/branches/Apple/Dib/lib/CodeGen/AsmPrinter/DwarfWriter.cpp Fri May 1 03:33:45 2009
@@ -2099,29 +2099,28 @@
AddUInt(ScopeDie, DW_AT_call_file, 0, Scope->getFile());
AddUInt(ScopeDie, DW_AT_call_line, 0, Scope->getLine());
AddUInt(ScopeDie, DW_AT_call_column, 0, Scope->getColumn());
+ } else {
+ ScopeDie = new DIE(DW_TAG_lexical_block);
}
+
+ // Add the scope bounds.
+ if (StartID)
+ AddLabel(ScopeDie, DW_AT_low_pc, DW_FORM_addr,
+ DWLabel("label", StartID));
else
- ScopeDie = new DIE(DW_TAG_lexical_block);
-
- // Add the scope bounds.
- if (StartID) {
- AddLabel(ScopeDie, DW_AT_low_pc, DW_FORM_addr,
- DWLabel("label", StartID));
- } else {
- AddLabel(ScopeDie, DW_AT_low_pc, DW_FORM_addr,
- DWLabel("func_begin", SubprogramCount));
- }
- if (EndID) {
- AddLabel(ScopeDie, DW_AT_high_pc, DW_FORM_addr,
- DWLabel("label", EndID));
- } else {
- AddLabel(ScopeDie, DW_AT_high_pc, DW_FORM_addr,
- DWLabel("func_end", SubprogramCount));
- }
-
- // Add the scope contents.
- ConstructDbgScope(Scope, StartID, EndID, ScopeDie, Unit);
- ParentDie->AddChild(ScopeDie);
+ AddLabel(ScopeDie, DW_AT_low_pc, DW_FORM_addr,
+ DWLabel("func_begin", SubprogramCount));
+
+ if (EndID)
+ AddLabel(ScopeDie, DW_AT_high_pc, DW_FORM_addr,
+ DWLabel("label", EndID));
+ else
+ AddLabel(ScopeDie, DW_AT_high_pc, DW_FORM_addr,
+ DWLabel("func_end", SubprogramCount));
+
+ // Add the scope contents.
+ ConstructDbgScope(Scope, StartID, EndID, ScopeDie, Unit);
+ ParentDie->AddChild(ScopeDie);
}
}
}
@@ -3540,14 +3539,11 @@
DenseMap<GlobalVariable *, SmallVector<DbgScope *, 2> >::iterator
SI = DbgInlinedScopeMap.find(GV);
- if (SI == DbgInlinedScopeMap.end()) {
- SmallVector<DbgScope *, 2> Scopes;
- Scopes.push_back(Scope);
- DbgInlinedScopeMap[GV] = Scopes;
- } else {
- SmallVector<DbgScope *, 2> &Scopes = SI->second;
- Scopes.push_back(Scope);
- }
+
+ if (SI == DbgInlinedScopeMap.end())
+ DbgInlinedScopeMap[GV].push_back(Scope);
+ else
+ SI->second.push_back(Scope);
DenseMap<GlobalVariable *, SmallVector<unsigned, 4> >::iterator
I = InlineInfo.find(GV);
More information about the llvm-branch-commits
mailing list