Skip to content

Commit d169187

Browse files
committed
Stop rebuilding the world whenever a diagnostic changes
The inclusion of the full diagnostic list (via DiagnosticList.h) in DiagnosticGroups.h meant that touching any diagnostic caused most of the world to rebuild, making me sad. Use forward declarations to limit how much needs to be rebuilt when changing diagnostics.
1 parent 74b235e commit d169187

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

include/swift/AST/DiagnosticGroups.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,13 @@
1818
#ifndef SWIFT_DIAGNOSTICGROUPS_H
1919
#define SWIFT_DIAGNOSTICGROUPS_H
2020

21-
#include "swift/AST/DiagnosticList.h"
2221
#include "llvm/ADT/ArrayRef.h"
2322
#include <array>
2423
#include <string_view>
2524
#include <unordered_map>
2625

2726
namespace swift {
27+
enum class DiagID : uint32_t;
2828

2929
enum class DiagGroupID : uint16_t {
3030
#define GROUP(Name, Version) Name,

lib/AST/DiagnosticGroups.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
//===----------------------------------------------------------------------===//
1717

1818
#include "swift/AST/DiagnosticGroups.h"
19+
#include "swift/AST/DiagnosticList.h"
1920
#include <unordered_set>
2021

2122
namespace swift {

0 commit comments

Comments
 (0)