r246180 - const-ify TargetInfo::handleUserFeatures.

Eric Christopher via cfe-commits cfe-commits at lists.llvm.org
Thu Aug 27 11:42:57 PDT 2015


Author: echristo
Date: Thu Aug 27 13:42:57 2015
New Revision: 246180

URL: http://llvm.org/viewvc/llvm-project?rev=246180&view=rev
Log:
const-ify TargetInfo::handleUserFeatures.

Modified:
    cfe/trunk/include/clang/Basic/TargetInfo.h
    cfe/trunk/lib/Basic/Targets.cpp

Modified: cfe/trunk/include/clang/Basic/TargetInfo.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/TargetInfo.h?rev=246180&r1=246179&r2=246180&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/TargetInfo.h (original)
+++ cfe/trunk/include/clang/Basic/TargetInfo.h Thu Aug 27 13:42:57 2015
@@ -788,7 +788,7 @@ public:
   /// \return False on error.
   virtual bool handleUserFeatures(llvm::StringMap<bool> &Features,
 				  std::vector<std::string> &UserFeatures,
-				  DiagnosticsEngine &Diags) {
+				  DiagnosticsEngine &Diags) const {
     for (const auto &F : UserFeatures) {
       const char *Name = F.c_str();
       // Apply the feature via the target.

Modified: cfe/trunk/lib/Basic/Targets.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/Targets.cpp?rev=246180&r1=246179&r2=246180&view=diff
==============================================================================
--- cfe/trunk/lib/Basic/Targets.cpp (original)
+++ cfe/trunk/lib/Basic/Targets.cpp Thu Aug 27 13:42:57 2015
@@ -870,7 +870,7 @@ public:
                             DiagnosticsEngine &Diags) override;
   bool handleUserFeatures(llvm::StringMap<bool> &Features,
                           std::vector<std::string> &UserFeatures,
-                          DiagnosticsEngine &Diags) override;
+                          DiagnosticsEngine &Diags) const override;
   bool hasFeature(StringRef Feature) const override;
   void setFeatureEnabled(llvm::StringMap<bool> &Features, StringRef Name,
                          bool Enabled) const override;
@@ -1051,7 +1051,7 @@ bool PPCTargetInfo::handleTargetFeatures
 
 bool PPCTargetInfo::handleUserFeatures(llvm::StringMap<bool> &Features,
                                        std::vector<std::string> &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




More information about the cfe-commits mailing list