From: Eric Christopher Date: Thu, 27 Aug 2015 18:42:57 +0000 (+0000) Subject: const-ify TargetInfo::handleUserFeatures. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=bb02ce0b538bdd86fd8ee97e5bb2ca6aba07a865;p=clang const-ify TargetInfo::handleUserFeatures. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@246180 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/Basic/TargetInfo.h b/include/clang/Basic/TargetInfo.h index ac4c86521c..b05d866913 100644 --- a/include/clang/Basic/TargetInfo.h +++ b/include/clang/Basic/TargetInfo.h @@ -788,7 +788,7 @@ public: /// \return False on error. virtual bool handleUserFeatures(llvm::StringMap &Features, std::vector &UserFeatures, - DiagnosticsEngine &Diags) { + DiagnosticsEngine &Diags) const { for (const auto &F : UserFeatures) { const char *Name = F.c_str(); // Apply the feature via the target. diff --git a/lib/Basic/Targets.cpp b/lib/Basic/Targets.cpp index bfeba9b518..6a6a345251 100644 --- a/lib/Basic/Targets.cpp +++ b/lib/Basic/Targets.cpp @@ -870,7 +870,7 @@ public: DiagnosticsEngine &Diags) override; bool handleUserFeatures(llvm::StringMap &Features, std::vector &UserFeatures, - DiagnosticsEngine &Diags) override; + DiagnosticsEngine &Diags) const override; bool hasFeature(StringRef Feature) const override; void setFeatureEnabled(llvm::StringMap &Features, StringRef Name, bool Enabled) const override; @@ -1051,7 +1051,7 @@ bool PPCTargetInfo::handleTargetFeatures(std::vector &Features, bool PPCTargetInfo::handleUserFeatures(llvm::StringMap &Features, std::vector &UserFeatures, - DiagnosticsEngine &Diags) { + DiagnosticsEngine &Diags) const { // Handle explicit options being passed to the compiler here: if we've // explicitly turned off vsx and turned on power8-vector or direct-move then