OLD | NEW |
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 20 matching lines...) Expand all Loading... |
31 #include "llvm/ADT/ilist_node.h" | 31 #include "llvm/ADT/ilist_node.h" |
32 #include "llvm/ADT/iterator_range.h" | 32 #include "llvm/ADT/iterator_range.h" |
33 #include "llvm/ADT/SmallBitVector.h" | 33 #include "llvm/ADT/SmallBitVector.h" |
34 #include "llvm/ADT/SmallVector.h" | 34 #include "llvm/ADT/SmallVector.h" |
35 #include "llvm/ADT/STLExtras.h" | 35 #include "llvm/ADT/STLExtras.h" |
36 #include "llvm/Support/Allocator.h" | 36 #include "llvm/Support/Allocator.h" |
37 #include "llvm/Support/Casting.h" | 37 #include "llvm/Support/Casting.h" |
38 #include "llvm/Support/ELF.h" | 38 #include "llvm/Support/ELF.h" |
39 #include "llvm/Support/raw_ostream.h" | 39 #include "llvm/Support/raw_ostream.h" |
40 | 40 |
| 41 // TODO(stichnot): Define ICE_ATTRIBUTE_TLS as thread_local after all |
| 42 // compilers support that C++11 keyword. In particular, MacOS 10.6 |
| 43 // does not support it. |
| 44 #if defined (_MSC_VER) |
| 45 #define ICE_ATTRIBUTE_TLS __declspec(thread) |
| 46 #else // !_MSC_VER |
| 47 #define ICE_ATTRIBUTE_TLS __thread |
| 48 #endif // !_MSC_VER |
| 49 |
41 namespace Ice { | 50 namespace Ice { |
42 | 51 |
43 class Assembler; | 52 class Assembler; |
44 class Cfg; | 53 class Cfg; |
45 class CfgNode; | 54 class CfgNode; |
46 class Constant; | 55 class Constant; |
47 class ELFObjectWriter; | 56 class ELFObjectWriter; |
48 class ELFStreamer; | 57 class ELFStreamer; |
49 class FunctionDeclaration; | 58 class FunctionDeclaration; |
50 class GlobalContext; | 59 class GlobalContext; |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
168 return llvm::make_range(Container.rbegin(), Container.rend()); | 177 return llvm::make_range(Container.rbegin(), Container.rend()); |
169 } | 178 } |
170 template <typename T> | 179 template <typename T> |
171 llvm::iterator_range<typename T::reverse_iterator> reverse_range(T &Container) { | 180 llvm::iterator_range<typename T::reverse_iterator> reverse_range(T &Container) { |
172 return llvm::make_range(Container.rbegin(), Container.rend()); | 181 return llvm::make_range(Container.rbegin(), Container.rend()); |
173 } | 182 } |
174 | 183 |
175 } // end of namespace Ice | 184 } // end of namespace Ice |
176 | 185 |
177 #endif // SUBZERO_SRC_ICEDEFS_H | 186 #endif // SUBZERO_SRC_ICEDEFS_H |
OLD | NEW |