mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-25 04:02:41 +01:00
Fix some accidental global initializers by using StringLiteral instead of StringRef
llvm-svn: 369850
This commit is contained in:
parent
3622195dfc
commit
f29a7ec8d3
@ -48,7 +48,7 @@ class TargetLibraryInfoImpl {
|
|||||||
|
|
||||||
unsigned char AvailableArray[(NumLibFuncs+3)/4];
|
unsigned char AvailableArray[(NumLibFuncs+3)/4];
|
||||||
llvm::DenseMap<unsigned, std::string> CustomNames;
|
llvm::DenseMap<unsigned, std::string> CustomNames;
|
||||||
static StringRef const StandardNames[NumLibFuncs];
|
static StringLiteral const StandardNames[NumLibFuncs];
|
||||||
bool ShouldExtI32Param, ShouldExtI32Return, ShouldSignExtI32Param;
|
bool ShouldExtI32Param, ShouldExtI32Return, ShouldSignExtI32Param;
|
||||||
|
|
||||||
enum AvailabilityState {
|
enum AvailabilityState {
|
||||||
|
@ -28,7 +28,8 @@ static cl::opt<TargetLibraryInfoImpl::VectorLibrary> ClVectorLibrary(
|
|||||||
clEnumValN(TargetLibraryInfoImpl::SVML, "SVML",
|
clEnumValN(TargetLibraryInfoImpl::SVML, "SVML",
|
||||||
"Intel SVML library")));
|
"Intel SVML library")));
|
||||||
|
|
||||||
StringRef const TargetLibraryInfoImpl::StandardNames[LibFunc::NumLibFuncs] = {
|
StringLiteral const TargetLibraryInfoImpl::StandardNames[LibFunc::NumLibFuncs] =
|
||||||
|
{
|
||||||
#define TLI_DEFINE_STRING
|
#define TLI_DEFINE_STRING
|
||||||
#include "llvm/Analysis/TargetLibraryInfo.def"
|
#include "llvm/Analysis/TargetLibraryInfo.def"
|
||||||
};
|
};
|
||||||
@ -65,7 +66,7 @@ static bool hasBcmp(const Triple &TT) {
|
|||||||
/// target triple. This should be carefully written so that a missing target
|
/// target triple. This should be carefully written so that a missing target
|
||||||
/// triple gets a sane set of defaults.
|
/// triple gets a sane set of defaults.
|
||||||
static void initialize(TargetLibraryInfoImpl &TLI, const Triple &T,
|
static void initialize(TargetLibraryInfoImpl &TLI, const Triple &T,
|
||||||
ArrayRef<StringRef> StandardNames) {
|
ArrayRef<StringLiteral> StandardNames) {
|
||||||
// Verify that the StandardNames array is in alphabetical order.
|
// Verify that the StandardNames array is in alphabetical order.
|
||||||
assert(std::is_sorted(StandardNames.begin(), StandardNames.end(),
|
assert(std::is_sorted(StandardNames.begin(), StandardNames.end(),
|
||||||
[](StringRef LHS, StringRef RHS) {
|
[](StringRef LHS, StringRef RHS) {
|
||||||
|
@ -55,7 +55,7 @@ enum EManglingParam {
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct ManglingRule {
|
struct ManglingRule {
|
||||||
StringRef const Name;
|
StringLiteral const Name;
|
||||||
unsigned char Lead[2];
|
unsigned char Lead[2];
|
||||||
unsigned char Param[5];
|
unsigned char Param[5];
|
||||||
|
|
||||||
@ -133,8 +133,8 @@ unsigned ManglingRule::getNumArgs() const {
|
|||||||
// E_ANY - use prev lead type, E_CONSTPTR_ANY - make const pointer out of
|
// E_ANY - use prev lead type, E_CONSTPTR_ANY - make const pointer out of
|
||||||
// prev lead type, etc. see ParamIterator::getNextParam() for details.
|
// prev lead type, etc. see ParamIterator::getNextParam() for details.
|
||||||
|
|
||||||
static const ManglingRule manglingRules[] = {
|
static constexpr ManglingRule manglingRules[] = {
|
||||||
{ StringRef(), {0}, {0} },
|
{ "", {0}, {0} },
|
||||||
{ "abs" , {1}, {E_ANY}},
|
{ "abs" , {1}, {E_ANY}},
|
||||||
{ "abs_diff" , {1}, {E_ANY,E_COPY}},
|
{ "abs_diff" , {1}, {E_ANY,E_COPY}},
|
||||||
{ "acos" , {1}, {E_ANY}},
|
{ "acos" , {1}, {E_ANY}},
|
||||||
|
Loading…
Reference in New Issue
Block a user