aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
diff options
context:
space:
mode:
authorNikita Popov <npopov@redhat.com>2022-03-11 16:48:39 +0100
committerNikita Popov <npopov@redhat.com>2022-03-11 16:50:24 +0100
commita0d2b0aa65665ba67a160d90e7ddb27c3c550acd (patch)
tree0c820be28365909ea6f5379bc27b8d176d1e07cb /llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
parent3aca0ffd5092e37590bbee7e0fcd2b1b5780024c (diff)
downloadllvm-a0d2b0aa65665ba67a160d90e7ddb27c3c550acd.zip
llvm-a0d2b0aa65665ba67a160d90e7ddb27c3c550acd.tar.gz
llvm-a0d2b0aa65665ba67a160d90e7ddb27c3c550acd.tar.bz2
[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.
Diffstat (limited to 'llvm/lib/Bitcode/Writer/BitcodeWriter.cpp')
-rw-r--r--llvm/lib/Bitcode/Writer/BitcodeWriter.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
index ec10994..96f5666 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;