aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
diff options
context:
space:
mode:
authorNikita Popov <npopov@redhat.com>2022-01-07 10:37:26 +0100
committerNikita Popov <npopov@redhat.com>2022-01-07 10:44:38 +0100
commite4d1779990672f8c1c7a2b6b8c6efd73c95ce5ac (patch)
tree74a0a344e41e546ea8f7fd68de48ed1eb1246b49 /llvm/lib/Bitcode/Reader/BitcodeReader.cpp
parentc033f0d9b1c7816b0488a939475d48a100e4dcab (diff)
downloadllvm-e4d1779990672f8c1c7a2b6b8c6efd73c95ce5ac.zip
llvm-e4d1779990672f8c1c7a2b6b8c6efd73c95ce5ac.tar.gz
llvm-e4d1779990672f8c1c7a2b6b8c6efd73c95ce5ac.tar.bz2
[IR] Add ConstraintInfo::hasArg() helper (NFC)
Checking whether a constraint corresponds to an argument is a recurring pattern.
Diffstat (limited to 'llvm/lib/Bitcode/Reader/BitcodeReader.cpp')
-rw-r--r--llvm/lib/Bitcode/Reader/BitcodeReader.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
index 879ebfb..13f4928 100644
--- a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
+++ b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
@@ -3927,9 +3927,7 @@ void BitcodeReader::propagateAttributeTypes(CallBase *CB,
const InlineAsm *IA = cast<InlineAsm>(CB->getCalledOperand());
unsigned ArgNo = 0;
for (const InlineAsm::ConstraintInfo &CI : IA->ParseConstraints()) {
- bool HasArg = CI.Type == InlineAsm::isInput ||
- (CI.Type == InlineAsm::isOutput && CI.isIndirect);
- if (!HasArg)
+ if (!CI.hasArg())
continue;
if (CI.isIndirect && !CB->getAttributes().getParamElementType(ArgNo)) {