aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Remarks
diff options
context:
space:
mode:
authorKazu Hirata <kazu@google.com>2021-12-28 08:52:25 -0800
committerKazu Hirata <kazu@google.com>2021-12-28 08:52:25 -0800
commit5a667c0e741e5a895161b7a14376c59632fc5aa1 (patch)
tree7cacf2d7a14de92cac11fc5ed5eec79bf14e3c6e /llvm/lib/Remarks
parent9d297c7894ecae3d0ab18b6dac4c2df0bc489951 (diff)
downloadllvm-5a667c0e741e5a895161b7a14376c59632fc5aa1.zip
llvm-5a667c0e741e5a895161b7a14376c59632fc5aa1.tar.gz
llvm-5a667c0e741e5a895161b7a14376c59632fc5aa1.tar.bz2
[llvm] Use nullptr instead of 0 (NFC)
Identified with modernize-use-nullptr.
Diffstat (limited to 'llvm/lib/Remarks')
-rw-r--r--llvm/lib/Remarks/Remark.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/Remarks/Remark.cpp b/llvm/lib/Remarks/Remark.cpp
index 057d1a3..e6b7de1 100644
--- a/llvm/lib/Remarks/Remark.cpp
+++ b/llvm/lib/Remarks/Remark.cpp
@@ -111,7 +111,7 @@ LLVMRemarkEntryGetFirstArg(LLVMRemarkEntryRef Remark) {
ArrayRef<Argument> Args = unwrap(Remark)->Args;
// No arguments to iterate on.
if (Args.empty())
- return NULL;
+ return nullptr;
return reinterpret_cast<LLVMRemarkArgRef>(
const_cast<Argument *>(Args.begin()));
}
@@ -119,13 +119,13 @@ LLVMRemarkEntryGetFirstArg(LLVMRemarkEntryRef Remark) {
extern "C" LLVMRemarkArgRef
LLVMRemarkEntryGetNextArg(LLVMRemarkArgRef ArgIt, LLVMRemarkEntryRef Remark) {
// No more arguments to iterate on.
- if (ArgIt == NULL)
- return NULL;
+ if (ArgIt == nullptr)
+ return nullptr;
auto It = (ArrayRef<Argument>::const_iterator)ArgIt;
auto Next = std::next(It);
if (Next == unwrap(Remark)->Args.end())
- return NULL;
+ return nullptr;
return reinterpret_cast<LLVMRemarkArgRef>(const_cast<Argument *>(Next));
}