run 'git clang format'

This commit is contained in:
mingmingl 2025-07-10 10:22:09 -07:00
parent a55b23be68
commit 0b18c2dd48
3 changed files with 7 additions and 7 deletions

View File

@ -309,7 +309,7 @@ struct LineLocation {
}
uint64_t getHashCode() const {
return ((uint64_t) Discriminator << 32) | LineOffset;
return ((uint64_t)Discriminator << 32) | LineOffset;
}
uint32_t LineOffset;

View File

@ -229,7 +229,7 @@ void FunctionSamples::print(raw_ostream &OS, unsigned Indent) const {
if (const TypeCountMap *TypeCountMap =
this->findCallsiteTypeSamplesAt(Loc)) {
OS.indent(Indent + 2);
printTypeCountMap(OS, Loc, *TypeCountMap);
printTypeCountMap(OS, Loc, *TypeCountMap);
}
}
OS.indent(Indent);
@ -241,7 +241,7 @@ void FunctionSamples::print(raw_ostream &OS, unsigned Indent) const {
OS.indent(Indent);
if (!CallsiteSamples.empty()) {
OS << "Samples collected in inlined callsites {\n";
SampleSorter<LineLocation, FunctionSamplesMap> SortedCallsiteSamples(
SampleSorter<LineLocation, FunctionSamplesMap> SortedCallsiteSamples(
CallsiteSamples);
for (const auto *Element : SortedCallsiteSamples.get()) {
// Element is a pointer to a pair of LineLocation and FunctionSamplesMap.
@ -249,8 +249,7 @@ void FunctionSamples::print(raw_ostream &OS, unsigned Indent) const {
for (const FunctionSamples &FuncSample :
llvm::make_second_range(FunctionSampleMap)) {
OS.indent(Indent + 2);
OS << Loc << ": inlined callee: " << FuncSample.getFunction()
<< ": ";
OS << Loc << ": inlined callee: " << FuncSample.getFunction() << ": ";
FuncSample.print(OS, Indent + 4);
}
auto TypeSamplesIter = VirtualCallsiteTypeCounts.find(Loc);

View File

@ -619,10 +619,11 @@ std::error_code SampleProfileWriterText::writeSample(const FunctionSamples &S) {
SampleSorter<LineLocation, FunctionSamplesMap> SortedCallsiteSamples(
S.getCallsiteSamples());
Indent += 1;
for (const auto* Element : SortedCallsiteSamples.get()) {
for (const auto *Element : SortedCallsiteSamples.get()) {
// Element is a pointer to a pair of LineLocation and FunctionSamplesMap.
const auto &[Loc, FunctionSamplesMap] = *Element;
for (const FunctionSamples &CalleeSamples : make_second_range(FunctionSamplesMap)) {
for (const FunctionSamples &CalleeSamples :
make_second_range(FunctionSamplesMap)) {
OS.indent(Indent);
Loc.print(OS);
OS << ": ";