diff options
author | Craig Topper <craig.topper@gmail.com> | 2014-04-25 04:24:47 +0000 |
---|---|---|
committer | Craig Topper <craig.topper@gmail.com> | 2014-04-25 04:24:47 +0000 |
commit | e6cb63e471c56fa7e90916ec81da76a2604e388f (patch) | |
tree | d28cb6c8432d2e14d395d098272faa726a0cd01b /llvm/tools/llvm-readobj/COFFDumper.cpp | |
parent | 409ac186bb7724c93d76db93b17ad6b1fdeea234 (diff) | |
download | bcm5719-llvm-e6cb63e471c56fa7e90916ec81da76a2604e388f.tar.gz bcm5719-llvm-e6cb63e471c56fa7e90916ec81da76a2604e388f.zip |
[C++] Use 'nullptr'. Tools edition.
llvm-svn: 207176
Diffstat (limited to 'llvm/tools/llvm-readobj/COFFDumper.cpp')
-rw-r--r-- | llvm/tools/llvm-readobj/COFFDumper.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/llvm/tools/llvm-readobj/COFFDumper.cpp b/llvm/tools/llvm-readobj/COFFDumper.cpp index 48edf78a3d5..b53520daefb 100644 --- a/llvm/tools/llvm-readobj/COFFDumper.cpp +++ b/llvm/tools/llvm-readobj/COFFDumper.cpp @@ -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; |