Skip to content

Commit cd15d12

Browse files
authored
[MC][profgen][NFC] Expand auto for MCDecodedPseudoProbe
Expand autos in select places in preparation to #102789. Reviewers: dcci, maksfb, WenleiHe, rafaelauler, ayermolo, wlei-llvm Reviewed By: WenleiHe, wlei-llvm Pull Request: #102788
1 parent 242f4e8 commit cd15d12

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

llvm/lib/MC/MCPseudoProbe.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -559,7 +559,7 @@ void MCPseudoProbeDecoder::printProbeForAddress(raw_ostream &OS,
559559
uint64_t Address) {
560560
auto It = Address2ProbesMap.find(Address);
561561
if (It != Address2ProbesMap.end()) {
562-
for (auto &Probe : It->second) {
562+
for (const MCDecodedPseudoProbe &Probe : It->second) {
563563
OS << " [Probe]:\t";
564564
Probe.print(OS, GUID2FuncDescMap, true);
565565
}
@@ -586,7 +586,7 @@ MCPseudoProbeDecoder::getCallProbeForAddr(uint64_t Address) const {
586586
const auto &Probes = It->second;
587587

588588
const MCDecodedPseudoProbe *CallProbe = nullptr;
589-
for (const auto &Probe : Probes) {
589+
for (const MCDecodedPseudoProbe &Probe : Probes) {
590590
if (Probe.isCall()) {
591591
// Disabling the assert and returning first call probe seen so far.
592592
// Subsequent call probes, if any, are ignored. Due to the the way

llvm/tools/llvm-profgen/ProfileGenerator.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1185,7 +1185,7 @@ void ProfileGeneratorBase::extractProbesFromRange(
11851185
Binary->getAddress2ProbesMap();
11861186
auto It = Address2ProbesMap.find(IP.Address);
11871187
if (It != Address2ProbesMap.end()) {
1188-
for (const auto &Probe : It->second) {
1188+
for (const MCDecodedPseudoProbe &Probe : It->second) {
11891189
ProbeCounter[&Probe] += Count;
11901190
}
11911191
}

0 commit comments

Comments
 (0)