| OLD | NEW |
| 1 //===- subzero/src/IceClFlags.h - Cl Flags for translation ------*- C++ -*-===// | 1 //===- subzero/src/IceClFlags.h - Cl Flags for translation ------*- 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 |
| 11 /// \brief Declares Ice::ClFlags which implements command line processing. | 11 /// \brief Declares Ice::ClFlags which implements command line processing. |
| 12 /// | 12 /// |
| 13 //===----------------------------------------------------------------------===// | 13 //===----------------------------------------------------------------------===// |
| 14 | 14 |
| 15 #ifndef SUBZERO_SRC_ICECLFLAGS_H | 15 #ifndef SUBZERO_SRC_ICECLFLAGS_H |
| 16 #define SUBZERO_SRC_ICECLFLAGS_H | 16 #define SUBZERO_SRC_ICECLFLAGS_H |
| 17 | 17 |
| 18 #include "IceDefs.h" | 18 #include "IceDefs.h" |
| 19 #include "IceBuildDefs.h" | 19 #include "IceBuildDefs.h" |
| 20 #include "IceClFlags.def" | 20 #include "IceClFlags.def" |
| 21 #include "IceRangeSpec.h" |
| 21 #include "IceTypes.h" | 22 #include "IceTypes.h" |
| 22 | 23 |
| 23 #ifdef __clang__ | 24 #ifdef __clang__ |
| 24 #pragma clang diagnostic push | 25 #pragma clang diagnostic push |
| 25 #pragma clang diagnostic ignored "-Wunused-parameter" | 26 #pragma clang diagnostic ignored "-Wunused-parameter" |
| 26 #endif // __clang__ | 27 #endif // __clang__ |
| 27 | 28 |
| 28 #include "llvm/IRReader/IRReader.h" | 29 #include "llvm/IRReader/IRReader.h" |
| 29 | 30 |
| 30 #ifdef __clang__ | 31 #ifdef __clang__ |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 /// | 144 /// |
| 144 /// Note: If dump routines have been turned off, the error messages | 145 /// Note: If dump routines have been turned off, the error messages |
| 145 /// will not be readable. Hence, turn off. | 146 /// will not be readable. Hence, turn off. |
| 146 bool getGenerateUnitTestMessages() const { | 147 bool getGenerateUnitTestMessages() const { |
| 147 return !BuildDefs::dump() || GenerateUnitTestMessages; | 148 return !BuildDefs::dump() || GenerateUnitTestMessages; |
| 148 } | 149 } |
| 149 /// Set ClFlags::GenerateUnitTestMessages to a new value | 150 /// Set ClFlags::GenerateUnitTestMessages to a new value |
| 150 void setGenerateUnitTestMessages(bool NewValue) { | 151 void setGenerateUnitTestMessages(bool NewValue) { |
| 151 GenerateUnitTestMessages = NewValue; | 152 GenerateUnitTestMessages = NewValue; |
| 152 } | 153 } |
| 154 bool matchForceO2(GlobalString Name, uint32_t Number) const { |
| 155 return ForceO2.match(Name, Number); |
| 156 } |
| 157 bool matchTestStatus(GlobalString Name, uint32_t Number) const { |
| 158 return TestStatus.match(Name, Number); |
| 159 } |
| 160 bool matchTimingFocus(GlobalString Name, uint32_t Number) const { |
| 161 return TimingFocus.match(Name, Number); |
| 162 } |
| 163 bool matchTranslateOnly(GlobalString Name, uint32_t Number) const { |
| 164 return TranslateOnly.match(Name, Number); |
| 165 } |
| 166 bool matchVerboseFocusOn(GlobalString Name, uint32_t Number) const { |
| 167 return VerboseFocus.match(Name, Number); |
| 168 } |
| 169 bool matchVerboseFocusOn(const std::string &Name, uint32_t Number) const { |
| 170 return VerboseFocus.match(Name, Number); |
| 171 } |
| 153 | 172 |
| 154 private: | 173 private: |
| 155 std::string AppName; | 174 std::string AppName; |
| 156 | 175 |
| 157 /// Initialized to false; not set by the command line. | 176 /// Initialized to false; not set by the command line. |
| 158 bool GenerateUnitTestMessages; | 177 bool GenerateUnitTestMessages; |
| 178 |
| 179 RangeSpec ForceO2; |
| 180 RangeSpec TestStatus; |
| 181 RangeSpec TimingFocus; |
| 182 RangeSpec TranslateOnly; |
| 183 RangeSpec VerboseFocus; |
| 159 }; | 184 }; |
| 160 | 185 |
| 161 inline const ClFlags &getFlags() { return ClFlags::Flags; } | 186 inline const ClFlags &getFlags() { return ClFlags::Flags; } |
| 162 | 187 |
| 163 } // end of namespace Ice | 188 } // end of namespace Ice |
| 164 | 189 |
| 165 #endif // SUBZERO_SRC_ICECLFLAGS_H | 190 #endif // SUBZERO_SRC_ICECLFLAGS_H |
| OLD | NEW |