Skip to content

Commit 3005bf8

Browse files
committed
src: apply clang-format rules
1 parent ecfbdca commit 3005bf8

File tree

6 files changed

+25
-35
lines changed

6 files changed

+25
-35
lines changed

src/llnode.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@
1919

2020
namespace llnode {
2121

22-
using lldb::eReturnStatusFailed;
23-
using lldb::eReturnStatusSuccessFinishResult;
2422
using lldb::SBCommandInterpreter;
2523
using lldb::SBCommandReturnObject;
2624
using lldb::SBDebugger;
@@ -32,6 +30,8 @@ using lldb::SBSymbol;
3230
using lldb::SBTarget;
3331
using lldb::SBThread;
3432
using lldb::SBValue;
33+
using lldb::eReturnStatusFailed;
34+
using lldb::eReturnStatusSuccessFinishResult;
3535

3636

3737
bool BacktraceCmd::DoExecute(SBDebugger d, char** cmd,

src/llscan.cc

Lines changed: 16 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,15 @@
2323
namespace llnode {
2424

2525
using lldb::ByteOrder;
26-
using lldb::eReturnStatusFailed;
27-
using lldb::eReturnStatusSuccessFinishResult;
2826
using lldb::SBCommandReturnObject;
2927
using lldb::SBDebugger;
3028
using lldb::SBError;
3129
using lldb::SBExpressionOptions;
3230
using lldb::SBStream;
3331
using lldb::SBTarget;
3432
using lldb::SBValue;
33+
using lldb::eReturnStatusFailed;
34+
using lldb::eReturnStatusSuccessFinishResult;
3535

3636

3737
char** ParsePrinterOptions(char** cmd, Printer::PrinterOptions* options) {
@@ -635,38 +635,28 @@ void FindReferencesCmd::ScanForReferences(ObjectScanner* scanner) {
635635
}
636636

637637
void FindReferencesCmd::PrintRecursiveReferences(
638-
lldb::SBCommandReturnObject& result,
639-
ScanOptions* options,
640-
ReferencesVector* visited_references,
641-
uint64_t address,
642-
int level
643-
)
644-
{
638+
lldb::SBCommandReturnObject& result, ScanOptions* options,
639+
ReferencesVector* visited_references, uint64_t address, int level) {
645640
Settings* settings = Settings::GetSettings();
646641
unsigned int padding = settings->GetTreePadding();
647642

648643
std::string branch = std::string(padding * level, ' ') + "+ ";
649644

650645
result.Printf("%s", branch.c_str());
651646

652-
if (find(visited_references->begin(), visited_references->end(), address) != visited_references->end())
653-
{
647+
if (find(visited_references->begin(), visited_references->end(), address) !=
648+
visited_references->end()) {
654649
std::stringstream seen_str;
655-
seen_str << rang::fg::red << " [seen above]" << rang::fg::reset << std::endl;
650+
seen_str << rang::fg::red << " [seen above]" << rang::fg::reset
651+
<< std::endl;
656652
result.Printf(seen_str.str().c_str());
657653
} else {
658654
visited_references->push_back(address);
659655
v8::Value value(llscan_->v8(), address);
660656
ReferenceScanner scanner_(llscan_, value);
661657
ReferencesVector* references_ = scanner_.GetReferences();
662-
PrintReferences(
663-
result,
664-
references_,
665-
&scanner_,
666-
options,
667-
visited_references,
668-
level + 1
669-
);
658+
PrintReferences(result, references_, &scanner_, options, visited_references,
659+
level + 1);
670660
}
671661
}
672662

@@ -696,15 +686,17 @@ void FindReferencesCmd::PrintReferences(
696686
scanner->PrintRefs(result, js_obj, err, level);
697687

698688
if (options->recursive_scan) {
699-
PrintRecursiveReferences(result, options, already_visited_references, addr, level);
689+
PrintRecursiveReferences(result, options, already_visited_references,
690+
addr, level);
700691
}
701692

702693
} else if (type < v8->types()->kFirstNonstringType) {
703694
v8::String str(heap_object);
704695
scanner->PrintRefs(result, str, err, level);
705696

706697
if (options->recursive_scan) {
707-
PrintRecursiveReferences(result, options, already_visited_references, addr, level);
698+
PrintRecursiveReferences(result, options, already_visited_references,
699+
addr, level);
708700
}
709701

710702
} else if (type == v8->types()->kJSTypedArrayType) {
@@ -820,7 +812,8 @@ void FindReferencesCmd::ReferenceScanner::PrintContextRefs(
820812
search_value_.raw());
821813

822814
if (options->recursive_scan) {
823-
cli_cmd_->PrintRecursiveReferences(result, options, already_visited_references, c.raw(), level);
815+
cli_cmd_->PrintRecursiveReferences(
816+
result, options, already_visited_references, c.raw(), level);
824817
}
825818
}
826819
}

src/llscan.h

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -132,13 +132,10 @@ class FindReferencesCmd : public CommandBase {
132132

133133
void ScanForReferences(ObjectScanner* scanner);
134134

135-
void PrintRecursiveReferences(
136-
lldb::SBCommandReturnObject& result,
137-
ScanOptions* options,
138-
ReferencesVector* visited_references,
139-
uint64_t address,
140-
int level
141-
);
135+
void PrintRecursiveReferences(lldb::SBCommandReturnObject& result,
136+
ScanOptions* options,
137+
ReferencesVector* visited_references,
138+
uint64_t address, int level);
142139

143140
class ReferenceScanner : public ObjectScanner {
144141
public:

src/llv8-constants.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@ namespace llnode {
1313
namespace v8 {
1414
namespace constants {
1515

16-
using lldb::addr_t;
1716
using lldb::SBAddress;
1817
using lldb::SBError;
1918
using lldb::SBProcess;
2019
using lldb::SBSymbol;
2120
using lldb::SBSymbolContext;
2221
using lldb::SBSymbolContextList;
2322
using lldb::SBTarget;
23+
using lldb::addr_t;
2424

2525
void Module::Assign(SBTarget target, Common* common) {
2626
loaded_ = false;

src/llv8.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@
1515
namespace llnode {
1616
namespace v8 {
1717

18-
using lldb::addr_t;
1918
using lldb::SBError;
2019
using lldb::SBTarget;
20+
using lldb::addr_t;
2121

2222
static std::string kConstantPrefix = "v8dbg_";
2323

src/printer.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#include <cinttypes>
2-
#include <sstream>
32
#include <iostream>
3+
#include <sstream>
44

55
#include "deps/rang/include/rang.hpp"
66
#include "src/llv8-inl.h"

0 commit comments

Comments
 (0)