summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/AsmParser/LLParser.cpp4
-rw-r--r--llvm/lib/Bitcode/Reader/BitcodeReader.cpp4
-rw-r--r--llvm/lib/IR/LLVMContext.cpp5
-rw-r--r--llvm/lib/IR/LLVMContextImpl.h2
4 files changed, 8 insertions, 7 deletions
diff --git a/llvm/lib/AsmParser/LLParser.cpp b/llvm/lib/AsmParser/LLParser.cpp
index 987ab5de967..c906b7b22db 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;
}
diff --git a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
index 1a83359b6e8..d454eb1fd4c 100644
--- a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
+++ b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
@@ -2192,12 +2192,12 @@ std::error_code BitcodeReader::parseMetadata(bool ModuleLevel) {
// mapping.
unsigned Flags = Record[10];
auto *Identifier = getMDString(Record[15]);
- DIType **MappedT = nullptr;
+ DICompositeType **MappedT = nullptr;
if (!(Flags & DINode::FlagFwdDecl) && Identifier)
MappedT = Context.getOrInsertODRUniquedType(*Identifier);
// Use the mapped type node, or create a new one if necessary.
- DIType *CT = MappedT ? *MappedT : nullptr;
+ DICompositeType *CT = MappedT ? *MappedT : nullptr;
if (!CT) {
CT = GET_OR_DISTINCT(
DICompositeType, Record[0],
diff --git a/llvm/lib/IR/LLVMContext.cpp b/llvm/lib/IR/LLVMContext.cpp
index e166a551ade..7c0d18d028a 100644
--- a/llvm/lib/IR/LLVMContext.cpp
+++ b/llvm/lib/IR/LLVMContext.cpp
@@ -317,12 +317,13 @@ void LLVMContext::enableDebugTypeODRUniquing() {
if (pImpl->DITypeMap)
return;
- pImpl->DITypeMap = llvm::make_unique<DenseMap<const MDString *, DIType *>>();
+ pImpl->DITypeMap =
+ llvm::make_unique<DenseMap<const MDString *, DICompositeType *>>();
}
void LLVMContext::disableDebugTypeODRUniquing() { pImpl->DITypeMap.reset(); }
-DIType **LLVMContext::getOrInsertODRUniquedType(const MDString &S) {
+DICompositeType **LLVMContext::getOrInsertODRUniquedType(const MDString &S) {
if (!isODRUniquingDebugTypes())
return nullptr;
return &(*pImpl->DITypeMap)[&S];
diff --git a/llvm/lib/IR/LLVMContextImpl.h b/llvm/lib/IR/LLVMContextImpl.h
index e1a5aa52cb9..15ac0309831 100644
--- a/llvm/lib/IR/LLVMContextImpl.h
+++ b/llvm/lib/IR/LLVMContextImpl.h
@@ -1022,7 +1022,7 @@ public:
#include "llvm/IR/Metadata.def"
// Optional map for looking up composite types by identifier.
- std::unique_ptr<DenseMap<const MDString *, DIType *>> DITypeMap;
+ std::unique_ptr<DenseMap<const MDString *, DICompositeType *>> DITypeMap;
// MDNodes may be uniqued or not uniqued. When they're not uniqued, they
// aren't in the MDNodeSet, but they're still shared between objects, so no
OpenPOWER on IntegriCloud