mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Add in assert to make sure we only call SILArgument::getParameterInfo() on function arguments.
Swift SVN r21786
This commit is contained in:
@@ -61,6 +61,7 @@ public:
|
||||
|
||||
/// Returns the SILParameterInfo for this SILArgument.
|
||||
SILParameterInfo getParameterInfo() const {
|
||||
assert(isFunctionArg() && "Only function arguments have SILParameterInfo");
|
||||
return getFunction()->getLoweredFunctionType()->getParameters()[getIndex()];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user