llvm.org GIT mirror llvm / 0f2e0c0
Fix some accidental global initializers by using StringLiteral instead of StringRef git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@369850 91177308-0d34-0410-b5e6-96231b3b80d8 Benjamin Kramer 25 days ago
3 changed file(s) with 7 addition(s) and 6 deletion(s). Raw diff Collapse all Expand all
4747
4848 unsigned char AvailableArray[(NumLibFuncs+3)/4];
4949 llvm::DenseMap CustomNames;
50 static StringRef const StandardNames[NumLibFuncs];
50 static StringLiteral const StandardNames[NumLibFuncs];
5151 bool ShouldExtI32Param, ShouldExtI32Return, ShouldSignExtI32Param;
5252
5353 enum AvailabilityState {
2727 clEnumValN(TargetLibraryInfoImpl::SVML, "SVML",
2828 "Intel SVML library")));
2929
30 StringRef const TargetLibraryInfoImpl::StandardNames[LibFunc::NumLibFuncs] = {
30 StringLiteral const TargetLibraryInfoImpl::StandardNames[LibFunc::NumLibFuncs] =
31 {
3132 #define TLI_DEFINE_STRING
3233 #include "llvm/Analysis/TargetLibraryInfo.def"
3334 };
6465 /// target triple. This should be carefully written so that a missing target
6566 /// triple gets a sane set of defaults.
6667 static void initialize(TargetLibraryInfoImpl &TLI, const Triple &T,
67 ArrayRefRef> StandardNames) {
68 ArrayRefLiteral> StandardNames) {
6869 // Verify that the StandardNames array is in alphabetical order.
6970 assert(std::is_sorted(StandardNames.begin(), StandardNames.end(),
7071 [](StringRef LHS, StringRef RHS) {
5454 };
5555
5656 struct ManglingRule {
57 StringRef const Name;
57 StringLiteral const Name;
5858 unsigned char Lead[2];
5959 unsigned char Param[5];
6060
132132 // E_ANY - use prev lead type, E_CONSTPTR_ANY - make const pointer out of
133133 // prev lead type, etc. see ParamIterator::getNextParam() for details.
134134
135 static const ManglingRule manglingRules[] = {
136 { StringRef(), {0}, {0} },
135 static constexpr ManglingRule manglingRules[] = {
136 { "", {0}, {0} },
137137 { "abs" , {1}, {E_ANY}},
138138 { "abs_diff" , {1}, {E_ANY,E_COPY}},
139139 { "acos" , {1}, {E_ANY}},