diff options
author | Fangrui Song <maskray@google.com> | 2019-05-07 02:06:37 +0000 |
---|---|---|
committer | Fangrui Song <maskray@google.com> | 2019-05-07 02:06:37 +0000 |
commit | da82ce99b7460164ffb841619aadb44f397d2106 (patch) | |
tree | 6eeb15bafc58fe997fd3b0666fb47331e9287746 /llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp | |
parent | a400ca3f3d42de0b0aa5c441de761d182c6010e8 (diff) | |
download | llvm-da82ce99b7460164ffb841619aadb44f397d2106.zip llvm-da82ce99b7460164ffb841619aadb44f397d2106.tar.gz llvm-da82ce99b7460164ffb841619aadb44f397d2106.tar.bz2 |
[DebugInfo] Delete TypedDINodeRef
TypedDINodeRef<T> is a redundant wrapper of Metadata * that is actually a T *.
Accordingly, change DI{Node,Scope,Type}Ref uses to DI{Node,Scope,Type} * or their const variants.
This allows us to delete many resolve() calls that clutter the code.
Reviewed By: rnk
Differential Revision: https://reviews.llvm.org/D61369
llvm-svn: 360108
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp')
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp index c3dad62..a6b6fbf 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp @@ -196,11 +196,11 @@ bool DebugLocDwarfExpression::isFrameRegister(const TargetRegisterInfo &TRI, bool DbgVariable::isBlockByrefVariable() const { assert(getVariable() && "Invalid complex DbgVariable!"); - return getVariable()->getType().resolve()->isBlockByrefStruct(); + return getVariable()->getType()->isBlockByrefStruct(); } const DIType *DbgVariable::getType() const { - DIType *Ty = getVariable()->getType().resolve(); + DIType *Ty = getVariable()->getType(); // FIXME: isBlockByrefVariable should be reformulated in terms of complex // addresses instead. if (Ty->isBlockByrefStruct()) { @@ -232,13 +232,13 @@ const DIType *DbgVariable::getType() const { uint16_t tag = Ty->getTag(); if (tag == dwarf::DW_TAG_pointer_type) - subType = resolve(cast<DIDerivedType>(Ty)->getBaseType()); + subType = cast<DIDerivedType>(Ty)->getBaseType(); auto Elements = cast<DICompositeType>(subType)->getElements(); for (unsigned i = 0, N = Elements.size(); i < N; ++i) { auto *DT = cast<DIDerivedType>(Elements[i]); if (getName() == DT->getName()) - return resolve(DT->getBaseType()); + return DT->getBaseType(); } } return Ty; |