Re: [PATCH] D22824: MathExtras.h: add LLVM_CONSTEXPR where simple

2016-07-29 Thread Aaron Ballman via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM, thank you! Comment at: include/llvm/Support/MathExtras.h:672 @@ -669,2 +671,3 @@ inline uint64_t alignTo(uint64_t Value, uint64_t Align, uint64_t Skew = 0

Re: [PATCH] D22824: MathExtras.h: add LLVM_CONSTEXPR where simple

2016-07-28 Thread Hubert Tong via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: include/llvm/Support/MathExtras.h:672 @@ -669,2 +671,3 @@ inline uint64_t alignTo(uint64_t Value, uint64_t Align, uint64_t Skew = 0) { + assert(Align != 0u); Skew %= Align; aaron.ballman wrote: > Usual

Re: [PATCH] D22824: MathExtras.h: add LLVM_CONSTEXPR where simple

2016-07-28 Thread Aaron Ballman via cfe-commits
aaron.ballman added inline comments. Comment at: include/llvm/Support/MathExtras.h:672 @@ -669,2 +671,3 @@ inline uint64_t alignTo(uint64_t Value, uint64_t Align, uint64_t Skew = 0) { + assert(Align != 0u); Skew %= Align; Usually preferred to put in && "ratio

[PATCH] D22824: MathExtras.h: add LLVM_CONSTEXPR where simple

2016-07-26 Thread Hubert Tong via cfe-commits
hubert.reinterpretcast created this revision. hubert.reinterpretcast added reviewers: aaron.ballman, faisalv, rsmith. hubert.reinterpretcast added a subscriber: cfe-commits. This change adds `LLVM_CONSTEXPR` to functions selected as follows: - the body is already valid under C++11 for a `constexpr