summaryrefslogtreecommitdiffstats
path: root/clang/lib/Basic
diff options
context:
space:
mode:
authorGabor Horvath <xazax.hun@gmail.com>2017-12-20 16:55:41 +0000
committerGabor Horvath <xazax.hun@gmail.com>2017-12-20 16:55:41 +0000
commit53b5c13b9d83ab2d7459fd42f13493231f078e66 (patch)
treebc8ac529254bcdc7ab0b89725654e9111a6e898c /clang/lib/Basic
parent1f8647d1c1c651d041c1693bc48861968e6e2b1b (diff)
downloadbcm5719-llvm-53b5c13b9d83ab2d7459fd42f13493231f078e66.tar.gz
bcm5719-llvm-53b5c13b9d83ab2d7459fd42f13493231f078e66.zip
Make DiagnosticIDs::getAllDiagnostics use std::vector. NFC.
The size of the result vector is currently around 4600 with Flavor::WarningOrError, which makes std::vector a better candidate than llvm::SmallVector. Patch by: Andras Leitereg! Differential Revision: https://reviews.llvm.org/D39372 llvm-svn: 321190
Diffstat (limited to 'clang/lib/Basic')
-rw-r--r--clang/lib/Basic/Diagnostic.cpp2
-rw-r--r--clang/lib/Basic/DiagnosticIDs.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/Basic/Diagnostic.cpp b/clang/lib/Basic/Diagnostic.cpp
index 640b42c1ca2..26baa838f8c 100644
--- a/clang/lib/Basic/Diagnostic.cpp
+++ b/clang/lib/Basic/Diagnostic.cpp
@@ -363,7 +363,7 @@ void DiagnosticsEngine::setSeverityForAll(diag::Flavor Flavor,
diag::Severity Map,
SourceLocation Loc) {
// Get all the diagnostics.
- SmallVector<diag::kind, 64> AllDiags;
+ std::vector<diag::kind> AllDiags;
DiagnosticIDs::getAllDiagnostics(Flavor, AllDiags);
// Set the mapping.
diff --git a/clang/lib/Basic/DiagnosticIDs.cpp b/clang/lib/Basic/DiagnosticIDs.cpp
index 5c53f35aa68..c4c425d9eb1 100644
--- a/clang/lib/Basic/DiagnosticIDs.cpp
+++ b/clang/lib/Basic/DiagnosticIDs.cpp
@@ -583,7 +583,7 @@ DiagnosticIDs::getDiagnosticsInGroup(diag::Flavor Flavor, StringRef Group,
}
void DiagnosticIDs::getAllDiagnostics(diag::Flavor Flavor,
- SmallVectorImpl<diag::kind> &Diags) {
+ std::vector<diag::kind> &Diags) {
for (unsigned i = 0; i != StaticDiagInfoSize; ++i)
if (StaticDiagInfo[i].getFlavor() == Flavor)
Diags.push_back(StaticDiagInfo[i].DiagID);
OpenPOWER on IntegriCloud