r246368 - Update for API change in LLVM: ARMTargetParser class is just the ARM
Chandler Carruth via cfe-commits
cfe-commits at lists.llvm.org
Sat Aug 29 19:16:36 PDT 2015
Author: chandlerc
Date: Sat Aug 29 21:16:36 2015
New Revision: 246368
URL: http://llvm.org/viewvc/llvm-project?rev=246368&view=rev
Log:
Update for API change in LLVM: ARMTargetParser class is just the ARM
namespace.
Modified:
cfe/trunk/lib/Basic/Targets.cpp
cfe/trunk/lib/Driver/ToolChains.cpp
cfe/trunk/lib/Driver/Tools.cpp
Modified: cfe/trunk/lib/Basic/Targets.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/Targets.cpp?rev=246368&r1=246367&r2=246368&view=diff
==============================================================================
--- cfe/trunk/lib/Basic/Targets.cpp (original)
+++ cfe/trunk/lib/Basic/Targets.cpp Sat Aug 29 21:16:36 2015
@@ -4184,13 +4184,13 @@ class ARMTargetInfo : public TargetInfo
void setArchInfo() {
StringRef ArchName = getTriple().getArchName();
- ArchISA = llvm::ARMTargetParser::parseArchISA(ArchName);
+ ArchISA = llvm::ARM::parseArchISA(ArchName);
DefaultCPU = getDefaultCPU(ArchName);
- unsigned ArchKind = llvm::ARMTargetParser::parseArch(ArchName);
+ unsigned ArchKind = llvm::ARM::parseArch(ArchName);
if (ArchKind == llvm::ARM::AK_INVALID)
// set arch of the CPU, either provided explicitly or hardcoded default
- ArchKind = llvm::ARMTargetParser::parseCPUArch(CPU);
+ ArchKind = llvm::ARM::parseCPUArch(CPU);
setArchInfo(ArchKind);
}
@@ -4199,9 +4199,9 @@ class ARMTargetInfo : public TargetInfo
// cache TargetParser info
ArchKind = Kind;
- SubArch = llvm::ARMTargetParser::getSubArch(ArchKind);
- ArchProfile = llvm::ARMTargetParser::parseArchProfile(SubArch);
- ArchVersion = llvm::ARMTargetParser::parseArchVersion(SubArch);
+ SubArch = llvm::ARM::getSubArch(ArchKind);
+ ArchProfile = llvm::ARM::parseArchProfile(SubArch);
+ ArchVersion = llvm::ARM::parseArchVersion(SubArch);
// cache CPU related strings
CPUAttr = getCPUAttr();
@@ -4241,7 +4241,7 @@ class ARMTargetInfo : public TargetInfo
}
StringRef getDefaultCPU(StringRef ArchName) const {
- const char *DefaultCPU = llvm::ARMTargetParser::getDefaultCPU(ArchName);
+ const char *DefaultCPU = llvm::ARM::getDefaultCPU(ArchName);
return DefaultCPU ? DefaultCPU : "";
}
@@ -4251,7 +4251,7 @@ class ARMTargetInfo : public TargetInfo
// For Cortex variants, it's slightly different.
switch(ArchKind) {
default:
- CPUAttr = llvm::ARMTargetParser::getCPUAttr(ArchKind);
+ CPUAttr = llvm::ARM::getCPUAttr(ArchKind);
return CPUAttr ? CPUAttr : "";
case llvm::ARM::AK_ARMV6M:
case llvm::ARM::AK_ARMV6SM:
@@ -4501,7 +4501,7 @@ public:
bool setCPU(const std::string &Name) override {
if (Name != "generic")
- setArchInfo(llvm::ARMTargetParser::parseCPUArch(Name));
+ setArchInfo(llvm::ARM::parseCPUArch(Name));
if (ArchKind == llvm::ARM::AK_INVALID)
return false;
Modified: cfe/trunk/lib/Driver/ToolChains.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ToolChains.cpp?rev=246368&r1=246367&r2=246368&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/ToolChains.cpp (original)
+++ cfe/trunk/lib/Driver/ToolChains.cpp Sat Aug 29 21:16:36 2015
@@ -104,10 +104,10 @@ static const char *ArmMachOArchName(Stri
}
static const char *ArmMachOArchNameCPU(StringRef CPU) {
- unsigned ArchKind = llvm::ARMTargetParser::parseCPUArch(CPU);
+ unsigned ArchKind = llvm::ARM::parseCPUArch(CPU);
if (ArchKind == llvm::ARM::AK_INVALID)
return nullptr;
- StringRef Arch = llvm::ARMTargetParser::getArchName(ArchKind);
+ StringRef Arch = llvm::ARM::getArchName(ArchKind);
// FIXME: Make sure this MachO triple mangling is really necessary.
// ARMv5* normalises to ARMv5.
Modified: cfe/trunk/lib/Driver/Tools.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Tools.cpp?rev=246368&r1=246367&r2=246368&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/Tools.cpp (original)
+++ cfe/trunk/lib/Driver/Tools.cpp Sat Aug 29 21:16:36 2015
@@ -493,13 +493,13 @@ static bool isNoCommonDefault(const llvm
// Get SubArch (vN).
static int getARMSubArchVersionNumber(const llvm::Triple &Triple) {
llvm::StringRef Arch = Triple.getArchName();
- return llvm::ARMTargetParser::parseArchVersion(Arch);
+ return llvm::ARM::parseArchVersion(Arch);
}
// True if M-profile.
static bool isARMMProfile(const llvm::Triple &Triple) {
llvm::StringRef Arch = Triple.getArchName();
- unsigned Profile = llvm::ARMTargetParser::parseArchProfile(Arch);
+ unsigned Profile = llvm::ARM::parseArchProfile(Arch);
return Profile == llvm::ARM::PK_M;
}
@@ -528,8 +528,8 @@ static void getARMArchCPUFromArgs(const
static void getARMHWDivFeatures(const Driver &D, const Arg *A,
const ArgList &Args, StringRef HWDiv,
std::vector<const char *> &Features) {
- unsigned HWDivID = llvm::ARMTargetParser::parseHWDiv(HWDiv);
- if (!llvm::ARMTargetParser::getHWDivFeatures(HWDivID, Features))
+ unsigned HWDivID = llvm::ARM::parseHWDiv(HWDiv);
+ if (!llvm::ARM::getHWDivFeatures(HWDivID, Features))
D.Diag(diag::err_drv_clang_unsupported) << A->getAsString(Args);
}
@@ -537,8 +537,8 @@ static void getARMHWDivFeatures(const Dr
static void getARMFPUFeatures(const Driver &D, const Arg *A,
const ArgList &Args, StringRef FPU,
std::vector<const char *> &Features) {
- unsigned FPUID = llvm::ARMTargetParser::parseFPU(FPU);
- if (!llvm::ARMTargetParser::getFPUFeatures(FPUID, Features))
+ unsigned FPUID = llvm::ARM::parseFPU(FPU);
+ if (!llvm::ARM::getFPUFeatures(FPUID, Features))
D.Diag(diag::err_drv_clang_unsupported) << A->getAsString(Args);
}
@@ -549,7 +549,7 @@ static void checkARMArchName(const Drive
llvm::StringRef ArchName,
const llvm::Triple &Triple) {
std::string MArch = arm::getARMArch(ArchName, Triple);
- if (llvm::ARMTargetParser::parseArch(MArch) == llvm::ARM::AK_INVALID)
+ if (llvm::ARM::parseArch(MArch) == llvm::ARM::AK_INVALID)
D.Diag(diag::err_drv_clang_unsupported) << A->getAsString(Args);
}
@@ -6069,13 +6069,13 @@ std::string arm::getARMTargetCPU(StringR
// FIXME: This is redundant with -mcpu, why does LLVM use this.
const char *arm::getLLVMArchSuffixForARM(StringRef CPU, StringRef Arch) {
if (CPU == "generic")
- return llvm::ARMTargetParser::getSubArch(
- llvm::ARMTargetParser::parseArch(Arch));
+ return llvm::ARM::getSubArch(
+ llvm::ARM::parseArch(Arch));
- unsigned ArchKind = llvm::ARMTargetParser::parseCPUArch(CPU);
+ unsigned ArchKind = llvm::ARM::parseCPUArch(CPU);
if (ArchKind == llvm::ARM::AK_INVALID)
return "";
- return llvm::ARMTargetParser::getSubArch(ArchKind);
+ return llvm::ARM::getSubArch(ArchKind);
}
void arm::appendEBLinkFlags(const ArgList &Args, ArgStringList &CmdArgs,
More information about the cfe-commits
mailing list