Skip to content

Commit

Permalink
[llvm-split][nfc] Harmonize help and error message (#120062)
Browse files Browse the repository at this point in the history
Somme error / help message refer to options with a single dash while
help refer to options with a double dash.
  • Loading branch information
serge-sans-paille authored Dec 17, 2024
1 parent e5521fa commit ec636cf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion llvm/test/tools/llvm-split/target-specific-split.ll
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

; Basic test for a target that doesn't support target-specific module splitting.

; CHECK: warning: -preserve-locals has no effect when using TargetMachine::splitModule
; CHECK: warning: --preserve-locals has no effect when using TargetMachine::splitModule
; CHECK: warning: TargetMachine::splitModule failed, falling back to default splitModule implementation

define void @bar() {
Expand Down
6 changes: 3 additions & 3 deletions llvm/tools/llvm-split/llvm-split.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ static cl::opt<std::string>
cl::value_desc("triple"), cl::cat(SplitCategory));

static cl::opt<std::string>
MCPU("mcpu", cl::desc("Target CPU, ignored if -mtriple is not used"),
MCPU("mcpu", cl::desc("Target CPU, ignored if --mtriple is not used"),
cl::value_desc("cpu"), cl::cat(SplitCategory));

int main(int argc, char **argv) {
Expand Down Expand Up @@ -125,11 +125,11 @@ int main(int argc, char **argv) {

if (TM) {
if (PreserveLocals) {
errs() << "warning: -preserve-locals has no effect when using "
errs() << "warning: --preserve-locals has no effect when using "
"TargetMachine::splitModule\n";
}
if (RoundRobin)
errs() << "warning: -round-robin has no effect when using "
errs() << "warning: --round-robin has no effect when using "
"TargetMachine::splitModule\n";

if (TM->splitModule(*M, NumOutputs, HandleModulePart))
Expand Down

0 comments on commit ec636cf

Please sign in to comment.