From 780f8a0051f3fe8dfd7557a2dd28f4bd76936df6 Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Sun, 30 Jan 2022 12:32:59 -0800 Subject: [PATCH] [OpenMP] Use nullptr instead of NULL (NFC) Identified with modernize-use-nullptr. --- llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp b/llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp index 96e8b10b0a7e..99001269e1f8 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);