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

Side by Side Diff: src/IceUtils.h

Issue 1202253002: Includes module header first. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Changes All Subzero includes to match LLVM style guide. Created 5 years, 6 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
OLDNEW
1 //===- subzero/src/IceUtils.h - Utility functions ---------------*- C++ -*-===// 1 //===- subzero/src/IceUtils.h - Utility functions ---------------*- 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 some utility functions. 10 // This file declares some utility functions.
11 // 11 //
12 //===----------------------------------------------------------------------===// 12 //===----------------------------------------------------------------------===//
13 13
14 #ifndef SUBZERO_SRC_ICEUTILS_H 14 #ifndef SUBZERO_SRC_ICEUTILS_H
15 #define SUBZERO_SRC_ICEUTILS_H 15 #define SUBZERO_SRC_ICEUTILS_H
16
16 #include <climits> 17 #include <climits>
17 18
18 namespace Ice { 19 namespace Ice {
19 20
20 // Similar to bit_cast, but allows copying from types of unrelated 21 // Similar to bit_cast, but allows copying from types of unrelated
21 // sizes. This method was introduced to enable the strict aliasing 22 // sizes. This method was introduced to enable the strict aliasing
22 // optimizations of GCC 4.4. Basically, GCC mindlessly relies on 23 // optimizations of GCC 4.4. Basically, GCC mindlessly relies on
23 // obscure details in the C++ standard that make reinterpret_cast 24 // obscure details in the C++ standard that make reinterpret_cast
24 // virtually useless. 25 // virtually useless.
25 template <class D, class S> inline D bit_copy(const S &source) { 26 template <class D, class S> inline D bit_copy(const S &source) {
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 static inline uint32_t rotateRight32(uint32_t value, uint32_t shift) { 103 static inline uint32_t rotateRight32(uint32_t value, uint32_t shift) {
103 if (shift == 0) 104 if (shift == 0)
104 return value; 105 return value;
105 return (value >> shift) | (value << (32 - shift)); 106 return (value >> shift) | (value << (32 - shift));
106 } 107 }
107 }; 108 };
108 109
109 } // end of namespace Ice 110 } // end of namespace Ice
110 111
111 #endif // SUBZERO_SRC_ICEUTILS_H 112 #endif // SUBZERO_SRC_ICEUTILS_H
OLDNEW
« src/IceTargetLoweringARM32.cpp ('K') | « src/IceTypes.cpp ('k') | src/PNaClTranslator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698