diff options
author | Adrian Prantl <aprantl@apple.com> | 2016-02-06 18:39:34 +0000 |
---|---|---|
committer | Adrian Prantl <aprantl@apple.com> | 2016-02-06 18:39:34 +0000 |
commit | 4e68d25e8957bd3654d5e8d889925e95db2b997b (patch) | |
tree | e3085ffc9e82a9e85656b1ca16f9f06ac16b8a37 /clang | |
parent | c94bd048027b2834ddcc4f13e7afff822fd973bf (diff) | |
download | bcm5719-llvm-4e68d25e8957bd3654d5e8d889925e95db2b997b.tar.gz bcm5719-llvm-4e68d25e8957bd3654d5e8d889925e95db2b997b.zip |
Add a missing call to MDNode::deleteTemporary().
Follow-up to r259975. Kudos to the ASAN bots!
<rdar://problem/24493203>
llvm-svn: 260002
Diffstat (limited to 'clang')
-rw-r--r-- | clang/lib/CodeGen/CGDebugInfo.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/clang/lib/CodeGen/CGDebugInfo.cpp b/clang/lib/CodeGen/CGDebugInfo.cpp index 34dcea11266..3da0765d375 100644 --- a/clang/lib/CodeGen/CGDebugInfo.cpp +++ b/clang/lib/CodeGen/CGDebugInfo.cpp @@ -2056,19 +2056,20 @@ llvm::DIType *CGDebugInfo::CreateEnumType(const EnumType *Ty) { // It is possible for enums to be created as part of their own // declcontext. We need to cache a placeholder to avoid the type being // created twice before hitting the cache. - llvm::DIScope *EDContext = DBuilder.createReplaceableCompositeType( + llvm::DIScope *TmpContext = DBuilder.createReplaceableCompositeType( llvm::dwarf::DW_TAG_enumeration_type, "", TheCU, DefUnit, 0); unsigned Line = getLineNumber(ED->getLocation()); StringRef EDName = ED->getName(); llvm::DIType *RetTy = DBuilder.createReplaceableCompositeType( - llvm::dwarf::DW_TAG_enumeration_type, EDName, EDContext, DefUnit, Line, + llvm::dwarf::DW_TAG_enumeration_type, EDName, TmpContext, DefUnit, Line, 0, Size, Align, llvm::DINode::FlagFwdDecl, FullName); // Cache the enum type so it is available when building the declcontext // and replace the declcontect with the real thing. TypeCache[Ty].reset(RetTy); - EDContext->replaceAllUsesWith(getDeclContextDescriptor(ED)); + TmpContext->replaceAllUsesWith(getDeclContextDescriptor(ED)); + llvm::MDNode::deleteTemporary(TmpContext); ReplaceMap.emplace_back( std::piecewise_construct, std::make_tuple(Ty), |