| OLD | NEW |
| 1 //===- subzero/src/IceRangeSpec.h - Include/exclude specs -------*- C++ -*-===// | 1 //===- subzero/src/IceRangeSpec.h - Include/exclude specs -------*- C++ -*-===// |
| 2 // | 2 // |
| 3 // The Subzero Code Generator | 3 // The Subzero Code Generator |
| 4 // | 4 // |
| 5 // This file is distributed under the University of Illinois Open Source | 5 // This file is distributed under the University of Illinois Open Source |
| 6 // License. See LICENSE.TXT for details. | 6 // License. See LICENSE.TXT for details. |
| 7 // | 7 // |
| 8 //===----------------------------------------------------------------------===// | 8 //===----------------------------------------------------------------------===// |
| 9 /// | 9 /// |
| 10 /// \file | 10 /// \file |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 bool match(const std::string &Name, uint32_t Number) const; | 52 bool match(const std::string &Name, uint32_t Number) const; |
| 53 bool match(GlobalString Name, uint32_t Number) const { | 53 bool match(GlobalString Name, uint32_t Number) const { |
| 54 return match(Name.toStringOrEmpty(), Number); | 54 return match(Name.toStringOrEmpty(), Number); |
| 55 } | 55 } |
| 56 // Returns true if any RangeSpec object has had init() called with an explicit | 56 // Returns true if any RangeSpec object has had init() called with an explicit |
| 57 // name rather than (or in addition to) a numeric range. If so, we want to | 57 // name rather than (or in addition to) a numeric range. If so, we want to |
| 58 // construct explicit names for functions even in a non-DUMP build so that | 58 // construct explicit names for functions even in a non-DUMP build so that |
| 59 // matching on function name works correctly. Note that this is not | 59 // matching on function name works correctly. Note that this is not |
| 60 // thread-safe, so we count on all this being handled by the startup thread. | 60 // thread-safe, so we count on all this being handled by the startup thread. |
| 61 static bool hasNames() { return HasNames; } | 61 static bool hasNames() { return HasNames; } |
| 62 // Helper function to tokenize a string into a vector of string tokens, given |
| 63 // a single delimiter character. An empty string produces an empty token |
| 64 // vector. Zero-length tokens are allowed, e.g. ",a,,,b," may tokenize to |
| 65 // {"","a","","","b",""}. |
| 66 static std::vector<std::string> tokenize(const std::string &Spec, |
| 67 char Delimiter); |
| 62 | 68 |
| 63 private: | 69 private: |
| 64 void include(const std::string &Token); | 70 void include(const std::string &Token); |
| 65 void exclude(const std::string &Token); | 71 void exclude(const std::string &Token); |
| 66 Desc Includes; | 72 Desc Includes; |
| 67 Desc Excludes; | 73 Desc Excludes; |
| 68 static bool HasNames; | 74 static bool HasNames; |
| 69 }; | 75 }; |
| 70 | 76 |
| 71 } // end of namespace Ice | 77 } // end of namespace Ice |
| 72 | 78 |
| 73 #endif // SUBZERO_SRC_ICERANGESPEC_H | 79 #endif // SUBZERO_SRC_ICERANGESPEC_H |
| OLD | NEW |