From: Ata Borla <[email protected]>

gcc/rust/ChangeLog:
        * rust-linemap.cc (instance_): Changed ... nullptr.
        (Linemap::start_file): Likewise.
        (Linemap::location_to_string): Likewise.

Signed-off-by: Ata Borla <[email protected]>

Tested on x86_64-pc-linux-gnu.

---
 gcc/rust/rust-linemap.cc | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/gcc/rust/rust-linemap.cc b/gcc/rust/rust-linemap.cc
index 42ff6b7190e..ce887cffdcb 100644
--- a/gcc/rust/rust-linemap.cc
+++ b/gcc/rust/rust-linemap.cc
@@ -20,7 +20,7 @@
 
 #include "rust-linemap.h"
 
-Linemap *Linemap::instance_ = NULL;
+Linemap *Linemap::instance_ = nullptr;
 
 // Start getting locations from a new file.
 
@@ -28,7 +28,7 @@ void
 Linemap::start_file (const char *file_name, unsigned line_begin)
 {
   if (this->in_file_)
-    linemap_add (line_table, LC_LEAVE, 0, NULL, 0);
+    linemap_add (line_table, LC_LEAVE, 0, nullptr, 0);
   linemap_add (line_table, LC_ENTER, 0, file_name, line_begin);
   this->in_file_ = true;
 }
@@ -45,7 +45,7 @@ Linemap::location_to_string (location_t location)
   // only for simple file:line locations.
   resolved_location = linemap_resolve_location (line_table, location,
                                                LRK_SPELLING_LOCATION, &lmo);
-  if (lmo == NULL || resolved_location < RESERVED_LOCATION_COUNT)
+  if (lmo == nullptr || resolved_location < RESERVED_LOCATION_COUNT)
     return "";
   const char *path = LINEMAP_FILE (lmo);
   if (!path)
-- 
2.55.0

Reply via email to