[lld] 5e11773 - [wasm] Use nullptr instead of NULL (NFC)

Kazu Hirata via llvm-commits llvm-commits at lists.llvm.org
Sun Jan 2 10:20:55 PST 2022


Author: Kazu Hirata
Date: 2022-01-02T10:20:21-08:00
New Revision: 5e1177302bd33d2ef2a5361734afc001ced47926

URL: https://github.com/llvm/llvm-project/commit/5e1177302bd33d2ef2a5361734afc001ced47926
DIFF: https://github.com/llvm/llvm-project/commit/5e1177302bd33d2ef2a5361734afc001ced47926.diff

LOG: [wasm] Use nullptr instead of NULL (NFC)

Identified with modernize-use-nullptr.

Added: 
    

Modified: 
    lld/wasm/Symbols.cpp
    lld/wasm/Writer.cpp

Removed: 
    


################################################################################
diff  --git a/lld/wasm/Symbols.cpp b/lld/wasm/Symbols.cpp
index 684f4832b2678..08f532deea0be 100644
--- a/lld/wasm/Symbols.cpp
+++ b/lld/wasm/Symbols.cpp
@@ -154,7 +154,7 @@ bool Symbol::isLive() const {
 void Symbol::markLive() {
   assert(!isDiscarded());
   referenced = true;
-  if (file != NULL && isDefined())
+  if (file != nullptr && isDefined())
     file->markLive();
   if (auto *g = dyn_cast<DefinedGlobal>(this))
     g->global->live = true;

diff  --git a/lld/wasm/Writer.cpp b/lld/wasm/Writer.cpp
index 91e90ae5103a3..f1ebe54ca60da 100644
--- a/lld/wasm/Writer.cpp
+++ b/lld/wasm/Writer.cpp
@@ -728,7 +728,7 @@ void Writer::createCommandExportWrappers() {
 
   // If there are no ctors and there's no libc `__wasm_call_dtors` to
   // call, don't wrap the exports.
-  if (initFunctions.empty() && WasmSym::callDtors == NULL)
+  if (initFunctions.empty() && WasmSym::callDtors == nullptr)
     return;
 
   std::vector<DefinedFunction *> toWrap;


        


More information about the llvm-commits mailing list