diff options
author | David Blaikie <dblaikie@gmail.com> | 2013-05-21 18:08:19 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2013-05-21 18:08:19 +0000 |
commit | 77a887bacbb056be03949f742f1f55a01a84081a (patch) | |
tree | 6d77aaafd17a0ef24831cca2c1c048afcdb16a75 /clang/lib/CodeGen | |
parent | 298526a97f89f4b137c6cc96be2789604f0f4e4a (diff) | |
download | bcm5719-llvm-77a887bacbb056be03949f742f1f55a01a84081a.tar.gz bcm5719-llvm-77a887bacbb056be03949f742f1f55a01a84081a.zip |
Debug Info: don't bother reinserting elements into maps we just retrieved them from
(no intended behavior change)
llvm-svn: 182403
Diffstat (limited to 'clang/lib/CodeGen')
-rw-r--r-- | clang/lib/CodeGen/CGDebugInfo.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/clang/lib/CodeGen/CGDebugInfo.cpp b/clang/lib/CodeGen/CGDebugInfo.cpp index 8a6448aaafd..726f7361fc5 100644 --- a/clang/lib/CodeGen/CGDebugInfo.cpp +++ b/clang/lib/CodeGen/CGDebugInfo.cpp @@ -1936,16 +1936,17 @@ llvm::DIType CGDebugInfo::getOrCreateType(QualType Ty, llvm::DIFile Unit) { ::iterator it = ObjCInterfaceCache.find(TyPtr); if (it != ObjCInterfaceCache.end()) TC = llvm::DIType(cast<llvm::MDNode>(it->second.first)); - else + else { TC = DBuilder.createForwardDecl(llvm::dwarf::DW_TAG_structure_type, Decl->getName(), TheCU, Unit, getLineNumber(Decl->getLocation()), TheCU.getLanguage()); - // Store the forward declaration in the cache. - ObjCInterfaceCache[TyPtr] = std::make_pair(TC, Checksum(Decl)); + // Store the forward declaration in the cache. + ObjCInterfaceCache[TyPtr] = std::make_pair(TC, Checksum(Decl)); - // Register the type for replacement in finalize(). - ReplaceMap.push_back(std::make_pair(TyPtr, static_cast<llvm::Value*>(TC))); + // Register the type for replacement in finalize(). + ReplaceMap.push_back(std::make_pair(TyPtr, static_cast<llvm::Value*>(TC))); + } return TC; } |