/// language options which change the target configuration.
virtual void setForcedLangOptions(LangOptions &Opts);
- /// getDefaultFeatures - Get the default set of target features for
- /// the \args CPU; this should include all legal feature strings on
- /// the target.
- virtual void getDefaultFeatures(const std::string &CPU,
- llvm::StringMap<bool> &Features) const {
+ /// getDefaultFeatures - Get the default set of target features for the CPU;
+ /// this should include all legal feature strings on the target.
+ virtual void getDefaultFeatures(llvm::StringMap<bool> &Features) const {
}
/// getABI - Get the ABI in use.
/// setCPU - Target the specific CPU.
///
/// \return - False on error (invalid CPU name).
- //
- // FIXME: Remove this.
virtual bool setCPU(const std::string &Name) {
- return true;
+ return false;
}
/// setABI - Use the specific ABI.
virtual bool setFeatureEnabled(llvm::StringMap<bool> &Features,
const std::string &Name,
bool Enabled) const;
- virtual void getDefaultFeatures(const std::string &CPU,
- llvm::StringMap<bool> &Features) const;
+ virtual void getDefaultFeatures(llvm::StringMap<bool> &Features) const;
virtual void HandleTargetFeatures(std::vector<std::string> &Features);
virtual const char* getABI() const {
return MMX3DNowLevel == NoMMX3DNow ? "no-mmx" : "";
}
};
-void X86TargetInfo::getDefaultFeatures(const std::string &CPU,
- llvm::StringMap<bool> &Features) const {
+void X86TargetInfo::getDefaultFeatures(llvm::StringMap<bool> &Features) const {
// FIXME: This should not be here.
Features["3dnow"] = false;
Features["3dnowa"] = false;
return true;
}
- void getDefaultFeatures(const std::string &CPU,
- llvm::StringMap<bool> &Features) const {
+ void getDefaultFeatures(llvm::StringMap<bool> &Features) const {
if (CPU == "arm1136jf-s" || CPU == "arm1176jzf-s" || CPU == "mpcore")
Features["vfp2"] = true;
else if (CPU == "cortex-a8" || CPU == "cortex-a9")
CPU = Name;
return true;
}
- void getDefaultFeatures(const std::string &CPU,
- llvm::StringMap<bool> &Features) const {
+ void getDefaultFeatures(llvm::StringMap<bool> &Features) const {
Features[ABI] = true;
Features[CPU] = true;
}
"f32:32:32-f64:64:64-p:32:32:32-v128:32:32";
}
- void getDefaultFeatures(const std::string &CPU,
- llvm::StringMap<bool> &Features) const {
+ void getDefaultFeatures(llvm::StringMap<bool> &Features) const {
}
virtual void getArchDefines(const LangOptions &Opts,
MacroBuilder &Builder) const {
// 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(Opts.CPU, Features);
+ Target->getDefaultFeatures(Features);
// Apply the user specified deltas.
for (std::vector<std::string>::const_iterator it = Opts.Features.begin(),