From db26488bf9263f62ec9938d7e6ea3acf8cae6725 Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Mon, 5 Aug 2019 06:33:52 +0000 Subject: [DWARF] Change DWARFDebugLoc::Entry::Loc from SmallVector to SmallString<4> SmallString has a conversion to StringRef, which can be leveraged to simplify two use sites. llvm-svn: 367801 --- llvm/lib/DebugInfo/DWARF/DWARFVerifier.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'llvm/lib/DebugInfo') diff --git a/llvm/lib/DebugInfo/DWARF/DWARFVerifier.cpp b/llvm/lib/DebugInfo/DWARF/DWARFVerifier.cpp index bc36d32ef19..4fc9d841d65 100644 --- a/llvm/lib/DebugInfo/DWARF/DWARFVerifier.cpp +++ b/llvm/lib/DebugInfo/DWARF/DWARFVerifier.cpp @@ -485,7 +485,7 @@ unsigned DWARFVerifier::verifyDebugInfoAttribute(const DWARFDie &Die, if (auto DebugLoc = DCtx.getDebugLoc()) if (auto LocList = DebugLoc->getLocationListAtOffset(*LocOffset)) for (const auto &Entry : LocList->Entries) - VerifyLocationExpr({Entry.Loc.data(), Entry.Loc.size()}); + VerifyLocationExpr(Entry.Loc); } break; } @@ -1297,7 +1297,7 @@ static bool isVariableIndexable(const DWARFDie &Die, DWARFContext &DCtx) { if (const DWARFDebugLoc::LocationList *LocList = DebugLoc->getLocationListAtOffset(*Offset)) { if (any_of(LocList->Entries, [&](const DWARFDebugLoc::Entry &E) { - return ContainsInterestingOperators({E.Loc.data(), E.Loc.size()}); + return ContainsInterestingOperators(E.Loc); })) return true; } -- cgit v1.2.3