summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SjLjEHPrepare.cpp
diff options
context:
space:
mode:
authorReid Kleckner <reid@kleckner.net>2014-11-13 22:55:19 +0000
committerReid Kleckner <reid@kleckner.net>2014-11-13 22:55:19 +0000
commit971c3ea67b7ba140a5d7634111fd1063d86d2cdd (patch)
tree8848ac3f29b9828ac25ca2b3128764362f430a13 /llvm/lib/CodeGen/SjLjEHPrepare.cpp
parent8716b58583cf5e753f2dc2cfb214cdf24a839c43 (diff)
downloadbcm5719-llvm-971c3ea67b7ba140a5d7634111fd1063d86d2cdd.tar.gz
bcm5719-llvm-971c3ea67b7ba140a5d7634111fd1063d86d2cdd.zip
Use nullptr instead of NULL for variadic sentinels
Windows defines NULL to 0, which when used as an argument to a variadic function, is not a null pointer constant. As a result, Clang's -Wsentinel fires on this code. Using '0' would be wrong on most 64-bit platforms, but both MSVC and Clang make it work on Windows. Sidestep the issue with nullptr. llvm-svn: 221940
Diffstat (limited to 'llvm/lib/CodeGen/SjLjEHPrepare.cpp')
-rw-r--r--llvm/lib/CodeGen/SjLjEHPrepare.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/SjLjEHPrepare.cpp b/llvm/lib/CodeGen/SjLjEHPrepare.cpp
index 396fa5239da..df6ba0b723a 100644
--- a/llvm/lib/CodeGen/SjLjEHPrepare.cpp
+++ b/llvm/lib/CodeGen/SjLjEHPrepare.cpp
@@ -99,7 +99,7 @@ bool SjLjEHPrepare::doInitialization(Module &M) {
VoidPtrTy, // __personality
VoidPtrTy, // __lsda
ArrayType::get(VoidPtrTy, 5), // __jbuf
- NULL);
+ nullptr);
RegisterFn = M.getOrInsertFunction(
"_Unwind_SjLj_Register", Type::getVoidTy(M.getContext()),
PointerType::getUnqual(FunctionContextTy), (Type *)nullptr);
OpenPOWER on IntegriCloud