aboutsummaryrefslogtreecommitdiffstats
path: root/lib/CodeGen/AsmPrinter/DwarfWriter.cpp
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2009-05-01 08:32:14 +0000
committerBill Wendling <isanbard@gmail.com>2009-05-01 08:32:14 +0000
commit0cfbd9b927ac4d133bbc092e28a141a844c59138 (patch)
tree82fc157712879a75e28e14f8b0c6a002dbc51e56 /lib/CodeGen/AsmPrinter/DwarfWriter.cpp
parent821048d4c31954e832de1eecbfe70569f65e07e9 (diff)
downloadexternal_llvm-0cfbd9b927ac4d133bbc092e28a141a844c59138.zip
external_llvm-0cfbd9b927ac4d133bbc092e28a141a844c59138.tar.gz
external_llvm-0cfbd9b927ac4d133bbc092e28a141a844c59138.tar.bz2
Simplify some code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70534 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/AsmPrinter/DwarfWriter.cpp')
-rw-r--r--lib/CodeGen/AsmPrinter/DwarfWriter.cpp13
1 files changed, 5 insertions, 8 deletions
diff --git a/lib/CodeGen/AsmPrinter/DwarfWriter.cpp b/lib/CodeGen/AsmPrinter/DwarfWriter.cpp
index b454cd0..c61a5a8 100644
--- a/lib/CodeGen/AsmPrinter/DwarfWriter.cpp
+++ b/lib/CodeGen/AsmPrinter/DwarfWriter.cpp
@@ -3545,14 +3545,11 @@ public:
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);