summaryrefslogtreecommitdiff
path: root/lib/Bitcode/Reader/MetadataLoader.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2019-10-23 17:51:42 +0000
committerDimitry Andric <dim@FreeBSD.org>2019-10-23 17:51:42 +0000
commit1d5ae1026e831016fc29fd927877c86af904481f (patch)
tree2cdfd12620fcfa5d9e4a0389f85368e8e36f63f9 /lib/Bitcode/Reader/MetadataLoader.cpp
parente6d1592492a3a379186bfb02bd0f4eda0669c0d5 (diff)
Notes
Diffstat (limited to 'lib/Bitcode/Reader/MetadataLoader.cpp')
-rw-r--r--lib/Bitcode/Reader/MetadataLoader.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Bitcode/Reader/MetadataLoader.cpp b/lib/Bitcode/Reader/MetadataLoader.cpp
index 108f71189585f..4da51dda8b747 100644
--- a/lib/Bitcode/Reader/MetadataLoader.cpp
+++ b/lib/Bitcode/Reader/MetadataLoader.cpp
@@ -515,7 +515,7 @@ class MetadataLoader::MetadataLoaderImpl {
GV.getMetadata(LLVMContext::MD_dbg, MDs);
GV.eraseMetadata(LLVMContext::MD_dbg);
for (auto *MD : MDs)
- if (auto *DGV = dyn_cast_or_null<DIGlobalVariable>(MD)) {
+ if (auto *DGV = dyn_cast<DIGlobalVariable>(MD)) {
auto *DGVE = DIGlobalVariableExpression::getDistinct(
Context, DGV, DIExpression::get(Context, {}));
GV.addMetadata(LLVMContext::MD_dbg, *DGVE);
@@ -987,7 +987,7 @@ void MetadataLoader::MetadataLoaderImpl::lazyLoadOneMetadata(
assert(ID >= MDStringRef.size() && "Unexpected lazy-loading of MDString");
// Lookup first if the metadata hasn't already been loaded.
if (auto *MD = MetadataList.lookup(ID)) {
- auto *N = dyn_cast_or_null<MDNode>(MD);
+ auto *N = cast<MDNode>(MD);
if (!N->isTemporary())
return;
}
@@ -2133,7 +2133,7 @@ MetadataLoader::MetadataLoader(BitstreamCursor &Stream, Module &TheModule,
BitcodeReaderValueList &ValueList,
bool IsImporting,
std::function<Type *(unsigned)> getTypeByID)
- : Pimpl(llvm::make_unique<MetadataLoaderImpl>(
+ : Pimpl(std::make_unique<MetadataLoaderImpl>(
Stream, TheModule, ValueList, std::move(getTypeByID), IsImporting)) {}
Error MetadataLoader::parseMetadata(bool ModuleLevel) {