[PATCH] D110344: [LLVM][IR] Fixed input arguments for Verifier getter
Shivam Gupta via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Oct 2 20:21:20 PDT 2021
This revision was automatically updated to reflect the committed changes.
Closed by commit rG060a96a7b5d5: [LLVM][IR] Fixed input arguments for Verifier getter (authored by gAlfonso-bit, committed by xgupta).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D110344/new/
https://reviews.llvm.org/D110344
Files:
llvm/lib/IR/Verifier.cpp
Index: llvm/lib/IR/Verifier.cpp
===================================================================
--- llvm/lib/IR/Verifier.cpp
+++ llvm/lib/IR/Verifier.cpp
@@ -3314,7 +3314,7 @@
return PL->getAddressSpace() == PR->getAddressSpace();
}
-static AttrBuilder getParameterABIAttributes(int I, AttributeList Attrs) {
+static AttrBuilder getParameterABIAttributes(unsigned I, AttributeList Attrs) {
static const Attribute::AttrKind ABIAttrs[] = {
Attribute::StructRet, Attribute::ByVal, Attribute::InAlloca,
Attribute::InReg, Attribute::StackAlignment, Attribute::SwiftSelf,
@@ -3382,12 +3382,12 @@
// - Only sret, byval, swiftself, and swiftasync ABI-impacting attributes
// are allowed in swifttailcc call
- for (int I = 0, E = CallerTy->getNumParams(); I != E; ++I) {
+ for (unsigned I = 0, E = CallerTy->getNumParams(); I != E; ++I) {
AttrBuilder ABIAttrs = getParameterABIAttributes(I, CallerAttrs);
SmallString<32> Context{CCName, StringRef(" musttail caller")};
verifyTailCCMustTailAttrs(ABIAttrs, Context);
}
- for (int I = 0, E = CalleeTy->getNumParams(); I != E; ++I) {
+ for (unsigned I = 0, E = CalleeTy->getNumParams(); I != E; ++I) {
AttrBuilder ABIAttrs = getParameterABIAttributes(I, CalleeAttrs);
SmallString<32> Context{CCName, StringRef(" musttail callee")};
verifyTailCCMustTailAttrs(ABIAttrs, Context);
@@ -3405,7 +3405,7 @@
Assert(CallerTy->getNumParams() == CalleeTy->getNumParams(),
"cannot guarantee tail call due to mismatched parameter counts",
&CI);
- for (int I = 0, E = CallerTy->getNumParams(); I != E; ++I) {
+ for (unsigned I = 0, E = CallerTy->getNumParams(); I != E; ++I) {
Assert(
isTypeCongruent(CallerTy->getParamType(I), CalleeTy->getParamType(I)),
"cannot guarantee tail call due to mismatched parameter types", &CI);
@@ -3414,7 +3414,7 @@
// - All ABI-impacting function attributes, such as sret, byval, inreg,
// returned, preallocated, and inalloca, must match.
- for (int I = 0, E = CallerTy->getNumParams(); I != E; ++I) {
+ for (unsigned I = 0, E = CallerTy->getNumParams(); I != E; ++I) {
AttrBuilder CallerABIAttrs = getParameterABIAttributes(I, CallerAttrs);
AttrBuilder CalleeABIAttrs = getParameterABIAttributes(I, CalleeAttrs);
Assert(CallerABIAttrs == CalleeABIAttrs,
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D110344.376730.patch
Type: text/x-patch
Size: 2418 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211003/85b7ad52/attachment-0001.bin>
More information about the llvm-commits
mailing list