Skip to content

Commit 43487cc

Browse files
andreytr4inteligcbot
authored andcommitted
Added -s alias to -cm-src option
Added -s alias to -cm-src option
1 parent e2bf619 commit 43487cc

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

IGC/AdaptorOCL/ocl_igc_interface/impl/fcl_ocl_translation_ctx_impl.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,9 +181,9 @@ static llvm::Optional<std::string> MakeTemporaryCMSource(
181181

182182
static bool processCmSrcOptions(
183183
llvm::SmallVectorImpl<const char*> &userArgs,
184+
std::string optname,
184185
std::string &inputFile) {
185186

186-
std::string optname = "-cm-src";
187187
auto toErase = std::find_if(userArgs.begin(), userArgs.end(),
188188
[&optname](const auto& Item) { return std::strcmp(Item, optname.c_str()) == 0; });
189189
if (toErase != userArgs.end()) {
@@ -240,7 +240,8 @@ static std::vector<const char*>
240240
cmfeDefaultArchOpt ? cmfeDefaultArchOpt.getValue() : "SKL";
241241

242242
std::string inputFile = "src.cm";
243-
isMemFile = processCmSrcOptions(userArgs, inputFile);
243+
isMemFile = processCmSrcOptions(userArgs, "-cm-src", inputFile) ||
244+
processCmSrcOptions(userArgs, "-s", inputFile);
244245
if (!isMemFile) {
245246
auto OptSrc = MakeTemporaryCMSource(Src, inputFile, outI);
246247
if (!OptSrc)

0 commit comments

Comments
 (0)