Skip to content

Commit

Permalink
Merge pull request #32 from ftsrg/i-file-support
Browse files Browse the repository at this point in the history
Enabled .i files as source files
  • Loading branch information
AdamZsofi authored Sep 4, 2020
2 parents c90d8eb + 20bd82c commit ec1994d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/LLVM/ClangFrontend.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -181,10 +181,10 @@ auto gazer::ClangCompileAndLink(
bitcodeFiles.push_back(inputFile);
continue;
}

if (!inputFile.endswith_lower(".c")) {
if (!inputFile.endswith_lower(".c") && !inputFile.endswith_lower(".i")) {
llvm::errs() << "Cannot compile source file " << inputFile << ".\n"
<< "Supported extensions are: .c, .bc, .ll\n";
<< "Supported extensions are: .c, .i, .bc, .ll\n";
return nullptr;
}

Expand Down Expand Up @@ -242,4 +242,4 @@ void ClangOptions::createArgumentList(std::vector<std::string>& args)
if (!mSanitizerFlags.empty()) {
args.emplace_back("-fsanitize-trap=" + llvm::join(mSanitizerFlags, ","));
}
}
}

0 comments on commit ec1994d

Please sign in to comment.