forked from OSchip/llvm-project
BitcodeWriter: Replace dead code with an assertion, NFC
The caller of ValueEnumerator::EnumerateOperandType never sends in metadata. Assert that, and remove the unnecessary logic. llvm-svn: 264558
This commit is contained in:
parent
b42fa2e5c6
commit
544e4f97b3
|
@ -660,13 +660,7 @@ void ValueEnumerator::EnumerateType(Type *Ty) {
|
|||
void ValueEnumerator::EnumerateOperandType(const Value *V) {
|
||||
EnumerateType(V->getType());
|
||||
|
||||
if (auto *MD = dyn_cast<MetadataAsValue>(V)) {
|
||||
assert(!isa<LocalAsMetadata>(MD->getMetadata()) &&
|
||||
"Function-local metadata should be left for later");
|
||||
|
||||
EnumerateMetadata(MD->getMetadata());
|
||||
return;
|
||||
}
|
||||
assert(!isa<MetadataAsValue>(V) && "Unexpected metadata operand");
|
||||
|
||||
const Constant *C = dyn_cast<Constant>(V);
|
||||
if (!C)
|
||||
|
|
Loading…
Reference in New Issue