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

Unified Diff: src/IceBitVector.h

Issue 1961743002: Subzero: Update for LLVM 3.9 (trunk). (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero@master
Patch Set: Remove unnecessary variable Created 4 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Makefile.standalone ('k') | src/IceCfg.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/IceBitVector.h
diff --git a/src/IceBitVector.h b/src/IceBitVector.h
index cdb4f33b420341c6bf063ece151e6efd3e1029e2..8b5330a2ce3ddec5f7c1361e9c7b281aa4f15e06 100644
--- a/src/IceBitVector.h
+++ b/src/IceBitVector.h
@@ -260,6 +260,14 @@ template <template <typename> class AT> class BitVectorTmpl {
unsigned Capacity; // Size of allocated memory in BitWord.
Allocator Alloc;
+ uint64_t alignTo(uint64_t Value, uint64_t Align) {
+#ifdef PNACL_LLVM
+ return llvm::RoundUpToAlignment(Value, Align);
+#else // !PNACL_LLVM
+ return llvm::alignTo(Value, Align);
+#endif // !PNACL_LLVM
+ }
+
public:
typedef unsigned size_type;
// Encapsulation of a single bit.
@@ -469,7 +477,7 @@ public:
BitWord PrefixMask = ~0UL << (I % BITWORD_SIZE);
Bits[I / BITWORD_SIZE] |= PrefixMask;
- I = llvm::RoundUpToAlignment(I, BITWORD_SIZE);
+ I = alignTo(I, BITWORD_SIZE);
for (; I + BITWORD_SIZE <= E; I += BITWORD_SIZE)
Bits[I / BITWORD_SIZE] = ~0UL;
@@ -509,7 +517,7 @@ public:
BitWord PrefixMask = ~0UL << (I % BITWORD_SIZE);
Bits[I / BITWORD_SIZE] &= ~PrefixMask;
- I = llvm::RoundUpToAlignment(I, BITWORD_SIZE);
+ I = alignTo(I, BITWORD_SIZE);
for (; I + BITWORD_SIZE <= E; I += BITWORD_SIZE)
Bits[I / BITWORD_SIZE] = 0UL;
« no previous file with comments | « Makefile.standalone ('k') | src/IceCfg.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698