[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@206243 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Craig Topper
2014-04-15 04:59:12 +00:00
parent a8ae0ad11f
commit 570e52c6f1
59 changed files with 574 additions and 563 deletions

View File

@ -234,7 +234,7 @@ namespace {
struct NoTTI final : ImmutablePass, TargetTransformInfo {
const DataLayout *DL;
NoTTI() : ImmutablePass(ID), DL(0) {
NoTTI() : ImmutablePass(ID), DL(nullptr) {
initializeNoTTIPass(*PassRegistry::getPassRegistry());
}
@ -242,9 +242,9 @@ struct NoTTI final : ImmutablePass, TargetTransformInfo {
// Note that this subclass is special, and must *not* call initializeTTI as
// it does not chain.
TopTTI = this;
PrevTTI = 0;
PrevTTI = nullptr;
DataLayoutPass *DLP = getAnalysisIfAvailable<DataLayoutPass>();
DL = DLP ? &DLP->getDataLayout() : 0;
DL = DLP ? &DLP->getDataLayout() : nullptr;
}
virtual void getAnalysisUsage(AnalysisUsage &AU) const override {
@ -443,7 +443,7 @@ struct NoTTI final : ImmutablePass, TargetTransformInfo {
// Otherwise delegate to the fully generic implementations.
return getOperationCost(Operator::getOpcode(U), U->getType(),
U->getNumOperands() == 1 ?
U->getOperand(0)->getType() : 0);
U->getOperand(0)->getType() : nullptr);
}
bool hasBranchDivergence() const override { return false; }
@ -567,7 +567,7 @@ struct NoTTI final : ImmutablePass, TargetTransformInfo {
}
unsigned getShuffleCost(ShuffleKind Kind, Type *Ty,
int Index = 0, Type *SubTp = 0) const override {
int Index = 0, Type *SubTp = nullptr) const override {
return 1;
}
@ -581,7 +581,7 @@ struct NoTTI final : ImmutablePass, TargetTransformInfo {
}
unsigned getCmpSelInstrCost(unsigned Opcode, Type *ValTy,
Type *CondTy = 0) const override {
Type *CondTy = nullptr) const override {
return 1;
}