]> granicus.if.org Git - clang/commitdiff
const-ify TargetInfo::handleUserFeatures.
authorEric Christopher <echristo@gmail.com>
Thu, 27 Aug 2015 18:42:57 +0000 (18:42 +0000)
committerEric Christopher <echristo@gmail.com>
Thu, 27 Aug 2015 18:42:57 +0000 (18:42 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@246180 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Basic/TargetInfo.h
lib/Basic/Targets.cpp

index ac4c86521c4886bcb1d97eda0ea579fb392fe1ca..b05d8669139f5734259e5bce6013e464137918f7 100644 (file)
@@ -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.
index bfeba9b5184be3853e42a589b5e1dc9634d4e3d6..6a6a34525183fc3d2717a5a9e8002f4004a80dd0 100644 (file)
@@ -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(std::vector<std::string> &Features,
 
 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