[llvm] 780f8a0 - [OpenMP] Use nullptr instead of NULL (NFC)

Kazu Hirata via llvm-commits llvm-commits at lists.llvm.org
Sun Jan 30 12:33:20 PST 2022


Author: Kazu Hirata
Date: 2022-01-30T12:32:59-08:00
New Revision: 780f8a0051f3fe8dfd7557a2dd28f4bd76936df6

URL: https://github.com/llvm/llvm-project/commit/780f8a0051f3fe8dfd7557a2dd28f4bd76936df6
DIFF: https://github.com/llvm/llvm-project/commit/780f8a0051f3fe8dfd7557a2dd28f4bd76936df6.diff

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

Identified with modernize-use-nullptr.

Added: 
    

Modified: 
    llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp b/llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
index 96e8b10b0a7ed..99001269e1f8c 100644
--- a/llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
+++ b/llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
@@ -2877,7 +2877,7 @@ CallInst *OpenMPIRBuilder::createOMPInteropInit(
   Constant *SrcLocStr = getOrCreateSrcLocStr(Loc, SrcLocStrSize);
   Value *Ident = getOrCreateIdent(SrcLocStr, SrcLocStrSize);
   Value *ThreadId = getOrCreateThreadID(Ident);
-  if (Device == NULL)
+  if (Device == nullptr)
     Device = ConstantInt::get(Int32, -1);
   Constant *InteropTypeVal = ConstantInt::get(Int64, (int)InteropType);
   if (NumDependences == nullptr) {
@@ -2905,7 +2905,7 @@ CallInst *OpenMPIRBuilder::createOMPInteropDestroy(
   Constant *SrcLocStr = getOrCreateSrcLocStr(Loc, SrcLocStrSize);
   Value *Ident = getOrCreateIdent(SrcLocStr, SrcLocStrSize);
   Value *ThreadId = getOrCreateThreadID(Ident);
-  if (Device == NULL)
+  if (Device == nullptr)
     Device = ConstantInt::get(Int32, -1);
   if (NumDependences == nullptr) {
     NumDependences = ConstantInt::get(Int32, 0);
@@ -2933,7 +2933,7 @@ CallInst *OpenMPIRBuilder::createOMPInteropUse(const LocationDescription &Loc,
   Constant *SrcLocStr = getOrCreateSrcLocStr(Loc, SrcLocStrSize);
   Value *Ident = getOrCreateIdent(SrcLocStr, SrcLocStrSize);
   Value *ThreadId = getOrCreateThreadID(Ident);
-  if (Device == NULL)
+  if (Device == nullptr)
     Device = ConstantInt::get(Int32, -1);
   if (NumDependences == nullptr) {
     NumDependences = ConstantInt::get(Int32, 0);


        


More information about the llvm-commits mailing list