[PATCH] D47969: [Verifier] Check that ValueAsMetadata belongs to the module
Roman Tereshin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 11 23:33:05 PDT 2018
rtereshin added a comment.
> Value::~Value() calls out ValueAsMetadata::handleDeletion() so it seems like it would not leave a stale reference
Looks like it. On the other hand, I would think that referencing a value from a different module is more tolerable if there is no copy of that value in the module directly referencing the metadata node. In all the tests cases we've got so far however it's not the case as the value referenced always has a copy in every module involved, so it seems having these cross-module references is just calling for trouble. Especially given this fair consideration:
> I'm also not sure if the code that handles DITemplateValueParameters would handle null Metadata entries well.
Even if it does, it's a loss of information for no apparent reason.
Repository:
rL LLVM
https://reviews.llvm.org/D47969
More information about the llvm-commits
mailing list