summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Bitcode/Writer/ValueEnumerator.cpp
diff options
context:
space:
mode:
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>2016-03-28 00:03:12 +0000
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>2016-03-28 00:03:12 +0000
commit544e4f97b3ada9e3483477c5479044f7d7f8e4c0 (patch)
tree36cf0663ebffd976ced92c17bfa9b400f46200c0 /llvm/lib/Bitcode/Writer/ValueEnumerator.cpp
parentb42fa2e5c60b5748aad360fae6810e9fdbe8b4d1 (diff)
downloadbcm5719-llvm-544e4f97b3ada9e3483477c5479044f7d7f8e4c0.tar.gz
bcm5719-llvm-544e4f97b3ada9e3483477c5479044f7d7f8e4c0.zip
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
Diffstat (limited to 'llvm/lib/Bitcode/Writer/ValueEnumerator.cpp')
-rw-r--r--llvm/lib/Bitcode/Writer/ValueEnumerator.cpp8
1 files changed, 1 insertions, 7 deletions
diff --git a/llvm/lib/Bitcode/Writer/ValueEnumerator.cpp b/llvm/lib/Bitcode/Writer/ValueEnumerator.cpp
index 812baf20278..4e0a9dad2f8 100644
--- a/llvm/lib/Bitcode/Writer/ValueEnumerator.cpp
+++ b/llvm/lib/Bitcode/Writer/ValueEnumerator.cpp
@@ -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)
OpenPOWER on IntegriCloud