Skip to content

Commit f8da9c2

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 b39751c commit f8da9c2

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
@@ -2459,7 +2459,7 @@ MCSection *TargetLoweringObjectFileXCOFF::getExplicitSectionGlobal(
24592459
report_fatal_error("XCOFF other section types not yet implemented.");
24602460

24612461
// The profiling instrumentation symbols are special in that we want to
2462-
// emit a unique CSECT for each when function sections are enabeld, which
2462+
// emit a unique CSECT for each when function sections are enabled, which
24632463
// are then renamed back to the CSECT name specified by the explicit section.
24642464
// This is to work around the limitation of not having section groups or a
24652465
// similar feature in XCOFF.
@@ -2469,9 +2469,9 @@ MCSection *TargetLoweringObjectFileXCOFF::getExplicitSectionGlobal(
24692469
std::string ProfilingCounterSectionName =
24702470
getInstrProfSectionName(IPSK_cnts, Triple::XCOFF, false);
24712471
if ((SectionName == ProfilingDataSectionName &&
2472-
GO->getName().starts_with("__profd_")) ||
2472+
GO->getName().starts_with(getInstrProfDataVarPrefix())) ||
24732473
(SectionName == ProfilingCounterSectionName &&
2474-
GO->getName().starts_with("__profc_"))) {
2474+
GO->getName().starts_with(getInstrProfCountersVarPrefix()))) {
24752475
SectionName += ".";
24762476
SectionName += GO->getName();
24772477
}

0 commit comments

Comments
 (0)