mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Revert "[cxx-interop][SwiftCompilerSources] Use C++ enums directly from Swift"
This commit is contained in:
@@ -124,7 +124,7 @@ private struct StackProtectionOptimization {
|
||||
mustFixStackNesting: inout Bool, _ context: PassContext) {
|
||||
|
||||
// `withUnsafeTemporaryAllocation(of:capacity:_:)` is compiled to a `builtin "stackAlloc"`.
|
||||
if let bi = instruction as? BuiltinInst, bi.id == .StackAlloc {
|
||||
if let bi = instruction as? BuiltinInst, bi.id == .stackAlloc {
|
||||
function.setNeedsStackProtection(context)
|
||||
return
|
||||
}
|
||||
@@ -332,7 +332,7 @@ private struct StackProtectionOptimization {
|
||||
/// Moves the value of a `beginAccess` to a temporary stack location, if possible.
|
||||
private func moveToTemporary(scope beginAccess: BeginAccessInst, mustFixStackNesting: inout Bool,
|
||||
_ context: PassContext) {
|
||||
if beginAccess.accessKind != .Modify {
|
||||
if beginAccess.accessKind != .modify {
|
||||
// We can only move from a `modify` access.
|
||||
// Also, read-only accesses shouldn't be subject to buffer overflows (because
|
||||
// no one should ever write to such a storage).
|
||||
|
||||
Reference in New Issue
Block a user