Use nullptr instead of NULL.
authorRafael Espindola <rafael.espindola@gmail.com>
Tue, 29 Jul 2014 21:46:05 +0000 (21:46 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Tue, 29 Jul 2014 21:46:05 +0000 (21:46 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214229 91177308-0d34-0410-b5e6-96231b3b80d8

tools/gold/gold-plugin.cpp

index 3bbdb36131da605a23ba33316e6894bc3bd96725..495e7cca95bb70b3211af6b8e462ef938bfb81a2 100644 (file)
@@ -46,11 +46,11 @@ static ld_plugin_status discard_message(int level, const char *format, ...) {
   abort();
 }
 
   abort();
 }
 
-static ld_plugin_add_symbols add_symbols = NULL;
-static ld_plugin_get_symbols get_symbols = NULL;
-static ld_plugin_add_input_file add_input_file = NULL;
-static ld_plugin_set_extra_library_path set_extra_library_path = NULL;
-static ld_plugin_get_view get_view = NULL;
+static ld_plugin_add_symbols add_symbols = nullptr;
+static ld_plugin_get_symbols get_symbols = nullptr;
+static ld_plugin_add_input_file add_input_file = nullptr;
+static ld_plugin_set_extra_library_path set_extra_library_path = nullptr;
+static ld_plugin_get_view get_view = nullptr;
 static ld_plugin_message message = discard_message;
 static lto_codegen_model output_type = LTO_CODEGEN_PIC_MODEL_STATIC;
 static std::string output_name = "";
 static ld_plugin_message message = discard_message;
 static lto_codegen_model output_type = LTO_CODEGEN_PIC_MODEL_STATIC;
 static std::string output_name = "";
@@ -78,7 +78,7 @@ namespace options {
 
   static void process_plugin_option(const char* opt_)
   {
 
   static void process_plugin_option(const char* opt_)
   {
-    if (opt_ == NULL)
+    if (opt_ == nullptr)
       return;
     llvm::StringRef opt = opt_;
 
       return;
     llvm::StringRef opt = opt_;
 
@@ -306,7 +306,7 @@ static ld_plugin_status claim_file_hook(const ld_plugin_input_file *file,
     cf.syms.push_back(ld_plugin_symbol());
     ld_plugin_symbol &sym = cf.syms.back();
     sym.name = strdup(M->getSymbolName(i));
     cf.syms.push_back(ld_plugin_symbol());
     ld_plugin_symbol &sym = cf.syms.back();
     sym.name = strdup(M->getSymbolName(i));
-    sym.version = NULL;
+    sym.version = nullptr;
 
     int scope = attrs & LTO_SYMBOL_SCOPE_MASK;
     bool CanBeHidden = scope == LTO_SYMBOL_SCOPE_DEFAULT_CAN_BE_HIDDEN;
 
     int scope = attrs & LTO_SYMBOL_SCOPE_MASK;
     bool CanBeHidden = scope == LTO_SYMBOL_SCOPE_DEFAULT_CAN_BE_HIDDEN;
@@ -330,7 +330,7 @@ static ld_plugin_status claim_file_hook(const ld_plugin_input_file *file,
     }
 
     int definition = attrs & LTO_SYMBOL_DEFINITION_MASK;
     }
 
     int definition = attrs & LTO_SYMBOL_DEFINITION_MASK;
-    sym.comdat_key = NULL;
+    sym.comdat_key = nullptr;
     switch (definition) {
       case LTO_SYMBOL_DEFINITION_REGULAR:
         sym.def = LDPK_DEF;
     switch (definition) {
       case LTO_SYMBOL_DEFINITION_REGULAR:
         sym.def = LDPK_DEF;