Index: clang/include/clang/AST/Decl.h =================================================================== --- clang/include/clang/AST/Decl.h +++ clang/include/clang/AST/Decl.h @@ -4554,7 +4554,7 @@ /// The new name looks likes this: /// + OpenMPVariantManglingSeparatorStr + static constexpr StringRef getOpenMPVariantManglingSeparatorStr() { - return ".ompvariant"; + return "$ompvariant"; } } // namespace clang Index: clang/lib/AST/OpenMPClause.cpp =================================================================== --- clang/lib/AST/OpenMPClause.cpp +++ clang/lib/AST/OpenMPClause.cpp @@ -2109,22 +2109,21 @@ std::string MangledName; llvm::raw_string_ostream OS(MangledName); for (const OMPTraitSet &Set : Sets) { - OS << '.' << 'S' << unsigned(Set.Kind); + OS << '$' << 'S' << unsigned(Set.Kind); for (const OMPTraitSelector &Selector : Set.Selectors) { bool AllowsTraitScore = false; bool RequiresProperty = false; isValidTraitSelectorForTraitSet( Selector.Kind, Set.Kind, AllowsTraitScore, RequiresProperty); - OS << '.' << 's' << unsigned(Selector.Kind); + OS << '$' << 's' << unsigned(Selector.Kind); if (!RequiresProperty || Selector.Kind == TraitSelector::user_condition) continue; for (const OMPTraitProperty &Property : Selector.Properties) - OS << '.' << 'P' - << getOpenMPContextTraitPropertyName(Property.Kind); + OS << '$' << 'P' << getOpenMPContextTraitPropertyName(Property.Kind); } } return OS.str(); @@ -2133,7 +2132,7 @@ OMPTraitInfo::OMPTraitInfo(StringRef MangledName) { unsigned long U; do { - if (!MangledName.consume_front(".S")) + if (!MangledName.consume_front("$S")) break; if (MangledName.consumeInteger(10, U)) break; @@ -2141,7 +2140,7 @@ OMPTraitSet &Set = Sets.back(); Set.Kind = TraitSet(U); do { - if (!MangledName.consume_front(".s")) + if (!MangledName.consume_front("$s")) break; if (MangledName.consumeInteger(10, U)) break; @@ -2149,11 +2148,11 @@ OMPTraitSelector &Selector = Set.Selectors.back(); Selector.Kind = TraitSelector(U); do { - if (!MangledName.consume_front(".P")) + if (!MangledName.consume_front("$P")) break; Selector.Properties.push_back(OMPTraitProperty()); OMPTraitProperty &Property = Selector.Properties.back(); - std::pair PropRestPair = MangledName.split('.'); + std::pair PropRestPair = MangledName.split('$'); Property.Kind = getOpenMPContextTraitPropertyKind(Set.Kind, PropRestPair.first); MangledName = PropRestPair.second;