File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change 21
21
#include " swift/AST/TypeLoc.h"
22
22
#include " swift/AST/DeclNameLoc.h"
23
23
#include " swift/AST/DiagnosticConsumer.h"
24
- #include " llvm/ADT/StringMap .h"
24
+ #include " llvm/ADT/StringSet .h"
25
25
#include " llvm/Support/Allocator.h"
26
26
#include " llvm/Support/VersionTuple.h"
27
27
@@ -655,7 +655,7 @@ namespace swift {
655
655
// / A set of all strings involved in current transactional chain.
656
656
// / This is required because diagnostics are not directly emitted
657
657
// / but rather stored until all transactions complete.
658
- llvm::StringMap< char , llvm::BumpPtrAllocator &> TransactionStrings;
658
+ llvm::StringSet< llvm::BumpPtrAllocator &> TransactionStrings;
659
659
660
660
// / The number of open diagnostic transactions. Diagnostics are only
661
661
// / emitted once all transactions have closed.
Original file line number Diff line number Diff line change @@ -1026,7 +1026,7 @@ void DiagnosticEngine::onTentativeDiagnosticFlush(Diagnostic &diagnostic) {
1026
1026
if (content.empty ())
1027
1027
continue ;
1028
1028
1029
- auto I = TransactionStrings.insert (std::make_pair ( content, char ()) ).first ;
1029
+ auto I = TransactionStrings.insert (content).first ;
1030
1030
argument = DiagnosticArgument (StringRef (I->getKeyData ()));
1031
1031
}
1032
1032
}
You can’t perform that action at this time.
0 commit comments