| OLD | NEW |
| 1 //===- subzero/src/IceBitVector.h - Inline bit vector. ----------*- C++ -*-===// | 1 //===- subzero/src/IceBitVector.h - Inline bit vector. ----------*- 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 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 256 "Unsupported word size"); | 256 "Unsupported word size"); |
| 257 | 257 |
| 258 BitWord *Bits; // Actual bits. | 258 BitWord *Bits; // Actual bits. |
| 259 unsigned Size; // Size of bitvector in bits. | 259 unsigned Size; // Size of bitvector in bits. |
| 260 unsigned Capacity; // Size of allocated memory in BitWord. | 260 unsigned Capacity; // Size of allocated memory in BitWord. |
| 261 Allocator Alloc; | 261 Allocator Alloc; |
| 262 | 262 |
| 263 uint64_t alignTo(uint64_t Value, uint64_t Align) { | 263 uint64_t alignTo(uint64_t Value, uint64_t Align) { |
| 264 #ifdef PNACL_LLVM | 264 #ifdef PNACL_LLVM |
| 265 return llvm::RoundUpToAlignment(Value, Align); | 265 return llvm::RoundUpToAlignment(Value, Align); |
| 266 #else // !PNACL_LLVM | 266 #else // !PNACL_LLVM |
| 267 return llvm::alignTo(Value, Align); | 267 return llvm::alignTo(Value, Align); |
| 268 #endif // !PNACL_LLVM | 268 #endif // !PNACL_LLVM |
| 269 } | 269 } |
| 270 | 270 |
| 271 public: | 271 public: |
| 272 typedef unsigned size_type; | 272 typedef unsigned size_type; |
| 273 // Encapsulation of a single bit. | 273 // Encapsulation of a single bit. |
| 274 class reference { | 274 class reference { |
| 275 friend class BitVectorTmpl; | 275 friend class BitVectorTmpl; |
| 276 | 276 |
| (...skipping 544 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 821 | 821 |
| 822 namespace std { | 822 namespace std { |
| 823 /// Implement std::swap in terms of BitVectorTmpl swap. | 823 /// Implement std::swap in terms of BitVectorTmpl swap. |
| 824 template <template <typename> class AT> | 824 template <template <typename> class AT> |
| 825 inline void swap(Ice::BitVectorTmpl<AT> &LHS, Ice::BitVectorTmpl<AT> &RHS) { | 825 inline void swap(Ice::BitVectorTmpl<AT> &LHS, Ice::BitVectorTmpl<AT> &RHS) { |
| 826 LHS.swap(RHS); | 826 LHS.swap(RHS); |
| 827 } | 827 } |
| 828 } | 828 } |
| 829 | 829 |
| 830 #endif // SUBZERO_SRC_ICEBITVECTOR_H | 830 #endif // SUBZERO_SRC_ICEBITVECTOR_H |
| OLD | NEW |