summaryrefslogtreecommitdiffstats
path: root/clang/lib/Basic/Targets.cpp
diff options
context:
space:
mode:
authorEric Christopher <echristo@gmail.com>2015-08-19 02:24:21 +0000
committerEric Christopher <echristo@gmail.com>2015-08-19 02:24:21 +0000
commit72be1c1b64f912246dcada007f0dddf8a29be584 (patch)
treea17c155085c81669e16d2eadd09b54e19119ee12 /clang/lib/Basic/Targets.cpp
parent992196220a60a5afee8535fbd7e8c5e5227f244a (diff)
downloadbcm5719-llvm-72be1c1b64f912246dcada007f0dddf8a29be584.tar.gz
bcm5719-llvm-72be1c1b64f912246dcada007f0dddf8a29be584.zip
Rename getDefaultFeatures -> initDefaultFeatures and update comment
with the current behavior as the name seems to match what's going on. llvm-svn: 245405
Diffstat (limited to 'clang/lib/Basic/Targets.cpp')
-rw-r--r--clang/lib/Basic/Targets.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/clang/lib/Basic/Targets.cpp b/clang/lib/Basic/Targets.cpp
index c5309c4caf1..0ebe8a23c36 100644
--- a/clang/lib/Basic/Targets.cpp
+++ b/clang/lib/Basic/Targets.cpp
@@ -863,7 +863,7 @@ public:
void getTargetDefines(const LangOptions &Opts,
MacroBuilder &Builder) const override;
- void getDefaultFeatures(llvm::StringMap<bool> &Features) const override;
+ void initDefaultFeatures(llvm::StringMap<bool> &Features) const override;
bool handleTargetFeatures(std::vector<std::string> &Features,
DiagnosticsEngine &Diags) override;
@@ -1262,7 +1262,7 @@ void PPCTargetInfo::getTargetDefines(const LangOptions &Opts,
// __NO_FPRS__
}
-void PPCTargetInfo::getDefaultFeatures(llvm::StringMap<bool> &Features) const {
+void PPCTargetInfo::initDefaultFeatures(llvm::StringMap<bool> &Features) const {
Features["altivec"] = llvm::StringSwitch<bool>(CPU)
.Case("7400", true)
.Case("g4", true)
@@ -1332,7 +1332,7 @@ bool PPCTargetInfo::hasFeature(StringRef Feature) const {
-mcpu=pwr8 -mno-vsx (should disable vsx and everything that depends on it)
-mcpu=pwr8 -mdirect-move -mno-vsx (should actually be diagnosed)
-NOTE: Do not call this from PPCTargetInfo::getDefaultFeatures
+NOTE: Do not call this from PPCTargetInfo::initDefaultFeatures
*/
void PPCTargetInfo::setFeatureEnabled(llvm::StringMap<bool> &Features,
StringRef Name, bool Enabled) const {
@@ -2308,10 +2308,10 @@ public:
setFeatureEnabledImpl(Features, Name, Enabled);
}
// This exists purely to cut down on the number of virtual calls in
- // getDefaultFeatures which calls this repeatedly.
+ // initDefaultFeatures which calls this repeatedly.
static void setFeatureEnabledImpl(llvm::StringMap<bool> &Features,
StringRef Name, bool Enabled);
- void getDefaultFeatures(llvm::StringMap<bool> &Features) const override;
+ void initDefaultFeatures(llvm::StringMap<bool> &Features) const override;
bool hasFeature(StringRef Feature) const override;
bool handleTargetFeatures(std::vector<std::string> &Features,
DiagnosticsEngine &Diags) override;
@@ -2502,7 +2502,7 @@ bool X86TargetInfo::setFPMath(StringRef Name) {
return false;
}
-void X86TargetInfo::getDefaultFeatures(llvm::StringMap<bool> &Features) const {
+void X86TargetInfo::initDefaultFeatures(llvm::StringMap<bool> &Features) const {
// FIXME: This *really* should not be here.
// X86_64 always has SSE2.
@@ -4459,7 +4459,7 @@ public:
}
// FIXME: This should be based on Arch attributes, not CPU names.
- void getDefaultFeatures(llvm::StringMap<bool> &Features) const override {
+ void initDefaultFeatures(llvm::StringMap<bool> &Features) const override {
if (CPU == "arm1136jf-s" || CPU == "arm1176jzf-s" || CPU == "mpcore")
Features["vfp2"] = true;
else if (CPU == "cortex-a8" || CPU == "cortex-a9") {
@@ -5900,7 +5900,7 @@ public:
return CPUKnown;
}
- void getDefaultFeatures(llvm::StringMap<bool> &Features) const override {
+ void initDefaultFeatures(llvm::StringMap<bool> &Features) const override {
if (CPU == "zEC12")
Features["transactional-execution"] = true;
if (CPU == "z13") {
@@ -6267,7 +6267,7 @@ public:
.Default(false);
}
const std::string& getCPU() const { return CPU; }
- void getDefaultFeatures(llvm::StringMap<bool> &Features) const override {
+ void initDefaultFeatures(llvm::StringMap<bool> &Features) const override {
if (CPU == "octeon")
Features["mips64r2"] = Features["cnmips"] = true;
else
@@ -7558,7 +7558,7 @@ TargetInfo::CreateTargetInfo(DiagnosticsEngine &Diags,
// Compute the default target features, we need the target to handle this
// because features may have dependencies on one another.
llvm::StringMap<bool> Features;
- Target->getDefaultFeatures(Features);
+ Target->initDefaultFeatures(Features);
// Apply the user specified deltas.
for (const auto &F : Opts->FeaturesAsWritten) {
OpenPOWER on IntegriCloud