[llvm] r264558 - BitcodeWriter: Replace dead code with an assertion, NFC
Duncan P. N. Exon Smith via llvm-commits
llvm-commits at lists.llvm.org
Sun Mar 27 17:03:13 PDT 2016
Author: dexonsmith
Date: Sun Mar 27 19:03:12 2016
New Revision: 264558
URL: http://llvm.org/viewvc/llvm-project?rev=264558&view=rev
Log:
BitcodeWriter: Replace dead code with an assertion, NFC
The caller of ValueEnumerator::EnumerateOperandType never sends in
metadata. Assert that, and remove the unnecessary logic.
Modified:
llvm/trunk/lib/Bitcode/Writer/ValueEnumerator.cpp
Modified: llvm/trunk/lib/Bitcode/Writer/ValueEnumerator.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Bitcode/Writer/ValueEnumerator.cpp?rev=264558&r1=264557&r2=264558&view=diff
==============================================================================
--- llvm/trunk/lib/Bitcode/Writer/ValueEnumerator.cpp (original)
+++ llvm/trunk/lib/Bitcode/Writer/ValueEnumerator.cpp Sun Mar 27 19:03:12 2016
@@ -660,13 +660,7 @@ void ValueEnumerator::EnumerateType(Type
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)
More information about the llvm-commits
mailing list