[PATCH] D87970: [ThinLTO] Avoid temporaries when loading global decl attachment metadata
Eugene Leviant via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 21 04:01:46 PDT 2020
evgeny777 added inline comments.
================
Comment at: llvm/lib/Bitcode/Reader/MetadataLoader.cpp:894
+// their parsing until after the index is created, we can use the index
+// instead of creating temporaries.
+Expected<bool> MetadataLoader::MetadataLoaderImpl::loadGlobalDeclAttachments() {
----------------
So this is not called during ThinLTO import, is it?
================
Comment at: llvm/lib/Bitcode/Reader/MetadataLoader.cpp:2115
return error("Invalid ID");
- MDNode *MD = MetadataList.getMDNodeFwdRefOrNull(Record[I + 1]);
+ MDNode *MD =
+ dyn_cast_or_null<MDNode>(getMetadataFwdRefOrLoad(Record[I + 1]));
----------------
Why is this change needed?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D87970/new/
https://reviews.llvm.org/D87970
More information about the llvm-commits
mailing list