[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:
Egor Zhdan
2022-06-15 15:53:26 +01:00
parent a00c0b4c74
commit f476f6245c
8 changed files with 12 additions and 15 deletions

View File

@@ -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 }