mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[AST] Merge BridgedDiagnosticEngine + BridgedDiagEngine
Introduce a macro that can stamp out wrapper classes for underlying C++ pointers, and use it to define BridgedDiagnosticEngine in ASTBridging. Then, migrate users of BridgedDiagEngine onto it.
This commit is contained in:
@@ -181,7 +181,7 @@ struct BridgedPassContext {
|
||||
// AST
|
||||
|
||||
SWIFT_IMPORT_UNSAFE BRIDGED_INLINE
|
||||
BridgedDiagEngine getDiagnosticEngine() const;
|
||||
BridgedDiagnosticEngine getDiagnosticEngine() const;
|
||||
|
||||
// SIL modifications
|
||||
|
||||
|
||||
@@ -175,7 +175,7 @@ BridgedNominalTypeDecl BridgedPassContext::getSwiftArrayDecl() const {
|
||||
// AST
|
||||
|
||||
SWIFT_IMPORT_UNSAFE BRIDGED_INLINE
|
||||
BridgedDiagEngine BridgedPassContext::getDiagnosticEngine() const {
|
||||
BridgedDiagnosticEngine BridgedPassContext::getDiagnosticEngine() const {
|
||||
swift::SILModule *mod = invocation->getPassManager()->getModule();
|
||||
return {&mod->getASTContext().Diags};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user