mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[cxx-interop][SwiftCompilerSources] Workaround for std::string crash on arm64 Linux
`std::string` constructor crashes when called from `SILBridging.cpp`, likely due to a miscompile. This is a workaround that fixes the crash.
This commit is contained in:
@@ -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 }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user