mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-15 05:24:01 +00:00
[C++11] More 'nullptr' conversion. In some cases just using a boolean check instead of comparing to nullptr.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206142 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -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);
|
||||
|
Reference in New Issue
Block a user