summaryrefslogtreecommitdiffstats
path: root/llvm/lib/DebugInfo/DWARFDebugInfoEntry.cpp
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@gmail.com>2014-04-15 06:32:26 +0000
committerCraig Topper <craig.topper@gmail.com>2014-04-15 06:32:26 +0000
commit2617dccea2721fd74677f0a7bcf5a768238421d0 (patch)
treead5ee2efaff543d7da11f1599bdabb6588d1c1dd /llvm/lib/DebugInfo/DWARFDebugInfoEntry.cpp
parentd82d4cc3567e896fad35372adba9a676c7776cd0 (diff)
downloadbcm5719-llvm-2617dccea2721fd74677f0a7bcf5a768238421d0.tar.gz
bcm5719-llvm-2617dccea2721fd74677f0a7bcf5a768238421d0.zip
[C++11] More 'nullptr' conversion. In some cases just using a boolean check instead of comparing to nullptr.
llvm-svn: 206252
Diffstat (limited to 'llvm/lib/DebugInfo/DWARFDebugInfoEntry.cpp')
-rw-r--r--llvm/lib/DebugInfo/DWARFDebugInfoEntry.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/llvm/lib/DebugInfo/DWARFDebugInfoEntry.cpp b/llvm/lib/DebugInfo/DWARFDebugInfoEntry.cpp
index bde25ec82d1..3acdc8f8c52 100644
--- a/llvm/lib/DebugInfo/DWARFDebugInfoEntry.cpp
+++ b/llvm/lib/DebugInfo/DWARFDebugInfoEntry.cpp
@@ -99,11 +99,11 @@ bool DWARFDebugInfoEntryMinimal::extractFast(const DWARFUnit *U,
uint64_t AbbrCode = DebugInfoData.getULEB128(OffsetPtr);
if (0 == AbbrCode) {
// NULL debug tag entry.
- AbbrevDecl = NULL;
+ AbbrevDecl = nullptr;
return true;
}
AbbrevDecl = U->getAbbreviations()->getAbbreviationDeclaration(AbbrCode);
- if (0 == AbbrevDecl) {
+ if (nullptr == AbbrevDecl) {
// Restore the original offset.
*OffsetPtr = Offset;
return false;
@@ -266,14 +266,15 @@ bool DWARFDebugInfoEntryMinimal::addressRangeContainsAddress(
const char *
DWARFDebugInfoEntryMinimal::getSubroutineName(const DWARFUnit *U) const {
if (!isSubroutineDIE())
- return 0;
+ return nullptr;
// Try to get mangled name if possible.
if (const char *name =
- getAttributeValueAsString(U, DW_AT_MIPS_linkage_name, 0))
+ getAttributeValueAsString(U, DW_AT_MIPS_linkage_name, nullptr))
return name;
- if (const char *name = getAttributeValueAsString(U, DW_AT_linkage_name, 0))
+ if (const char *name = getAttributeValueAsString(U, DW_AT_linkage_name,
+ nullptr))
return name;
- if (const char *name = getAttributeValueAsString(U, DW_AT_name, 0))
+ if (const char *name = getAttributeValueAsString(U, DW_AT_name, nullptr))
return name;
// Try to get name from specification DIE.
uint32_t spec_ref =
@@ -295,7 +296,7 @@ DWARFDebugInfoEntryMinimal::getSubroutineName(const DWARFUnit *U) const {
return name;
}
}
- return 0;
+ return nullptr;
}
void DWARFDebugInfoEntryMinimal::getCallerFrame(const DWARFUnit *U,
OpenPOWER on IntegriCloud