Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(62)

Side by Side Diff: src/IceClFlags.h

Issue 1091023002: Fix locking for printing error messages. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Fix nits. Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | src/IceClFlags.cpp » ('j') | src/PNaClTranslator.cpp » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 // This file declares command line flags controlling translation. 10 // This file declares command line flags controlling translation.
11 // 11 //
12 //===----------------------------------------------------------------------===// 12 //===----------------------------------------------------------------------===//
13 13
14 #ifndef SUBZERO_SRC_ICECLFLAGS_H 14 #ifndef SUBZERO_SRC_ICECLFLAGS_H
15 #define SUBZERO_SRC_ICECLFLAGS_H 15 #define SUBZERO_SRC_ICECLFLAGS_H
16 16
17 #include "IceDefs.h" 17 #include "IceDefs.h"
18 #include "IceTypes.h" 18 #include "IceTypes.h"
19 19
20 namespace Ice { 20 namespace Ice {
21 21
22 class ClFlagsExtra; 22 class ClFlagsExtra;
23 23
24 class ClFlags { 24 class ClFlags {
25 ClFlags(const ClFlags &) = delete; 25 ClFlags(const ClFlags &) = delete;
26 ClFlags &operator=(const ClFlags &) = delete; 26 ClFlags &operator=(const ClFlags &) = delete;
27 27
28 public: 28 public:
29 ClFlags() 29 ClFlags() { resetClFlags(*this); }
30 : // bool fields.
31 AllowErrorRecovery(false),
32 AllowUninitializedGlobals(false), DataSections(false),
33 DecorateAsm(false), DisableInternal(false), DisableIRGeneration(false),
34 DisableTranslation(false), DumpStats(false), FunctionSections(false),
35 GenerateUnitTestMessages(false), PhiEdgeSplit(false),
36 RandomNopInsertion(false), RandomRegAlloc(false),
37 SubzeroTimingEnabled(false), TimeEachFunction(false),
38 UseSandboxing(false),
39 // Enum and integer fields.
40 Opt(Opt_m1), OutFileType(FT_Iasm), RandomMaxNopsPerInstruction(0),
41 RandomNopProbabilityAsPercentage(0), TArch(TargetArch_NUM),
42 VMask(IceV_None),
43 // IceString fields.
44 DefaultFunctionPrefix(""), DefaultGlobalPrefix(""), TestPrefix(""),
45 TimingFocusOn(""), TranslateOnly(""), VerboseFocusOn(""),
46 // size_t and 64-bit fields.
47 NumTranslationThreads(0), RandomSeed(0) {}
48 30
49 static void parseFlags(int argc, char *argv[]); 31 static void parseFlags(int argc, char *argv[]);
32 static void resetClFlags(ClFlags &OutFlags);
50 static void getParsedClFlags(ClFlags &OutFlags); 33 static void getParsedClFlags(ClFlags &OutFlags);
51 static void getParsedClFlagsExtra(ClFlagsExtra &OutFlagsExtra); 34 static void getParsedClFlagsExtra(ClFlagsExtra &OutFlagsExtra);
52 35
53 // bool accessors. 36 // bool accessors.
54 37
55 bool getAllowErrorRecovery() const { return AllowErrorRecovery; } 38 bool getAllowErrorRecovery() const { return AllowErrorRecovery; }
56 void setAllowErrorRecovery(bool NewValue) { AllowErrorRecovery = NewValue; } 39 void setAllowErrorRecovery(bool NewValue) { AllowErrorRecovery = NewValue; }
57 40
58 bool getAllowUninitializedGlobals() const { 41 bool getAllowUninitializedGlobals() const {
59 return AllowUninitializedGlobals; 42 return AllowUninitializedGlobals;
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 IceString TranslateOnly; 203 IceString TranslateOnly;
221 IceString VerboseFocusOn; 204 IceString VerboseFocusOn;
222 205
223 size_t NumTranslationThreads; // 0 means completely sequential 206 size_t NumTranslationThreads; // 0 means completely sequential
224 uint64_t RandomSeed; 207 uint64_t RandomSeed;
225 }; 208 };
226 209
227 } // end of namespace Ice 210 } // end of namespace Ice
228 211
229 #endif // SUBZERO_SRC_ICECLFLAGS_H 212 #endif // SUBZERO_SRC_ICECLFLAGS_H
OLDNEW
« no previous file with comments | « no previous file | src/IceClFlags.cpp » ('j') | src/PNaClTranslator.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698