[C++] Use 'nullptr'. Tools edition.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207176 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Craig Topper
2014-04-25 04:24:47 +00:00
parent ac16f0e024
commit 573faecacf
36 changed files with 179 additions and 177 deletions

View File

@ -534,7 +534,7 @@ void COFFDumper::printDataDirectory(uint32_t Index, const std::string &FieldName
void COFFDumper::printFileHeaders() {
// Print COFF header
const coff_file_header *COFFHeader = 0;
const coff_file_header *COFFHeader = nullptr;
if (error(Obj->getCOFFHeader(COFFHeader)))
return;
@ -557,13 +557,13 @@ void COFFDumper::printFileHeaders() {
// Print PE header. This header does not exist if this is an object file and
// not an executable.
const pe32_header *PEHeader = 0;
const pe32_header *PEHeader = nullptr;
if (error(Obj->getPE32Header(PEHeader)))
return;
if (PEHeader)
printPEHeader<pe32_header>(PEHeader);
const pe32plus_header *PEPlusHeader = 0;
const pe32plus_header *PEPlusHeader = nullptr;
if (error(Obj->getPE32PlusHeader(PEPlusHeader)))
return;
if (PEPlusHeader)
@ -693,7 +693,7 @@ void COFFDumper::printCodeViewLineTables(const SectionRef &Section) {
break;
}
case COFF::DEBUG_STRING_TABLE_SUBSECTION:
if (PayloadSize == 0 || StringTable.data() != 0 ||
if (PayloadSize == 0 || StringTable.data() != nullptr ||
Contents.back() != '\0') {
// Empty or duplicate or non-null-terminated subsection.
error(object_error::parse_failed);
@ -705,7 +705,8 @@ void COFFDumper::printCodeViewLineTables(const SectionRef &Section) {
// Holds the translation table from file indices
// to offsets in the string table.
if (PayloadSize == 0 || FileIndexToStringOffsetTable.data() != 0) {
if (PayloadSize == 0 ||
FileIndexToStringOffsetTable.data() != nullptr) {
// Empty or duplicate subsection.
error(object_error::parse_failed);
return;
@ -1090,7 +1091,7 @@ void COFFDumper::printRuntimeFunction(
W.printString("UnwindInfoAddress",
formatSymbol(Rels, OffsetInSection + 8, RTF.UnwindInfoOffset));
const coff_section* XData = 0;
const coff_section* XData = nullptr;
uint64_t UnwindInfoOffset = 0;
if (error(getSection(Rels, OffsetInSection + 8, &XData, &UnwindInfoOffset)))
return;