Skip to content

Commit 93b8f56

Browse files
committed
[llvm][TableGen] Fix value description made by OptRSTEmitter
When this was ported to clang-tblen for https://reviews.llvm.org/D123682, some of the refactoring for the clang copy was backported to llvm, but used .front instead of .back as clang does. This means that if you have values "a, b, c" you get "must be 'a', ' b' or 'a'." instead of "must be 'a', ' b' or 'c'.".
1 parent ef3feba commit 93b8f56

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/utils/TableGen/OptRSTEmitter.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ static void EmitOptRST(RecordKeeper &Records, raw_ostream &OS) {
9191
HelpText += join(Values.begin(), Values.end() - 1, "', '");
9292
HelpText += "' or '";
9393
}
94-
HelpText += (Values.front() + "'.").str();
94+
HelpText += (Values.back() + "'.").str();
9595
}
9696

9797
if (!HelpText.empty()) {

0 commit comments

Comments
 (0)