[llvm] a0d2b0a - [Bitcode] Clarify that extractvalue/insertvalue constexprs are not supported
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 11 07:50:32 PST 2022
Author: Nikita Popov
Date: 2022-03-11T16:50:24+01:00
New Revision: a0d2b0aa65665ba67a160d90e7ddb27c3c550acd
URL: https://github.com/llvm/llvm-project/commit/a0d2b0aa65665ba67a160d90e7ddb27c3c550acd
DIFF: https://github.com/llvm/llvm-project/commit/a0d2b0aa65665ba67a160d90e7ddb27c3c550acd.diff
LOG: [Bitcode] Clarify that extractvalue/insertvalue constexprs are not supported
Bitcode currently cannot encode these. Throw a more obvious error
in this case, rather than failing an operand count assertion.
Added:
Modified:
llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
index ec109942e7218..96f56665be999 100644
--- a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
+++ b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
@@ -2653,6 +2653,10 @@ void ModuleBitcodeWriter::writeConstants(unsigned FirstVal, unsigned LastVal,
Record.push_back(VE.getValueID(C->getOperand(1)));
Record.push_back(CE->getPredicate());
break;
+ case Instruction::ExtractValue:
+ case Instruction::InsertValue:
+ report_fatal_error("extractvalue/insertvalue constexprs not supported");
+ break;
}
} else if (const BlockAddress *BA = dyn_cast<BlockAddress>(C)) {
Code = bitc::CST_CODE_BLOCKADDRESS;
More information about the llvm-commits
mailing list