Index: libcxxabi/src/demangle/ItaniumDemangle.h =================================================================== --- libcxxabi/src/demangle/ItaniumDemangle.h +++ libcxxabi/src/demangle/ItaniumDemangle.h @@ -310,7 +310,7 @@ printRight(OB); } - // Print the "left" side of this Node into OutputString. + // Print the "left" side of this Node into OutputBuffer. virtual void printLeft(OutputBuffer &) const = 0; // Print the "right". This distinction is necessary to represent C++ types @@ -1210,7 +1210,8 @@ class ParameterPack final : public Node { NodeArray Data; - // Setup OutputString for a pack expansion unless we're already expanding one. + // Setup OutputBuffer for a pack expansion, unless we're already expanding + // one. void initializePackExpansion(OutputBuffer &OB) const { if (OB.CurrentPackMax == std::numeric_limits::max()) { OB.CurrentPackMax = static_cast(Data.size()); @@ -2473,7 +2474,7 @@ char consume() { return First != Last ? *First++ : '\0'; } - char look(unsigned Lookahead = 0) { + char look(unsigned Lookahead = 0) const { if (static_cast(Last - First) <= Lookahead) return '\0'; return First[Lookahead]; @@ -5437,7 +5438,7 @@ if (!consumeIf('S')) return nullptr; - if (std::islower(look())) { + if (look() >= 'a' && look() <= 'z') { Node *SpecialSub; switch (look()) { case 'a': Index: llvm/include/llvm/Demangle/ItaniumDemangle.h =================================================================== --- llvm/include/llvm/Demangle/ItaniumDemangle.h +++ llvm/include/llvm/Demangle/ItaniumDemangle.h @@ -11,8 +11,8 @@ // //===----------------------------------------------------------------------===// -#ifndef LLVM_DEMANGLE_ITANIUMDEMANGLE_H -#define LLVM_DEMANGLE_ITANIUMDEMANGLE_H +#ifndef DEMANGLE_ITANIUMDEMANGLE_H +#define DEMANGLE_ITANIUMDEMANGLE_H // FIXME: (possibly) incomplete list of features that clang mangles that this // file does not yet support: @@ -1210,7 +1210,8 @@ class ParameterPack final : public Node { NodeArray Data; - // Setup OutputBuffer for a pack expansion unless we're already expanding one. + // Setup OutputBuffer for a pack expansion, unless we're already expanding + // one. void initializePackExpansion(OutputBuffer &OB) const { if (OB.CurrentPackMax == std::numeric_limits::max()) { OB.CurrentPackMax = static_cast(Data.size()); @@ -2473,7 +2474,7 @@ char consume() { return First != Last ? *First++ : '\0'; } - char look(unsigned Lookahead = 0) { + char look(unsigned Lookahead = 0) const { if (static_cast(Last - First) <= Lookahead) return '\0'; return First[Lookahead]; @@ -5437,7 +5438,7 @@ if (!consumeIf('S')) return nullptr; - if (std::islower(look())) { + if (look() >= 'a' && look() <= 'z') { Node *SpecialSub; switch (look()) { case 'a': @@ -5747,4 +5748,4 @@ DEMANGLE_NAMESPACE_END -#endif // LLVM_DEMANGLE_ITANIUMDEMANGLE_H +#endif // DEMANGLE_ITANIUMDEMANGLE_H Index: llvm/include/llvm/Demangle/StringView.h =================================================================== --- llvm/include/llvm/Demangle/StringView.h +++ llvm/include/llvm/Demangle/StringView.h @@ -10,8 +10,8 @@ // //===----------------------------------------------------------------------===// -#ifndef LLVM_DEMANGLE_STRINGVIEW_H -#define LLVM_DEMANGLE_STRINGVIEW_H +#ifndef DEMANGLE_STRINGVIEW_H +#define DEMANGLE_STRINGVIEW_H #include "DemangleConfig.h" #include Index: llvm/include/llvm/Demangle/Utility.h =================================================================== --- llvm/include/llvm/Demangle/Utility.h +++ llvm/include/llvm/Demangle/Utility.h @@ -10,8 +10,8 @@ // //===----------------------------------------------------------------------===// -#ifndef LLVM_DEMANGLE_UTILITY_H -#define LLVM_DEMANGLE_UTILITY_H +#ifndef DEMANGLE_UTILITY_H +#define DEMANGLE_UTILITY_H #include "StringView.h" #include