[llvm] c136e72 - [Remarks] Fix '-fpermissive'. NFC
Michael Liao via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 12 09:23:57 PDT 2023
Author: Michael Liao
Date: 2023-10-12T12:23:44-04:00
New Revision: c136e722aa4b03209da48b641c6f413202cb0ff9
URL: https://github.com/llvm/llvm-project/commit/c136e722aa4b03209da48b641c6f413202cb0ff9
DIFF: https://github.com/llvm/llvm-project/commit/c136e722aa4b03209da48b641c6f413202cb0ff9.diff
LOG: [Remarks] Fix '-fpermissive'. NFC
Added:
Modified:
llvm/tools/llvm-remarkutil/RemarkCounter.cpp
llvm/tools/llvm-remarkutil/RemarkCounter.h
Removed:
################################################################################
diff --git a/llvm/tools/llvm-remarkutil/RemarkCounter.cpp b/llvm/tools/llvm-remarkutil/RemarkCounter.cpp
index b7cbebc0ca8e688..fa05f4fda95fba1 100644
--- a/llvm/tools/llvm-remarkutil/RemarkCounter.cpp
+++ b/llvm/tools/llvm-remarkutil/RemarkCounter.cpp
@@ -167,7 +167,7 @@ Error ArgumentCounter::getAllMatchingArgumentsInRemark(
std::optional<std::string> Counter::getGroupByKey(const Remark &Remark) {
- switch (GroupBy) {
+ switch (_GroupBy) {
case GroupBy::PER_FUNCTION:
return Remark.FunctionName.str();
case GroupBy::TOTAL:
@@ -177,7 +177,7 @@ std::optional<std::string> Counter::getGroupByKey(const Remark &Remark) {
if (!Remark.Loc.has_value())
return std::nullopt;
- if (GroupBy == GroupBy::PER_FUNCTION_WITH_DEBUG_LOC)
+ if (_GroupBy == GroupBy::PER_FUNCTION_WITH_DEBUG_LOC)
return Remark.Loc->SourceFilePath.str() + ":" + Remark.FunctionName.str();
return Remark.Loc->SourceFilePath.str();
}
@@ -213,7 +213,7 @@ Error ArgumentCounter::print(StringRef OutputFileName) {
return MaybeOF.takeError();
auto OF = std::move(*MaybeOF);
- OF->os() << groupByToStr(GroupBy) << ",";
+ OF->os() << groupByToStr(_GroupBy) << ",";
unsigned Idx = 0;
for (auto [Key, _] : ArgumentSetIdxMap) {
OF->os() << Key;
@@ -243,7 +243,7 @@ Error RemarkCounter::print(StringRef OutputFileName) {
return MaybeOF.takeError();
auto OF = std::move(*MaybeOF);
- OF->os() << groupByToStr(GroupBy) << ","
+ OF->os() << groupByToStr(_GroupBy) << ","
<< "Count\n";
for (auto [Key, Count] : CountedByRemarksMap)
OF->os() << Key << "," << Count << "\n";
diff --git a/llvm/tools/llvm-remarkutil/RemarkCounter.h b/llvm/tools/llvm-remarkutil/RemarkCounter.h
index aa9eaf698849cb2..89cd3f7388d072c 100644
--- a/llvm/tools/llvm-remarkutil/RemarkCounter.h
+++ b/llvm/tools/llvm-remarkutil/RemarkCounter.h
@@ -110,9 +110,9 @@ inline Error checkRegex(const Regex &Regex) {
/// Abstract counter class used to define the general required methods for
/// counting a remark.
struct Counter {
- GroupBy GroupBy;
+ GroupBy _GroupBy;
Counter(){};
- Counter(enum GroupBy GroupBy) : GroupBy(GroupBy) {}
+ Counter(enum GroupBy GroupBy) : _GroupBy(GroupBy) {}
/// Obtain the field for collecting remark info based on how we are
/// collecting. Remarks are grouped by FunctionName, Source, Source and
/// Function or collect by file.
@@ -161,7 +161,7 @@ struct ArgumentCounter : Counter {
createArgumentCounter(enum GroupBy GroupBy, ArrayRef<FilterMatcher> Arguments,
StringRef Buffer, Filters &Filter) {
ArgumentCounter AC;
- AC.GroupBy = GroupBy;
+ AC._GroupBy = GroupBy;
for (auto &Arg : Arguments) {
if (Arg.IsRegex) {
if (auto E = checkRegex(Arg.FilterRE))
More information about the llvm-commits
mailing list