diff options
author | Craig Topper <craig.topper@gmail.com> | 2014-04-07 04:17:22 +0000 |
---|---|---|
committer | Craig Topper <craig.topper@gmail.com> | 2014-04-07 04:17:22 +0000 |
commit | c10719f55d3babe47ce754ad4e4964c7cd90d6e8 (patch) | |
tree | 28574fe7c646e03e6660387f3595f098d75fcd3f /llvm/lib/Support/APInt.cpp | |
parent | 093edf8c7f4d44979376892303d101f02924c68f (diff) | |
download | llvm-c10719f55d3babe47ce754ad4e4964c7cd90d6e8.zip llvm-c10719f55d3babe47ce754ad4e4964c7cd90d6e8.tar.gz llvm-c10719f55d3babe47ce754ad4e4964c7cd90d6e8.tar.bz2 |
[C++11] Make use of 'nullptr' in the Support library.
llvm-svn: 205697
Diffstat (limited to 'llvm/lib/Support/APInt.cpp')
-rw-r--r-- | llvm/lib/Support/APInt.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/llvm/lib/Support/APInt.cpp b/llvm/lib/Support/APInt.cpp index 0c46725..6dafe9e 100644 --- a/llvm/lib/Support/APInt.cpp +++ b/llvm/lib/Support/APInt.cpp @@ -1683,10 +1683,10 @@ void APInt::divide(const APInt LHS, unsigned lhsWords, // Allocate space for the temporary values we need either on the stack, if // it will fit, or on the heap if it won't. unsigned SPACE[128]; - unsigned *U = 0; - unsigned *V = 0; - unsigned *Q = 0; - unsigned *R = 0; + unsigned *U = nullptr; + unsigned *V = nullptr; + unsigned *Q = nullptr; + unsigned *R = nullptr; if ((Remainder?4:3)*n+2*m+1 <= 128) { U = &SPACE[0]; V = &SPACE[m+n+1]; @@ -1872,7 +1872,7 @@ APInt APInt::udiv(const APInt& RHS) const { // We have to compute it the hard way. Invoke the Knuth divide algorithm. APInt Quotient(1,0); // to hold result. - divide(*this, lhsWords, RHS, rhsWords, &Quotient, 0); + divide(*this, lhsWords, RHS, rhsWords, &Quotient, nullptr); return Quotient; } @@ -1920,7 +1920,7 @@ APInt APInt::urem(const APInt& RHS) const { // We have to compute it the hard way. Invoke the Knuth divide algorithm. APInt Remainder(1,0); - divide(*this, lhsWords, RHS, rhsWords, 0, &Remainder); + divide(*this, lhsWords, RHS, rhsWords, nullptr, &Remainder); return Remainder; } |