mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-22 10:24:26 +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@206243 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user