summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/ShadowStackGC.cpp
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@gmail.com>2014-04-14 00:51:57 +0000
committerCraig Topper <craig.topper@gmail.com>2014-04-14 00:51:57 +0000
commitc0196b1b4094aeb27fd91466e0c4c1185a492daa (patch)
tree3a3d0ad3aebec28bee34ab7808fee8e75e567eb8 /llvm/lib/CodeGen/ShadowStackGC.cpp
parent0192cbac6669fb9fff8cf9a75d53757a494af9ca (diff)
downloadbcm5719-llvm-c0196b1b4094aeb27fd91466e0c4c1185a492daa.tar.gz
bcm5719-llvm-c0196b1b4094aeb27fd91466e0c4c1185a492daa.zip
[C++11] More 'nullptr' conversion. In some cases just using a boolean check instead of comparing to nullptr.
llvm-svn: 206142
Diffstat (limited to 'llvm/lib/CodeGen/ShadowStackGC.cpp')
-rw-r--r--llvm/lib/CodeGen/ShadowStackGC.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/llvm/lib/CodeGen/ShadowStackGC.cpp b/llvm/lib/CodeGen/ShadowStackGC.cpp
index adb3ef91634..628856e3994 100644
--- a/llvm/lib/CodeGen/ShadowStackGC.cpp
+++ b/llvm/lib/CodeGen/ShadowStackGC.cpp
@@ -101,7 +101,7 @@ namespace {
IRBuilder<> *Next() {
switch (State) {
default:
- return 0;
+ return nullptr;
case 0:
StateBB = F.begin();
@@ -137,7 +137,7 @@ namespace {
Calls.push_back(CI);
if (Calls.empty())
- return 0;
+ return nullptr;
// Create a cleanup block.
LLVMContext &C = F.getContext();
@@ -194,7 +194,7 @@ namespace {
void llvm::linkShadowStackGC() { }
-ShadowStackGC::ShadowStackGC() : Head(0), StackEntryTy(0) {
+ShadowStackGC::ShadowStackGC() : Head(nullptr), StackEntryTy(nullptr) {
InitRoots = true;
CustomRoots = true;
}
@@ -390,8 +390,8 @@ bool ShadowStackGC::performCustomLowering(Function &F) {
BasicBlock::iterator IP = F.getEntryBlock().begin();
IRBuilder<> AtEntry(IP->getParent(), IP);
- Instruction *StackEntry = AtEntry.CreateAlloca(ConcreteStackEntryTy, 0,
- "gc_frame");
+ Instruction *StackEntry = AtEntry.CreateAlloca(ConcreteStackEntryTy, nullptr,
+ "gc_frame");
while (isa<AllocaInst>(IP)) ++IP;
AtEntry.SetInsertPoint(IP->getParent(), IP);
OpenPOWER on IntegriCloud