summaryrefslogtreecommitdiffstats
path: root/polly/lib/CodeGen/LoopGenerators.cpp
diff options
context:
space:
mode:
authorTobias Grosser <tobias@grosser.es>2016-06-22 16:22:00 +0000
committerTobias Grosser <tobias@grosser.es>2016-06-22 16:22:00 +0000
commit8dd653d983d75b1469322c0ba8e753d9863aa0dc (patch)
tree9520e7439e73db045ec27699a8e9403a98306e7b /polly/lib/CodeGen/LoopGenerators.cpp
parent9565cf581e35f5e73930ab48493943bffe4941a1 (diff)
downloadbcm5719-llvm-8dd653d983d75b1469322c0ba8e753d9863aa0dc.tar.gz
bcm5719-llvm-8dd653d983d75b1469322c0ba8e753d9863aa0dc.zip
clang-tidy: apply modern-use-nullptr fixes
Instead of using 0 or NULL use the C++11 nullptr symbol when referencing null pointers. This cleanup was suggested by Eugene Zelenko <eugene.zelenko@gmail.com> in http://reviews.llvm.org/D21488 and was split out to increase readability. llvm-svn: 273435
Diffstat (limited to 'polly/lib/CodeGen/LoopGenerators.cpp')
-rw-r--r--polly/lib/CodeGen/LoopGenerators.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/polly/lib/CodeGen/LoopGenerators.cpp b/polly/lib/CodeGen/LoopGenerators.cpp
index 566e460b326..149cf2cef73 100644
--- a/polly/lib/CodeGen/LoopGenerators.cpp
+++ b/polly/lib/CodeGen/LoopGenerators.cpp
@@ -289,7 +289,7 @@ ParallelLoopGenerator::storeValuesIntoStruct(SetVector<Value *> &Values) {
BasicBlock &EntryBB = Builder.GetInsertBlock()->getParent()->getEntryBlock();
Instruction *IP = &*EntryBB.getFirstInsertionPt();
StructType *Ty = StructType::get(Builder.getContext(), Members);
- AllocaInst *Struct = new AllocaInst(Ty, 0, "polly.par.userContext", IP);
+ AllocaInst *Struct = new AllocaInst(Ty, nullptr, "polly.par.userContext", IP);
// Mark the start of the lifetime for the parameter struct.
ConstantInt *SizeOf = Builder.getInt64(DL.getTypeAllocSize(Ty));
@@ -338,8 +338,8 @@ Value *ParallelLoopGenerator::createSubFn(Value *Stride, AllocaInst *StructData,
// Fill up basic block HeaderBB.
Builder.SetInsertPoint(HeaderBB);
- LBPtr = Builder.CreateAlloca(LongType, 0, "polly.par.LBPtr");
- UBPtr = Builder.CreateAlloca(LongType, 0, "polly.par.UBPtr");
+ LBPtr = Builder.CreateAlloca(LongType, nullptr, "polly.par.LBPtr");
+ UBPtr = Builder.CreateAlloca(LongType, nullptr, "polly.par.UBPtr");
UserContext = Builder.CreateBitCast(
&*SubFn->arg_begin(), StructData->getType(), "polly.par.userContext");
OpenPOWER on IntegriCloud