[clang] 24f068b - [Tooling/Inclusion] Fix MSVC build
Benjamin Kramer via cfe-commits
cfe-commits at lists.llvm.org
Tue Oct 24 04:32:26 PDT 2023
Author: Benjamin Kramer
Date: 2023-10-24T13:32:21+02:00
New Revision: 24f068b0f77e5de1980b71f036f6b83c4d506904
URL: https://github.com/llvm/llvm-project/commit/24f068b0f77e5de1980b71f036f6b83c4d506904
DIFF: https://github.com/llvm/llvm-project/commit/24f068b0f77e5de1980b71f036f6b83c4d506904.diff
LOG: [Tooling/Inclusion] Fix MSVC build
Added:
Modified:
clang/lib/Tooling/Inclusions/Stdlib/StandardLibrary.cpp
Removed:
################################################################################
diff --git a/clang/lib/Tooling/Inclusions/Stdlib/StandardLibrary.cpp b/clang/lib/Tooling/Inclusions/Stdlib/StandardLibrary.cpp
index e409b8481e5fc9c..03f61d33e1f26e7 100644
--- a/clang/lib/Tooling/Inclusions/Stdlib/StandardLibrary.cpp
+++ b/clang/lib/Tooling/Inclusions/Stdlib/StandardLibrary.cpp
@@ -58,13 +58,14 @@ static int countSymbols(Lang Language) {
ArrayRef<const char*> Symbols;
#define SYMBOL(Name, NS, Header) #NS #Name,
switch (Language) {
- case Lang::C:
+ case Lang::C: {
static constexpr const char *CSymbols[] = {
#include "CSymbolMap.inc"
};
Symbols = CSymbols;
break;
- case Lang::CXX:
+ }
+ case Lang::CXX: {
static constexpr const char *CXXSymbols[] = {
#include "StdSpecialSymbolMap.inc"
#include "StdSymbolMap.inc"
@@ -73,6 +74,7 @@ static int countSymbols(Lang Language) {
Symbols = CXXSymbols;
break;
}
+ }
#undef SYMBOL
return llvm::DenseSet<StringRef>(Symbols.begin(), Symbols.end()).size();
}
@@ -141,14 +143,15 @@ static int initialize(Lang Language) {
};
#define SYMBOL(Name, NS, Header) {#NS #Name, StringRef(#NS).size(), #Header},
switch (Language) {
- case Lang::C:
+ case Lang::C: {
static constexpr Symbol CSymbols[] = {
#include "CSymbolMap.inc"
};
for (const Symbol &S : CSymbols)
Add(S.QName, S.NSLen, S.HeaderName);
break;
- case Lang::CXX:
+ }
+ case Lang::CXX: {
static constexpr Symbol CXXSymbols[] = {
#include "StdSpecialSymbolMap.inc"
#include "StdSymbolMap.inc"
@@ -158,6 +161,7 @@ static int initialize(Lang Language) {
Add(S.QName, S.NSLen, S.HeaderName);
break;
}
+ }
#undef SYMBOL
Mapping->HeaderNames = new llvm::StringRef[Mapping->HeaderIDs->size()];
More information about the cfe-commits
mailing list