Skip to content

Commit 4d8c0c8

Browse files
authored
Merge pull request #69117 from eeckstein/bridging-followup-2
Another follow-up on the bridging rework
2 parents a14f280 + 93db089 commit 4d8c0c8

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

include/swift/AST/ASTBridging.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,10 @@ typedef enum ENUM_EXTENSIBILITY_ATTR(open) BridgedDiagID : uint32_t {
4040
#include "swift/AST/DiagnosticsAll.def"
4141
} BridgedDiagID;
4242

43-
struct BridgedDiagnosticEngine {
43+
// Must match the definition of BridgedDiagnosticEngine in CASTBridging.h.
44+
typedef struct {
4445
void * _Nonnull object;
45-
};
46+
} BridgedDiagnosticEngine;
4647

4748
struct BridgedOptionalDiagnosticEngine {
4849
void *_Nullable object;
@@ -66,7 +67,7 @@ class BridgedDiagnosticArgument {
6667
};
6768

6869
class BridgedDiagnosticFixIt {
69-
int64_t storage[6];
70+
int64_t storage[7];
7071

7172
public:
7273
#ifdef USED_IN_CPP_SOURCE

lib/AST/ASTBridging.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ BridgedDiagnosticArgument::BridgedDiagnosticArgument(BridgedStringRef s)
3535
: BridgedDiagnosticArgument(DiagnosticArgument(s.get())) {}
3636

3737
static_assert(sizeof(BridgedDiagnosticFixIt) >= sizeof(DiagnosticInfo::FixIt),
38-
"BridgedDiagnosticArgument has wrong size");
38+
"BridgedDiagnosticFixIt has wrong size");
3939

4040
static SourceLoc getSourceLoc(BridgedSourceLoc bridgedLoc) {
4141
return SourceLoc(llvm::SMLoc::getFromPointer(bridgedLoc.getLoc()));

0 commit comments

Comments
 (0)