mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-26 12:20:42 +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@206254 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -152,7 +152,7 @@ FindUniqueOperandCommands(std::vector<std::string> &UniqueOperandCommands,
|
||||
|
||||
for (unsigned i = 0, e = NumberedInstructions->size(); i != e; ++i) {
|
||||
const AsmWriterInst *Inst = getAsmWriterInstByID(i);
|
||||
if (Inst == 0)
|
||||
if (!Inst)
|
||||
continue; // PHI, INLINEASM, CFI_INSTRUCTION, etc.
|
||||
|
||||
std::string Command;
|
||||
@@ -301,7 +301,7 @@ void AsmWriterEmitter::EmitPrintInstruction(raw_ostream &O) {
|
||||
// representation.
|
||||
for (unsigned i = 0, e = NumberedInstructions->size(); i != e; ++i) {
|
||||
AsmWriterInst *AWI = CGIAWIMap[NumberedInstructions->at(i)];
|
||||
if (AWI != 0 &&
|
||||
if (AWI &&
|
||||
AWI->Operands[0].OperandType ==
|
||||
AsmWriterOperand::isLiteralTextOperand &&
|
||||
!AWI->Operands[0].Str.empty()) {
|
||||
@@ -317,7 +317,7 @@ void AsmWriterEmitter::EmitPrintInstruction(raw_ostream &O) {
|
||||
for (unsigned i = 0, e = NumberedInstructions->size(); i != e; ++i) {
|
||||
AsmWriterInst *AWI = CGIAWIMap[NumberedInstructions->at(i)];
|
||||
unsigned Idx;
|
||||
if (AWI == 0) {
|
||||
if (!AWI) {
|
||||
// Something not handled by the asmwriter printer.
|
||||
Idx = ~0U;
|
||||
} else if (AWI->Operands[0].OperandType !=
|
||||
@@ -846,7 +846,7 @@ void AsmWriterEmitter::EmitPrintAliasInstruction(raw_ostream &O) {
|
||||
assert(Rec->isSubClassOf("Operand") && "Unexpected operand!");
|
||||
// FIXME: We may need to handle these situations.
|
||||
delete IAP;
|
||||
IAP = 0;
|
||||
IAP = nullptr;
|
||||
CantHandle = true;
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user