Skip to content

Commit e00e069

Browse files
committed
[SwiftScan] Update getOptionName usage
`getOptionName()` now returns a `StringRef`, so we can use `empty()` instead of a `strlen` check.
1 parent de4e23e commit e00e069

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/libSwiftScan/libSwiftScan.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -560,7 +560,7 @@ static void addFrontendFlagOption(llvm::opt::OptTable &table,
560560
std::vector<std::string> &frontendOptions) {
561561
if (table.getOption(id).hasFlag(swift::options::FrontendOption)) {
562562
auto name = table.getOptionName(id);
563-
if (strlen(name) > 0) {
563+
if (!name.empty()) {
564564
frontendOptions.push_back(std::string(name));
565565
}
566566
}

0 commit comments

Comments
 (0)