Add in assert to make sure we only call SILArgument::getParameterInfo() on function arguments.

Swift SVN r21786
This commit is contained in:
Michael Gottesman
2014-09-08 21:10:44 +00:00
parent 94ed6a1fb3
commit 23afba6f7c

View File

@@ -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()];
}