summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/ShadowStackGC.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/ShadowStackGC.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/ShadowStackGC.cpp')
-rw-r--r--llvm/lib/CodeGen/ShadowStackGC.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/ShadowStackGC.cpp b/llvm/lib/CodeGen/ShadowStackGC.cpp
index f7c64dac612..0be00f0e7ce 100644
--- a/llvm/lib/CodeGen/ShadowStackGC.cpp
+++ b/llvm/lib/CodeGen/ShadowStackGC.cpp
@@ -144,7 +144,7 @@ namespace {
LLVMContext &C = F.getContext();
BasicBlock *CleanupBB = BasicBlock::Create(C, CleanupBBName, &F);
Type *ExnTy = StructType::get(Type::getInt8PtrTy(C),
- Type::getInt32Ty(C), NULL);
+ Type::getInt32Ty(C), nullptr);
Constant *PersFn =
F.getParent()->
getOrInsertFunction("__gcc_personality_v0",
OpenPOWER on IntegriCloud