mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
SILGen: ban getSILArgumentConvention
This function will give the wrong convention in SILGen when using -enable-sil-opaque-values. In particular, it will say arguments are indirect when they are not.
This commit is contained in:
@@ -22,6 +22,7 @@
|
||||
#include "swift/SIL/SILBridging.h"
|
||||
#include "swift/SIL/SILInstruction.h"
|
||||
#include "swift/SIL/SILModule.h"
|
||||
#include "swift/SIL/SILGenUtils.h"
|
||||
#include "swift/SIL/SILUndef.h"
|
||||
#include "swift/SIL/Test.h"
|
||||
#include "llvm/Support/Debug.h"
|
||||
@@ -2485,6 +2486,12 @@ void swift::checkSwitchEnumBlockArg(SILPhiArgument *arg) {
|
||||
}
|
||||
}
|
||||
|
||||
bool swift::isPossibleUnsafeAccessInvalidStorage(SILValue address,
|
||||
SILFunction *F) {
|
||||
auto storage = AccessStorage::compute(address);
|
||||
return storage && !isPossibleFormalAccessStorage(storage, F);
|
||||
}
|
||||
|
||||
bool swift::isPossibleFormalAccessStorage(const AccessStorage &storage,
|
||||
SILFunction *F) {
|
||||
switch (storage.getKind()) {
|
||||
|
||||
Reference in New Issue
Block a user