[llvm-commits] [llvm] r121157 - in /llvm/trunk: include/llvm/Support/PathV2.h lib/Support/PathV2.cpp

Michael J. Spencer bigcheesegs at gmail.com
Tue Dec 7 10:12:07 PST 2010


Author: mspencer
Date: Tue Dec  7 12:12:07 2010
New Revision: 121157

URL: http://llvm.org/viewvc/llvm-project?rev=121157&view=rev
Log:
Support/PathV2: Remove const from bool return types.

Modified:
    llvm/trunk/include/llvm/Support/PathV2.h
    llvm/trunk/lib/Support/PathV2.cpp

Modified: llvm/trunk/include/llvm/Support/PathV2.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/PathV2.h?rev=121157&r1=121156&r2=121157&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Support/PathV2.h (original)
+++ llvm/trunk/include/llvm/Support/PathV2.h Tue Dec  7 12:12:07 2010
@@ -264,7 +264,7 @@
 ///
 /// @param path Input path.
 /// @result True if the path has a root name, false otherwise.
-const bool has_root_name(const Twine &path);
+bool has_root_name(const Twine &path);
 
 /// @brief Has root directory?
 ///
@@ -272,7 +272,7 @@
 ///
 /// @param path Input path.
 /// @result True if the path has a root directory, false otherwise.
-const bool has_root_directory(const Twine &path);
+bool has_root_directory(const Twine &path);
 
 /// @brief Has root path?
 ///
@@ -280,7 +280,7 @@
 ///
 /// @param path Input path.
 /// @result True if the path has a root path, false otherwise.
-const bool has_root_path(const Twine &path);
+bool has_root_path(const Twine &path);
 
 /// @brief Has relative path?
 ///
@@ -288,7 +288,7 @@
 ///
 /// @param path Input path.
 /// @result True if the path has a relative path, false otherwise.
-const bool has_relative_path(const Twine &path);
+bool has_relative_path(const Twine &path);
 
 /// @brief Has parent path?
 ///
@@ -296,7 +296,7 @@
 ///
 /// @param path Input path.
 /// @result True if the path has a parent path, false otherwise.
-const bool has_parent_path(const Twine &path);
+bool has_parent_path(const Twine &path);
 
 /// @brief Has filename?
 ///
@@ -304,7 +304,7 @@
 ///
 /// @param path Input path.
 /// @result True if the path has a filename, false otherwise.
-const bool has_filename(const Twine &path);
+bool has_filename(const Twine &path);
 
 /// @brief Has stem?
 ///
@@ -312,7 +312,7 @@
 ///
 /// @param path Input path.
 /// @result True if the path has a stem, false otherwise.
-const bool has_stem(const Twine &path);
+bool has_stem(const Twine &path);
 
 /// @brief Has extension?
 ///
@@ -320,19 +320,19 @@
 ///
 /// @param path Input path.
 /// @result True if the path has a extension, false otherwise.
-const bool has_extension(const Twine &path);
+bool has_extension(const Twine &path);
 
 /// @brief Is path absolute?
 ///
 /// @param path Input path.
 /// @result True if the path is absolute, false if it is not.
-const bool is_absolute(const Twine &path);
+bool is_absolute(const Twine &path);
 
 /// @brief Is path relative?
 ///
 /// @param path Input path.
 /// @result True if the path is relative, false if it is not.
-const bool is_relative(const Twine &path);
+bool is_relative(const Twine &path);
 
 } // end namespace path
 } // end namespace sys

Modified: llvm/trunk/lib/Support/PathV2.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/PathV2.cpp?rev=121157&r1=121156&r2=121157&view=diff
==============================================================================
--- llvm/trunk/lib/Support/PathV2.cpp (original)
+++ llvm/trunk/lib/Support/PathV2.cpp Tue Dec  7 12:12:07 2010
@@ -491,56 +491,56 @@
       return StringRef(fname.begin() + pos, fname.size() - pos);
 }
 
-const bool has_root_name(const Twine &path) {
+bool has_root_name(const Twine &path) {
   SmallString<128> path_storage;
   StringRef p = path.toStringRef(path_storage);
 
   return !root_name(p).empty();
 }
 
-const bool has_root_directory(const Twine &path) {
+bool has_root_directory(const Twine &path) {
   SmallString<128> path_storage;
   StringRef p = path.toStringRef(path_storage);
 
   return !root_directory(p).empty();
 }
 
-const bool has_root_path(const Twine &path) {
+bool has_root_path(const Twine &path) {
   SmallString<128> path_storage;
   StringRef p = path.toStringRef(path_storage);
 
   return !root_path(p).empty();
 }
 
-const bool has_filename(const Twine &path) {
+bool has_filename(const Twine &path) {
   SmallString<128> path_storage;
   StringRef p = path.toStringRef(path_storage);
 
   return !filename(p).empty();
 }
 
-const bool has_parent_path(const Twine &path) {
+bool has_parent_path(const Twine &path) {
   SmallString<128> path_storage;
   StringRef p = path.toStringRef(path_storage);
 
   return !parent_path(p).empty();
 }
 
-const bool has_stem(const Twine &path) {
+bool has_stem(const Twine &path) {
   SmallString<128> path_storage;
   StringRef p = path.toStringRef(path_storage);
 
   return !stem(p).empty();
 }
 
-const bool has_extension(const Twine &path) {
+bool has_extension(const Twine &path) {
   SmallString<128> path_storage;
   StringRef p = path.toStringRef(path_storage);
 
   return !extension(p).empty();
 }
 
-const bool is_absolute(const Twine &path) {
+bool is_absolute(const Twine &path) {
   SmallString<128> path_storage;
   StringRef p = path.toStringRef(path_storage);
 
@@ -554,7 +554,7 @@
   return rootDir && rootName;
 }
 
-const bool is_relative(const Twine &path) {
+bool is_relative(const Twine &path) {
   return !is_absolute(path);
 }
 





More information about the llvm-commits mailing list