[llvm] [llvm] Use nullptr instead of 0 or NULL (NFC) (PR #165396)

Shilei Tian via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 28 07:34:35 PDT 2025


================
@@ -745,7 +745,7 @@ Register SPIRVGlobalRegistry::buildGlobalVariable(
                  .addDef(ResVReg)
                  .addUse(getSPIRVTypeID(BaseType))
                  .addImm(static_cast<uint32_t>(Storage));
-  if (Init != 0)
+  if (Init != nullptr)
----------------
shiltian wrote:

and `if (Init)` here

https://github.com/llvm/llvm-project/pull/165396


More information about the llvm-commits mailing list