| 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 |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 | 67 |
| 68 /// Define variables which configure translation and related support functions. | 68 /// Define variables which configure translation and related support functions. |
| 69 class ClFlags { | 69 class ClFlags { |
| 70 ClFlags(const ClFlags &) = delete; | 70 ClFlags(const ClFlags &) = delete; |
| 71 ClFlags &operator=(const ClFlags &) = delete; | 71 ClFlags &operator=(const ClFlags &) = delete; |
| 72 | 72 |
| 73 public: | 73 public: |
| 74 /// User defined constructor. | 74 /// User defined constructor. |
| 75 ClFlags() { resetClFlags(); } | 75 ClFlags() { resetClFlags(); } |
| 76 | 76 |
| 77 /// The command line flags. |
| 78 static ClFlags Flags; |
| 79 |
| 77 /// \brief Parse commmand line options for Subzero. | 80 /// \brief Parse commmand line options for Subzero. |
| 78 /// | 81 /// |
| 79 /// This is done use cl::ParseCommandLineOptions() and the static variables of | 82 /// This is done use cl::ParseCommandLineOptions() and the static variables of |
| 80 /// type cl::opt defined in IceClFlags.cpp | 83 /// type cl::opt defined in IceClFlags.cpp |
| 81 static void parseFlags(int argc, char *argv[]); | 84 static void parseFlags(int argc, char *argv[]); |
| 82 | 85 |
| 83 /// Reset all configuration options to their nominal values. | 86 /// Reset all configuration options to their nominal values. |
| 84 void resetClFlags(); | 87 void resetClFlags(); |
| 85 | 88 |
| 86 /// \brief Retrieve the configuration option state | 89 /// \brief Retrieve the configuration option state |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 148 GenerateUnitTestMessages = NewValue; | 151 GenerateUnitTestMessages = NewValue; |
| 149 } | 152 } |
| 150 | 153 |
| 151 private: | 154 private: |
| 152 std::string AppName; | 155 std::string AppName; |
| 153 | 156 |
| 154 /// Initialized to false; not set by the command line. | 157 /// Initialized to false; not set by the command line. |
| 155 bool GenerateUnitTestMessages; | 158 bool GenerateUnitTestMessages; |
| 156 }; | 159 }; |
| 157 | 160 |
| 161 inline const ClFlags &getFlags() { return ClFlags::Flags; } |
| 162 |
| 158 } // end of namespace Ice | 163 } // end of namespace Ice |
| 159 | 164 |
| 160 #endif // SUBZERO_SRC_ICECLFLAGS_H | 165 #endif // SUBZERO_SRC_ICECLFLAGS_H |
| OLD | NEW |