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

Side by Side Diff: src/IceDefs.h

Issue 877003003: Subzero: Use a "known" version of clang-format. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Add a clang-format blacklist. Fix formatting "errors". Created 5 years, 11 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 | « src/IceConverter.cpp ('k') | src/IceELFObjectWriter.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 //===- subzero/src/IceDefs.h - Common Subzero declaraions -------*- C++ -*-===// 1 //===- subzero/src/IceDefs.h - Common Subzero declaraions -------*- 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 various useful types and classes that have 10 // This file declares various useful types and classes that have
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 typedef std::vector<LiveBeginEndMapEntry, 119 typedef std::vector<LiveBeginEndMapEntry,
120 CfgLocalAllocator<LiveBeginEndMapEntry>> LiveBeginEndMap; 120 CfgLocalAllocator<LiveBeginEndMapEntry>> LiveBeginEndMap;
121 typedef llvm::BitVector LivenessBV; 121 typedef llvm::BitVector LivenessBV;
122 122
123 typedef uint32_t TimerStackIdT; 123 typedef uint32_t TimerStackIdT;
124 typedef uint32_t TimerIdT; 124 typedef uint32_t TimerIdT;
125 125
126 // Use alignas(MaxCacheLineSize) to isolate variables/fields that 126 // Use alignas(MaxCacheLineSize) to isolate variables/fields that
127 // might be contended while multithreading. Assumes the maximum cache 127 // might be contended while multithreading. Assumes the maximum cache
128 // line size is 64. 128 // line size is 64.
129 enum { 129 enum { MaxCacheLineSize = 64 };
130 MaxCacheLineSize = 64
131 };
132 // Use ICE_CACHELINE_BOUNDARY to force the next field in a declaration 130 // Use ICE_CACHELINE_BOUNDARY to force the next field in a declaration
133 // list to be aligned to the next cache line. 131 // list to be aligned to the next cache line.
134 #define ICE_CACHELINE_BOUNDARY \ 132 #define ICE_CACHELINE_BOUNDARY \
135 alignas(MaxCacheLineSize) struct {} 133 alignas(MaxCacheLineSize) struct {}
136 134
137 // PNaCl is ILP32, so theoretically we should only need 32-bit offsets. 135 // PNaCl is ILP32, so theoretically we should only need 32-bit offsets.
138 typedef int32_t RelocOffsetT; 136 typedef int32_t RelocOffsetT;
139 enum { RelocAddrSize = 4 }; 137 enum { RelocAddrSize = 4 };
140 138
141 enum LivenessMode { 139 enum LivenessMode {
(...skipping 30 matching lines...) Expand all
172 IceV_All = ~IceV_None, 170 IceV_All = ~IceV_None,
173 IceV_Most = IceV_All & ~IceV_LinearScan 171 IceV_Most = IceV_All & ~IceV_LinearScan
174 }; 172 };
175 typedef uint32_t VerboseMask; 173 typedef uint32_t VerboseMask;
176 174
177 typedef llvm::raw_ostream Ostream; 175 typedef llvm::raw_ostream Ostream;
178 typedef llvm::raw_fd_ostream Fdstream; 176 typedef llvm::raw_fd_ostream Fdstream;
179 177
180 typedef std::mutex GlobalLockType; 178 typedef std::mutex GlobalLockType;
181 179
182 enum ErrorCodes { 180 enum ErrorCodes { EC_None = 0, EC_Args, EC_Bitcode, EC_Translation };
183 EC_None = 0,
184 EC_Args,
185 EC_Bitcode,
186 EC_Translation
187 };
188 181
189 // Wrapper around std::error_code for allowing multiple errors to be 182 // Wrapper around std::error_code for allowing multiple errors to be
190 // folded into one. The current implementation keeps track of the 183 // folded into one. The current implementation keeps track of the
191 // first error, which is likely to be the most useful one, and this 184 // first error, which is likely to be the most useful one, and this
192 // could be extended to e.g. collect a vector of errors. 185 // could be extended to e.g. collect a vector of errors.
193 class ErrorCode : public std::error_code { 186 class ErrorCode : public std::error_code {
194 ErrorCode(const ErrorCode &) = delete; 187 ErrorCode(const ErrorCode &) = delete;
195 ErrorCode &operator=(const ErrorCode &) = delete; 188 ErrorCode &operator=(const ErrorCode &) = delete;
196 189
197 public: 190 public:
(...skipping 17 matching lines...) Expand all
215 return llvm::make_range(Container.rbegin(), Container.rend()); 208 return llvm::make_range(Container.rbegin(), Container.rend());
216 } 209 }
217 template <typename T> 210 template <typename T>
218 llvm::iterator_range<typename T::reverse_iterator> reverse_range(T &Container) { 211 llvm::iterator_range<typename T::reverse_iterator> reverse_range(T &Container) {
219 return llvm::make_range(Container.rbegin(), Container.rend()); 212 return llvm::make_range(Container.rbegin(), Container.rend());
220 } 213 }
221 214
222 } // end of namespace Ice 215 } // end of namespace Ice
223 216
224 #endif // SUBZERO_SRC_ICEDEFS_H 217 #endif // SUBZERO_SRC_ICEDEFS_H
OLDNEW
« no previous file with comments | « src/IceConverter.cpp ('k') | src/IceELFObjectWriter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698