Merge pull request #7774 from atrick/silval

This commit is contained in:
swift-ci
2017-02-26 22:19:39 -08:00
committed by GitHub
4 changed files with 716 additions and 124 deletions

View File

@@ -479,7 +479,8 @@ public:
/// non-address values.
SILValue emitLoadValueOperation(SILLocation Loc, SILValue LV,
LoadOwnershipQualifier Qualifier) {
assert(LV->getType().isLoadable(F.getModule()));
assert(!SILModuleConventions(F.getModule()).useLoweredAddresses()
|| LV->getType().isLoadable(F.getModule()));
const auto &lowering = getTypeLowering(LV->getType());
return lowering.emitLoad(*this, Loc, LV, Qualifier);
}

View File

@@ -148,6 +148,12 @@ public:
/// Get the error result type.
SILType getSILErrorType() { return getSILType(funcTy->getErrorResult()); }
/// Returns an array of result info.
/// Provides convenient access to the underlying SILFunctionType.
ArrayRef<SILResultInfo> getResults() const {
return funcTy->getResults();
}
/// Get the number of SIL results passed as address-typed arguments.
unsigned getNumIndirectSILResults() const {
return silConv.loweredAddresses ? funcTy->getNumIndirectFormalResults() : 0;
@@ -243,7 +249,7 @@ public:
/// SILFunctionType.
unsigned getNumParameters() const { return funcTy->getNumParameters(); }
/// Returns an array if parameter info, not including indirect
/// Returns an array of parameter info, not including indirect
/// results. Provides convenient access to the underlying SILFunctionType.
ArrayRef<SILParameterInfo> getParameters() const {
return funcTy->getParameters();