Skip to content

Commit 758831e

Browse files
committed
use " and " only in getLimitedCodeGenPipelineReason
1 parent d8f2532 commit 758831e

File tree

3 files changed

+4
-6
lines changed

3 files changed

+4
-6
lines changed

llvm/include/llvm/CodeGen/TargetPassConfig.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,8 +174,7 @@ class TargetPassConfig : public ImmutablePass {
174174
/// If hasLimitedCodeGenPipeline is true, this method
175175
/// returns a string with the name of the options, separated
176176
/// by \p Separator that caused this pipeline to be limited.
177-
static std::string
178-
getLimitedCodeGenPipelineReason(const char *Separator = "/");
177+
static std::string getLimitedCodeGenPipelineReason();
179178

180179
struct StartStopInfo {
181180
bool StartAfter;

llvm/lib/CodeGen/TargetPassConfig.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -635,8 +635,7 @@ bool TargetPassConfig::hasLimitedCodeGenPipeline() {
635635
!willCompleteCodeGenPipeline();
636636
}
637637

638-
std::string
639-
TargetPassConfig::getLimitedCodeGenPipelineReason(const char *Separator) {
638+
std::string TargetPassConfig::getLimitedCodeGenPipelineReason() {
640639
if (!hasLimitedCodeGenPipeline())
641640
return std::string();
642641
std::string Res;
@@ -648,7 +647,7 @@ TargetPassConfig::getLimitedCodeGenPipelineReason(const char *Separator) {
648647
for (int Idx = 0; Idx < 4; ++Idx)
649648
if (!PassNames[Idx]->empty()) {
650649
if (!IsFirst)
651-
Res += Separator;
650+
Res += " and ";
652651
IsFirst = false;
653652
Res += OptNames[Idx];
654653
}

llvm/tools/llc/llc.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -702,7 +702,7 @@ static int compileModule(char **argv, LLVMContext &Context) {
702702
if (TPC.hasLimitedCodeGenPipeline()) {
703703
WithColor::warning(errs(), argv[0])
704704
<< "run-pass cannot be used with "
705-
<< TPC.getLimitedCodeGenPipelineReason(" and ") << ".\n";
705+
<< TPC.getLimitedCodeGenPipelineReason() << ".\n";
706706
delete PTPC;
707707
delete MMIWP;
708708
return 1;

0 commit comments

Comments
 (0)