diff --git a/SwiftCompilerSources/Sources/SIL/BasicBlock.swift b/SwiftCompilerSources/Sources/SIL/BasicBlock.swift index d4777535e511f..9fc2b157ea1e6 100644 --- a/SwiftCompilerSources/Sources/SIL/BasicBlock.swift +++ b/SwiftCompilerSources/Sources/SIL/BasicBlock.swift @@ -25,7 +25,8 @@ final public class BasicBlock : ListNode, CustomStringConvertible, HasShortDescr public var function: Function { SILBasicBlock_getFunction(bridged).function } public var description: String { - String(_cxxString: SILBasicBlock_debugDescription(bridged)) + let stdString = SILBasicBlock_debugDescription(bridged) + return String(_cxxString: stdString) } public var shortDescription: String { name } diff --git a/SwiftCompilerSources/Sources/SIL/Function.swift b/SwiftCompilerSources/Sources/SIL/Function.swift index 95e3fa10ce951..05e35c26cff58 100644 --- a/SwiftCompilerSources/Sources/SIL/Function.swift +++ b/SwiftCompilerSources/Sources/SIL/Function.swift @@ -21,7 +21,8 @@ final public class Function : CustomStringConvertible, HasShortDescription { } final public var description: String { - String(_cxxString: SILFunction_debugDescription(bridged)) + let stdString = SILFunction_debugDescription(bridged) + return String(_cxxString: stdString) } public var shortDescription: String { name.string } diff --git a/SwiftCompilerSources/Sources/SIL/GlobalVariable.swift b/SwiftCompilerSources/Sources/SIL/GlobalVariable.swift index b84708f9fd342..35e933599d4ab 100644 --- a/SwiftCompilerSources/Sources/SIL/GlobalVariable.swift +++ b/SwiftCompilerSources/Sources/SIL/GlobalVariable.swift @@ -19,7 +19,8 @@ final public class GlobalVariable : CustomStringConvertible, HasShortDescription } public var description: String { - String(_cxxString: SILGlobalVariable_debugDescription(bridged)) + let stdString = SILGlobalVariable_debugDescription(bridged) + return String(_cxxString: stdString) } public var shortDescription: String { name.string } diff --git a/SwiftCompilerSources/Sources/SIL/Instruction.swift b/SwiftCompilerSources/Sources/SIL/Instruction.swift index f235e783e3bb4..ce01d95c534e2 100644 --- a/SwiftCompilerSources/Sources/SIL/Instruction.swift +++ b/SwiftCompilerSources/Sources/SIL/Instruction.swift @@ -38,7 +38,8 @@ public class Instruction : ListNode, CustomStringConvertible, Hashable { final public var function: Function { block.function } final public var description: String { - String(_cxxString: SILNode_debugDescription(bridgedNode)) + let stdString = SILNode_debugDescription(bridgedNode) + return String(_cxxString: stdString) } final public var operands: OperandArray { @@ -142,7 +143,8 @@ public class SingleValueInstruction : Instruction, Value { public final class MultipleValueInstructionResult : Value { final public var description: String { - String(_cxxString: SILNode_debugDescription(bridgedNode)) + let stdString = SILNode_debugDescription(bridgedNode) + return String(_cxxString: stdString) } public var instruction: Instruction { diff --git a/SwiftCompilerSources/Sources/SIL/Value.swift b/SwiftCompilerSources/Sources/SIL/Value.swift index ddbd4344526bf..368b1d81d4d69 100644 --- a/SwiftCompilerSources/Sources/SIL/Value.swift +++ b/SwiftCompilerSources/Sources/SIL/Value.swift @@ -81,7 +81,8 @@ public enum Ownership { extension Value { public var description: String { - String(_cxxString: SILNode_debugDescription(bridgedNode)) + let stdString = SILNode_debugDescription(bridgedNode) + return String(_cxxString: stdString) } public var uses: UseList { diff --git a/test/SILOptimizer/addr_escape_info.sil b/test/SILOptimizer/addr_escape_info.sil index 0f6c069cec95a..d3478834af8fe 100644 --- a/test/SILOptimizer/addr_escape_info.sil +++ b/test/SILOptimizer/addr_escape_info.sil @@ -2,9 +2,6 @@ // REQUIRES: swift_in_compiler -// rdar92963081 -// UNSUPPORTED: OS=linux-gnu - sil_stage canonical import Builtin diff --git a/test/SILOptimizer/escape_info.sil b/test/SILOptimizer/escape_info.sil index c4ab8918e2a1c..e2d9d19e94d03 100644 --- a/test/SILOptimizer/escape_info.sil +++ b/test/SILOptimizer/escape_info.sil @@ -2,9 +2,6 @@ // REQUIRES: swift_in_compiler -// rdar92963081 -// UNSUPPORTED: OS=linux-gnu - sil_stage canonical import Builtin diff --git a/test/SILOptimizer/ranges.sil b/test/SILOptimizer/ranges.sil index a0c74989e45b9..6b97c3bed5ec7 100644 --- a/test/SILOptimizer/ranges.sil +++ b/test/SILOptimizer/ranges.sil @@ -2,9 +2,6 @@ // REQUIRES: swift_in_compiler -// rdar92963081 -// UNSUPPORTED: OS=linux-gnu - sil_stage canonical // CHECK-LABEL: Instruction range in basic_test: