llvm.org GIT mirror llvm / 58dfbf0
Use contains_lower() instead of find_lower() != StringRef::npos. NFC. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@329767 91177308-0d34-0410-b5e6-96231b3b80d8 Rui Ueyama 1 year, 4 months ago
1 changed file(s) with 6 addition(s) and 6 deletion(s). Raw diff Collapse all Expand all
108108 )";
109109
110110 void printHelpMessage() {
111 if (Stem.find_lower("ranlib") != StringRef::npos)
111 if (Stem.contains_lower("ranlib"))
112112 outs() << RanlibHelp;
113 else if (Stem.find_lower("ar") != StringRef::npos)
113 else if (Stem.contains_lower("ar"))
114114 outs() << ArHelp;
115115 }
116116
959959 llvm::InitializeAllAsmParsers();
960960
961961 Stem = sys::path::stem(ToolName);
962 if (Stem.find_lower("dlltool") != StringRef::npos)
962 if (Stem.contains_lower("dlltool"))
963963 return dlltoolDriverMain(makeArrayRef(argv, argc));
964964
965 if (Stem.find_lower("ranlib") != StringRef::npos)
965 if (Stem.contains_lower("ranlib"))
966966 return ranlib_main(argc, argv);
967967
968 if (Stem.find_lower("lib") != StringRef::npos)
968 if (Stem.contains_lower("lib"))
969969 return libDriverMain(makeArrayRef(argv, argc));
970970
971 if (Stem.find_lower("ar") != StringRef::npos)
971 if (Stem.contains_lower("ar"))
972972 return ar_main(argc, argv);
973973 fail("Not ranlib, ar, lib or dlltool!");
974974 }