Skip to content

Commit ceee148

Browse files
committed
More LLVM idiomatic changes. Attempted to fix linux build
1 parent 5d0f679 commit ceee148

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

llvm/lib/DebugInfo/LogicalView/Core/LVReader.cpp

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -555,10 +555,9 @@ struct DebuggerViewPrinter {
555555
if (SymbolLocations.empty())
556556
continue;
557557

558-
if (IncludeRanges) {
558+
if (IncludeRanges)
559559
OS << "{Range}: " << Symbol->getName() << " (line "
560560
<< Symbol->getLineNumber() << ")" << ": ";
561-
}
562561

563562
for (const LVLocation *Loc : SymbolLocations) {
564563
if (Loc->getIsGapEntry())
@@ -569,9 +568,8 @@ struct DebuggerViewPrinter {
569568
LifetimeBegins[Begin].push_back(Loc);
570569
LifetimeEndsExclusive[End].push_back(Loc);
571570

572-
if (IncludeRanges) {
571+
if (IncludeRanges)
573572
OS << "[" << hexValue(Begin) << ":" << hexValue(End) << "] ";
574-
}
575573
}
576574

577575
if (IncludeRanges)
@@ -674,12 +672,11 @@ struct DebuggerViewPrinter {
674672

675673
Error LVReader::printDebugger() {
676674
auto *CU = getCompileUnit();
677-
if (!CU) {
675+
if (!CU)
678676
return createStringError(std::make_error_code(std::errc::invalid_argument),
679677
"Error: No compute unit found.");
680-
}
681678

682-
for (LVElement *Child : *CU->getChildren()) {
679+
for (const LVElement *Child : *CU->getChildren()) {
683680
auto *Fn = dyn_cast<LVScopeFunction>(Child);
684681
if (Fn) {
685682
const LVLines *Lines = Fn->getLines();

0 commit comments

Comments
 (0)