summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support/LineIterator.cpp
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@gmail.com>2014-04-07 04:17:22 +0000
committerCraig Topper <craig.topper@gmail.com>2014-04-07 04:17:22 +0000
commitc10719f55d3babe47ce754ad4e4964c7cd90d6e8 (patch)
tree28574fe7c646e03e6660387f3595f098d75fcd3f /llvm/lib/Support/LineIterator.cpp
parent093edf8c7f4d44979376892303d101f02924c68f (diff)
downloadbcm5719-llvm-c10719f55d3babe47ce754ad4e4964c7cd90d6e8.tar.gz
bcm5719-llvm-c10719f55d3babe47ce754ad4e4964c7cd90d6e8.zip
[C++11] Make use of 'nullptr' in the Support library.
llvm-svn: 205697
Diffstat (limited to 'llvm/lib/Support/LineIterator.cpp')
-rw-r--r--llvm/lib/Support/LineIterator.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/llvm/lib/Support/LineIterator.cpp b/llvm/lib/Support/LineIterator.cpp
index 056d817526c..947a8fb6062 100644
--- a/llvm/lib/Support/LineIterator.cpp
+++ b/llvm/lib/Support/LineIterator.cpp
@@ -13,9 +13,10 @@
using namespace llvm;
line_iterator::line_iterator(const MemoryBuffer &Buffer, char CommentMarker)
- : Buffer(Buffer.getBufferSize() ? &Buffer : 0),
+ : Buffer(Buffer.getBufferSize() ? &Buffer : nullptr),
CommentMarker(CommentMarker), LineNumber(1),
- CurrentLine(Buffer.getBufferSize() ? Buffer.getBufferStart() : 0, 0) {
+ CurrentLine(Buffer.getBufferSize() ? Buffer.getBufferStart() : nullptr,
+ 0) {
// Ensure that if we are constructed on a non-empty memory buffer that it is
// a null terminated buffer.
if (Buffer.getBufferSize()) {
@@ -53,7 +54,7 @@ void line_iterator::advance() {
if (*Pos == '\0') {
// We've hit the end of the buffer, reset ourselves to the end state.
- Buffer = 0;
+ Buffer = nullptr;
CurrentLine = StringRef();
return;
}
OpenPOWER on IntegriCloud