Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 10 additions & 7 deletions llvm/lib/IR/Verifier.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3006,13 +3006,16 @@ void Verifier::visitCallBase(CallBase &Call) {
"swifterror argument for call has mismatched alloca", AI, Call);
continue;
}
auto ArgI = dyn_cast<Argument>(SwiftErrorArg);
Assert(ArgI,
"swifterror argument should come from an alloca or parameter",
SwiftErrorArg, Call);
Assert(ArgI->hasSwiftErrorAttr(),
"swifterror argument for call has mismatched parameter", ArgI,
Call);
if (auto *ArgI = dyn_cast<Argument>(SwiftErrorArg)) {
Assert(ArgI->hasSwiftErrorAttr(),
"swifterror argument for call has mismatched parameter", ArgI,
Call);
} else {
auto *GEP = dyn_cast<GetElementPtrInst>(SwiftErrorArg);
Assert(GEP,
"swifterror argument for call has mismatched parameter", ArgI,
Call);
}
}

if (Attrs.hasParamAttribute(i, Attribute::ImmArg)) {
Expand Down