Skip to content

Commit e77a670

Browse files
committed
Address first round of review comments.
- Fix spelling mistake in comment. - Use llvm functions to get the string prefixes for pgo data and counter objects instead of hardcoding them. - Remove some unused declarations from one of the test files.
1 parent 1e9002a commit e77a670

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

compiler-rt/test/profile/AIX/needs-garbage-collection.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@ const char* get_message(void) {
1616
return "Hello World!";
1717
}
1818

19-
int foo(void);
20-
double bar(void);
2119
const char* baz();
2220

2321
int printf(const char*, ...);

llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2446,7 +2446,7 @@ MCSection *TargetLoweringObjectFileXCOFF::getExplicitSectionGlobal(
24462446
report_fatal_error("XCOFF other section types not yet implemented.");
24472447

24482448
// The profiling instrumentation symbols are special in that we want to
2449-
// emit a unique CSECT for each when function sections are enabeld, which
2449+
// emit a unique CSECT for each when function sections are enabled, which
24502450
// are then renamed back to the CSECT name specified by the explicit section.
24512451
// This is to work around the limitation of not having section groups or a
24522452
// similar feature in XCOFF.
@@ -2456,9 +2456,9 @@ MCSection *TargetLoweringObjectFileXCOFF::getExplicitSectionGlobal(
24562456
std::string ProfilingCounterSectionName =
24572457
getInstrProfSectionName(IPSK_cnts, Triple::XCOFF, false);
24582458
if ((SectionName == ProfilingDataSectionName &&
2459-
GO->getName().starts_with("__profd_")) ||
2459+
GO->getName().starts_with(getInstrProfDataVarPrefix())) ||
24602460
(SectionName == ProfilingCounterSectionName &&
2461-
GO->getName().starts_with("__profc_"))) {
2461+
GO->getName().starts_with(getInstrProfCountersVarPrefix()))) {
24622462
SectionName += ".";
24632463
SectionName += GO->getName();
24642464
}

0 commit comments

Comments
 (0)