Egor Zhdan
0e2d438c5b
[cxx-interop][SwiftCompilerSources] Use llvm::StringRef instead of BridgedStringRef
...
rdar://83361000
2022-07-21 16:32:16 +01:00
zoecarver
12933bf3b4
Mark a few API uses in Swift Compiler Sources as unsafe.
2022-07-18 20:06:43 -04:00
Egor Zhdan
1ae44e77a5
[cxx-interop][SwiftCompilerSources] Use DiagnosticInfo::FixIt instead of BridgedDiagnosticFixIt
...
This removes some of the bridging code and replaces it with C++ calls.
rdar://83361087
2022-07-12 16:54:16 +01:00
Egor Zhdan
38edc7f377
[cxx-interop][SwiftCompilerSources] Remove getCopiedBridgedStringRef and freeBridgedStringRef
...
`std::string`s can now be passed directly between Swift and C++.
rdar://83361087
2022-07-06 12:57:50 +01:00
Egor Zhdan
ffb9ee9422
Revert "Revert "[cxx-interop][SwiftCompilerSources] Fix conversion between std::string and Swift.String""
...
This reverts commit 9542837a18 .
2022-06-09 23:40:51 +01:00
Egor Zhdan
9542837a18
Revert "[cxx-interop][SwiftCompilerSources] Fix conversion between std::string and Swift.String"
...
This reverts commit be711e387f .
2022-06-08 14:10:04 +01:00
Egor Zhdan
be711e387f
[cxx-interop][SwiftCompilerSources] Fix conversion between std::string and Swift.String
...
This fixes a dangling pointer issue when creating a `Swift.String` from `std::string`.
Also fixes a warning:
```
warning: variable 's' was never mutated; consider changing to 'let' constant
var s = SILBasicBlock_debugDescription(bridged)
~~~ ^
let
```
rdar://92963081
rdar://93053488
2022-05-30 20:06:36 +01:00
Erik Eckstein
cd456fa792
Swift SIL: make Function.name and GlobalVariable.name return a StringRef and not a String
...
and introduce the StringRef struct.
It's more efficient.
Also, rename the `HasName` protocol to `HasShortDescription`, which introduces the new requirement `shortDescription`. This is need because `name` now has `StringRef` type and not `String` anymore
2022-05-12 21:48:37 +02:00
Rintaro Ishizaki
da6814d510
[SwiftCompiler] Make BridgedArrayRef.data nullable
...
ArrayRef.data() can be nullptr when the array is empty.
2022-02-20 22:30:18 -08:00
Rintaro Ishizaki
7486cd1c21
[SwiftCompiler] Move common bridging facilities to 'Basic'
...
A preparation for AST/DiagnosticEngine bridging
2022-02-20 22:06:39 -08:00