diff options
author | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2016-04-19 14:42:55 +0000 |
---|---|---|
committer | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2016-04-19 14:42:55 +0000 |
commit | 86f1bf98dc518177ed78c16fa97a18f3deaa12da (patch) | |
tree | 2adfab32ccf289f4b2b0236a451b50d47bb05abf /llvm/lib/AsmParser/LLParser.cpp | |
parent | 6145366510197e52862236960816c14b6e687004 (diff) | |
download | llvm-86f1bf98dc518177ed78c16fa97a18f3deaa12da.zip llvm-86f1bf98dc518177ed78c16fa97a18f3deaa12da.tar.gz llvm-86f1bf98dc518177ed78c16fa97a18f3deaa12da.tar.bz2 |
IR: Require DICompositeType for ODR uniquing type map
Tighten up the API for debug info ODR type uniquing in LLVMContext. The
only reason to allow other DIType subclasses is to make the unit tests
prettier :/.
llvm-svn: 266737
Diffstat (limited to 'llvm/lib/AsmParser/LLParser.cpp')
-rw-r--r-- | llvm/lib/AsmParser/LLParser.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/AsmParser/LLParser.cpp b/llvm/lib/AsmParser/LLParser.cpp index 987ab5d..c906b7b 100644 --- a/llvm/lib/AsmParser/LLParser.cpp +++ b/llvm/lib/AsmParser/LLParser.cpp @@ -3841,7 +3841,7 @@ bool LLParser::ParseDICompositeType(MDNode *&Result, bool IsDistinct) { // If this isn't a forward declaration and it has a UUID, check for it in the // type map in the context. - DIType **MappedT = nullptr; + DICompositeType **MappedT = nullptr; if (!(flags.Val & DINode::FlagFwdDecl) && identifier.Val && (MappedT = Context.getOrInsertODRUniquedType(*identifier.Val)) && *MappedT) { @@ -3857,7 +3857,7 @@ bool LLParser::ParseDICompositeType(MDNode *&Result, bool IsDistinct) { size.Val, align.Val, offset.Val, flags.Val, elements.Val, runtimeLang.Val, vtableHolder.Val, templateParams.Val, identifier.Val)); if (MappedT) - *MappedT = cast<DIType>(Result); + *MappedT = cast<DICompositeType>(Result); return false; } |