Skip to content

Commit

Permalink
Merge branch 'sycl' into llvmspirv_pulldown
Browse files Browse the repository at this point in the history
  • Loading branch information
jsji committed Aug 6, 2024
2 parents 82afd3a + 536d89f commit bd9e71b
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 13 deletions.
2 changes: 1 addition & 1 deletion clang/include/clang/Driver/Options.td
Original file line number Diff line number Diff line change
Expand Up @@ -7748,7 +7748,7 @@ def show_includes : Flag<["--"], "show-includes">,
HelpText<"Print cl.exe style /showIncludes to stdout">;
def dependency_filter : Separate<["-"], "dependency-filter">,
HelpText<"Filter dependencies with prefix from the dependency output.">,
MarshallingInfoString<DependencyOutputOpts<"DependencyFilter">>;
MarshallingInfoStringVector<DependencyOutputOpts<"DependencyFilter">>;

} // let Visibility = [CC1Option]

Expand Down
4 changes: 2 additions & 2 deletions clang/include/clang/Frontend/DependencyOutputOptions.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ class DependencyOutputOptions {
std::string ModuleDependencyOutputDir;

/// Dependency output which is prefixed with this string is filtered from
/// the dependency output.
std::string DependencyFilter;
/// the dependency output.
std::vector<std::string> DependencyFilter;

public:
DependencyOutputOptions()
Expand Down
2 changes: 1 addition & 1 deletion clang/include/clang/Frontend/Utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ class DependencyFileGenerator : public DependencyCollector {
void outputDependencyFile(DiagnosticsEngine &Diags);

std::string OutputFile;
std::string DependencyFilter;
std::vector<std::string> DependencyFilter;
std::vector<std::string> Targets;
bool IncludeSystemHeaders;
bool PhonyTarget;
Expand Down
9 changes: 4 additions & 5 deletions clang/lib/Frontend/DependencyFile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -255,11 +255,10 @@ bool DependencyFileGenerator::sawDependency(StringRef Filename, bool FromModule,
if (isSpecialFilename(Filename))
return false;

if (DependencyFilter.size() &&
DependencyFilter.compare(0, DependencyFilter.size(), Filename.data(),
DependencyFilter.size()) == 0)
// Remove dependencies that are prefixed by the Filter string.
return false;
// Remove dependencies that are prefixed by the Filter string.
for (const std::string &FD : DependencyFilter)
if (FD.compare(0, FD.size(), Filename.data(), FD.size()) == 0)
return false;

if (IncludeSystemHeaders)
return true;
Expand Down
3 changes: 3 additions & 0 deletions clang/test/Frontend/Inputs/dependency.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
int dep() {
return 0;
}
8 changes: 8 additions & 0 deletions clang/test/Frontend/dependency-gen.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,11 @@
// RUN: %clang -MMD -MF - %s -fsyntax-only -resource-dir=%S/Inputs/resource_dir_with_sanitizer_ignorelist -fsanitize=undefined -flto -fvisibility=hidden -I ./ | FileCheck -check-prefix=ONLY-USER-DEPS %s
// ONLY-USER-DEPS: dependency-gen.o:
// NOT-ONLY-USER-DEPS: ubsan_ignorelist.txt

// RUN: %clang -c -x c++ -fsycl \
// RUN: -MD -MF - %S/Inputs/dependency.cpp | FileCheck -check-prefix=FILTER %s

// FILTER: dependency.o:
// FILTER: {{.*}}dependency.cpp
// FILTER: dependency.o:
// FILTER: {{.*}}dependency.cpp
8 changes: 4 additions & 4 deletions devops/dependencies-igc-dev.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"linux": {
"igc_dev": {
"github_tag": "igc-dev-2e6ebc3",
"version": "2e6ebc3",
"updated_at": "2024-07-28T03:46:07Z",
"url": "https://api.github.com/repos/intel/intel-graphics-compiler/actions/artifacts/1747533183/zip",
"github_tag": "igc-dev-cd26fa9",
"version": "cd26fa9",
"updated_at": "2024-08-02T21:54:38Z",
"url": "https://api.github.com/repos/intel/intel-graphics-compiler/actions/artifacts/1771028508/zip",
"root": "{DEPS_ROOT}/opencl/runtime/linux/oclgpu"
}
}
Expand Down

0 comments on commit bd9e71b

Please sign in to comment.