Skip to content

Commit 9746055

Browse files
committed
[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 cddea6a commit 9746055

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
@@ -652,7 +652,7 @@ void MCPseudoProbeDecoder::printProbeForAddress(raw_ostream &OS,
652652
uint64_t Address) {
653653
auto It = Address2ProbesMap.find(Address);
654654
if (It != Address2ProbesMap.end()) {
655-
for (auto &Probe : It->second) {
655+
for (const MCDecodedPseudoProbe &Probe : It->second) {
656656
OS << " [Probe]:\t";
657657
Probe.print(OS, GUID2FuncDescMap, true);
658658
}
@@ -679,7 +679,7 @@ MCPseudoProbeDecoder::getCallProbeForAddr(uint64_t Address) const {
679679
const auto &Probes = It->second;
680680

681681
const MCDecodedPseudoProbe *CallProbe = nullptr;
682-
for (const auto &Probe : Probes) {
682+
for (const MCDecodedPseudoProbe &Probe : Probes) {
683683
if (Probe.isCall()) {
684684
// Disabling the assert and returning first call probe seen so far.
685685
// 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
@@ -1194,7 +1194,7 @@ void ProfileGeneratorBase::extractProbesFromRange(
11941194
Binary->getAddress2ProbesMap();
11951195
auto It = Address2ProbesMap.find(IP.Address);
11961196
if (It != Address2ProbesMap.end()) {
1197-
for (const auto &Probe : It->second) {
1197+
for (const MCDecodedPseudoProbe &Probe : It->second) {
11981198
ProbeCounter[&Probe] += Count;
11991199
}
12001200
}

0 commit comments

Comments
 (0)