diff options
author | Nikita Popov <npopov@redhat.com> | 2025-04-30 09:11:36 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-04-30 09:11:36 +0200 |
commit | 38cb7d5e7591cdfb39d1030480920ec1ce4873c6 (patch) | |
tree | ee99cd8538ba80469295852275949d6c795c9f5e /llvm/lib/Bitcode/Writer/BitcodeWriter.cpp | |
parent | c96f019fa3bc02bbc60343de606235c6e2cef4bd (diff) | |
download | llvm-38cb7d5e7591cdfb39d1030480920ec1ce4873c6.zip llvm-38cb7d5e7591cdfb39d1030480920ec1ce4873c6.tar.gz llvm-38cb7d5e7591cdfb39d1030480920ec1ce4873c6.tar.bz2 |
[IR] Don't allow label arguments (#137799)
We currently accept label arguments to inline asm calls. This support
predates both blockaddresses and callbr and is only covered by one X86
test. Remove it in favor of callbr (or at least blockaddress, though
that cannot guarantee correct codegen, just like using block labels
directly can't).
I didn't bother implementing bitcode upgrade support for this, but I can
add it if desired.
Diffstat (limited to 'llvm/lib/Bitcode/Writer/BitcodeWriter.cpp')
-rw-r--r-- | llvm/lib/Bitcode/Writer/BitcodeWriter.cpp | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp index 73bed85c..5226db9 100644 --- a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp +++ b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp @@ -3488,13 +3488,8 @@ void ModuleBitcodeWriter::writeInstruction(const Instruction &I, pushValueAndType(CI.getCalledOperand(), InstID, Vals); // Callee // Emit value #'s for the fixed parameters. - for (unsigned i = 0, e = FTy->getNumParams(); i != e; ++i) { - // Check for labels (can happen with asm labels). - if (FTy->getParamType(i)->isLabelTy()) - Vals.push_back(VE.getValueID(CI.getArgOperand(i))); - else - pushValue(CI.getArgOperand(i), InstID, Vals); // fixed param. - } + for (unsigned i = 0, e = FTy->getNumParams(); i != e; ++i) + pushValue(CI.getArgOperand(i), InstID, Vals); // fixed param. // Emit type/value pairs for varargs params. if (FTy->isVarArg()) { |