Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion clang/include/clang/Driver/Options.td
Original file line number Diff line number Diff line change
Expand Up @@ -4638,10 +4638,14 @@ def image__base : Separate<["-"], "image_base">;
def include_ : JoinedOrSeparate<["-", "--"], "include">, Group<clang_i_Group>, EnumName<"include">,
MetaVarName<"<file>">, HelpText<"Include file before parsing">,
Visibility<[ClangOption, CC1Option]>;
def include_footer : Separate<["-"], "include-footer">, Group<clang_i_Group>,
def include_internal_footer : Separate<["-"], "include-internal-footer">, Group<clang_i_Group>,
Visibility<[CC1Option]>,
HelpText<"Name of the footer integration file">, MetaVarName<"<file>">,
MarshallingInfoString<PreprocessorOpts<"IncludeFooter">>;
def include_internal_header : Separate<["-"], "include-internal-header">, Group<clang_i_Group>,
Visibility<[CC1Option]>,
HelpText<"Name of the header integration file">, MetaVarName<"<file>">,
MarshallingInfoString<PreprocessorOpts<"IncludeHeader">>;
def include_pch : Separate<["-"], "include-pch">, Group<clang_i_Group>,
Visibility<[ClangOption, CC1Option]>,
HelpText<"Include precompiled header file">, MetaVarName<"<file>">,
Expand Down
1 change: 1 addition & 0 deletions clang/include/clang/Lex/PreprocessorOptions.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ class PreprocessorOptions {
std::vector<std::pair<std::string, bool/*isUndef*/>> Macros;
std::vector<std::string> Includes;
std::string IncludeFooter;
std::string IncludeHeader;
std::vector<std::string> MacroIncludes;

/// Perform extra checks when loading PCM files for mutable file systems.
Expand Down
7 changes: 4 additions & 3 deletions clang/lib/Driver/ToolChains/Clang.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5734,7 +5734,8 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
// action to determine this.
if (types::getPreprocessedType(Input.getType()) != types::TY_INVALID &&
!Header.empty()) {
CmdArgs.push_back("-include");
// Add the -include-header option to add the integration header
CmdArgs.push_back("-include-internal-header");
CmdArgs.push_back(Args.MakeArgString(Header));
// When creating dependency information, filter out the generated
// header file.
Expand All @@ -5746,11 +5747,11 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
CmdArgs.push_back("-fsycl-enable-int-header-diags");
}

// Add the -include-footer option to add the integration footer
// Add the -include-internal-footer option to add the integration footer
StringRef Footer = D.getIntegrationFooter(Input.getBaseInput());
if (types::getPreprocessedType(Input.getType()) != types::TY_INVALID &&
!Args.hasArg(options::OPT_fno_sycl_use_footer) && !Footer.empty()) {
CmdArgs.push_back("-include-footer");
CmdArgs.push_back("-include-internal-footer");
CmdArgs.push_back(Args.MakeArgString(Footer));
// When creating dependency information, filter out the generated
// integration footer file.
Expand Down
7 changes: 7 additions & 0 deletions clang/lib/Frontend/InitPreprocessor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1663,6 +1663,13 @@ void clang::InitializePreprocessor(Preprocessor &PP,
AddImplicitInclude(Builder, Path);
}

// Process -include-internal-header directive.
if (!LangOpts.SYCLIsDevice) {
if (!InitOpts.IncludeHeader.empty()) {
AddImplicitInclude(Builder, InitOpts.IncludeHeader);
}
}

// Instruct the preprocessor to skip the preamble.
PP.setSkipMainFilePreamble(InitOpts.PrecompiledPreambleBytes.first,
InitOpts.PrecompiledPreambleBytes.second);
Expand Down
42 changes: 17 additions & 25 deletions clang/lib/Frontend/PrintPreprocessedOutput.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -271,22 +271,25 @@ void PrintPPOutputPPCallbacks::WriteLineInfo(unsigned LineNo,
startNewLineIfNeeded();

// Emit #line directives or GNU line markers depending on what mode we're in.
if (UseLineDirectives) {
*OS << "#line" << ' ' << LineNo << ' ' << '"';
OS->write_escaped(CurFilename);
*OS << '"';
} else {
*OS << '#' << ' ' << LineNo << ' ' << '"';
OS->write_escaped(CurFilename);
*OS << '"';
if (CurFilename != PP.getPreprocessorOpts().IncludeFooter &&
CurFilename != PP.getPreprocessorOpts().IncludeHeader) {
if (UseLineDirectives) {
*OS << "#line" << ' ' << LineNo << ' ' << '"';
OS->write_escaped(CurFilename);
*OS << '"';
} else {
*OS << '#' << ' ' << LineNo << ' ' << '"';
OS->write_escaped(CurFilename);
*OS << '"';

if (ExtraLen)
OS->write(Extra, ExtraLen);
if (ExtraLen)
OS->write(Extra, ExtraLen);

if (FileType == SrcMgr::C_System)
OS->write(" 3", 2);
else if (FileType == SrcMgr::C_ExternCSystem)
OS->write(" 3 4", 4);
if (FileType == SrcMgr::C_System)
OS->write(" 3", 2);
else if (FileType == SrcMgr::C_ExternCSystem)
OS->write(" 3 4", 4);
}
}
*OS << '\n';
}
Expand Down Expand Up @@ -913,8 +916,6 @@ static void PrintIncludeFooter(Preprocessor &PP, SourceLocation Loc,
return;
FileID FooterFileID = SourceMgr.ComputeValidFooterFileID(Footer);
StringRef FooterContentBuffer = SourceMgr.getBufferData(FooterFileID);
// print out the name of the integration footer.
Callbacks->WriteFooterInfo(Footer);
SmallVector<StringRef, 8> FooterContentArr;
FooterContentBuffer.split(FooterContentArr, '\r');
// print out the content of the integration footer.
Expand Down Expand Up @@ -1185,15 +1186,6 @@ void clang::DoPrintPreprocessedInput(Preprocessor &PP, raw_ostream *OS,
PrintPreprocessedTokens(PP, Tok, Callbacks);
*OS << '\n';

if (!PP.getPreprocessorOpts().IncludeFooter.empty() &&
!PP.IncludeFooterProcessed) {
assert(PP.getLangOpts().SYCLIsHost &&
"The 'include-footer' is expected in host compilation only");
SourceLocation Loc = Tok.getLocation();
PrintIncludeFooter(PP, Loc, PP.getPreprocessorOpts().IncludeFooter,
Callbacks);
}

// Remove the handlers we just added to leave the preprocessor in a sane state
// so that it can be reused (for example by a clang::Parser instance).
PP.RemovePragmaHandler(MicrosoftExtHandler.get());
Expand Down
4 changes: 2 additions & 2 deletions clang/test/CodeGenSYCL/debug-info-file-checksum.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
// COMP1-SAME: checksumkind: CSK_MD5, checksum: "259269f735d83ec32c46a11352458493")

// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fsycl-is-host \
// RUN: -include %t.header.h -dependency-filter %t.header.h \
// RUN: -include-footer %t.footer.h -dependency-filter %t.footer.h \
// RUN: -include-internal-header %t.header.h -dependency-filter %t.header.h \
// RUN: -include-internal-footer %t.footer.h -dependency-filter %t.footer.h \
// RUN: -main-file-name %S/Inputs/checksum.cpp \
// RUN: -gcodeview -debug-info-kind=limited -emit-llvm -O0 -o - \
// RUN: "%S/Inputs/checksum.cpp" \
Expand Down
14 changes: 6 additions & 8 deletions clang/test/Driver/sycl-int-footer-old-model.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,17 @@
// RUN: %clangxx -fsycl --no-offload-new-driver -I cmdline/dir -include dummy.h %/s -### 2>&1 \
// RUN: | FileCheck -check-prefix FOOTER %s -DSRCDIR=%/S -DCMDDIR=cmdline/dir
// FOOTER: clang{{.*}} "-fsycl-is-device"{{.*}} "-fsycl-int-header=[[INTHEADER:.+\.h]]" "-fsycl-int-footer=[[INTFOOTER:.+\h]]" "-sycl-std={{.*}}"{{.*}} "-include" "dummy.h"
// FOOTER: clang{{.*}} "-include" "[[INTHEADER]]"
// FOOTER: clang{{.*}} "-include-internal-header" "[[INTHEADER]]"
// FOOTER-SAME: "-dependency-filter" "[[INTHEADER]]"
// FOOTER-SAME: "-include-footer" "[[INTFOOTER]]"
// FOOTER-SAME: "-dependency-filter" "[[INTFOOTER]]"
// FOOTER-SAME: "-fsycl-is-host"{{.*}} "-main-file-name" "[[SRCFILE:.+\cpp]]" {{.*}} "-include" "dummy.h"{{.*}} "-I" "cmdline/dir"

/// Preprocessed file creation with integration footer
// RUN: %clangxx -fsycl --no-offload-new-driver -E %/s -### 2>&1 \
// RUN: | FileCheck -check-prefix FOOTER_PREPROC_GEN %s
// FOOTER_PREPROC_GEN: clang{{.*}} "-fsycl-is-device"{{.*}} "-fsycl-int-header=[[INTHEADER:.+\.h]]" "-fsycl-int-footer=[[INTFOOTER:.+\h]]" "-sycl-std={{.*}}" "-o" "[[PREPROC_DEVICE:.+\.ii]]"
// FOOTER_PREPROC_GEN: clang{{.*}} "-include" "[[INTHEADER]]"
// FOOTER_PREPROC_GEN: "-dependency-filter" "[[INTHEADER]]"
// FOOTER_PREPROC_GEN-SAME: "-include-footer" "[[INTFOOTER]]"
// FOOTER_PREPROC_GEN: clang{{.*}} "-include-internal-header" "[[INTHEADER]]"
// FOOTER_PREPROC_GEN-SAME: "-dependency-filter" "[[INTHEADER]]"
// FOOTER_PREPROC_GEN-SAME: "-include-internal-footer" "[[INTFOOTER]]"
// FOOTER_PREPROC_GEN-SAME: "-dependency-filter" "[[INTFOOTER]]"
// FOOTER_PREPROC_GEN-SAME: "-fsycl-is-host"{{.*}} "-E"{{.*}} "-o" "[[PREPROC_HOST:.+\.ii]]"

Expand All @@ -31,7 +29,7 @@
// RUN: | FileCheck -check-prefix NO-FOOTER --implicit-check-not "-fsycl-int-footer" %s
// NO-FOOTER: clang{{.*}} "-fsycl-is-device"{{.*}} "-fsycl-int-header=[[INTHEADER:.+\.h]]" "-sycl-std={{.*}}"
// NO-FOOTER-NOT: append-file
// NO-FOOTER: clang{{.*}} "-include" "[[INTHEADER]]"{{.*}} "-fsycl-is-host"
// NO-FOOTER: clang{{.*}} "-include-internal-header" "[[INTHEADER]]"{{.*}} "-fsycl-is-host"

/// Check phases without integration footer
// RUN: %clangxx -fsycl --no-offload-new-driver -fno-sycl-instrument-device-code -fno-sycl-device-lib=all -fno-sycl-use-footer -target x86_64-unknown-linux-gnu %s -ccc-print-phases 2>&1 \
Expand Down Expand Up @@ -69,7 +67,7 @@
// RUN: | FileCheck -check-prefix FOOTER_PATH %s
// FOOTER_PATH: clang{{.*}} "-fsycl-is-device"
// FOOTER_PATH-SAME: "-fsycl-int-footer=dummy_dir{{(/|\\\\)}}{{.*}}-footer-{{.*}}.h"
// FOOTER_PATH: clang{{.*}} "-include-footer" "dummy_dir{{(/|\\\\)}}{{.*}}-footer-{{.*}}.h"
// FOOTER_PATH: clang{{.*}} "-include-internal-footer" "dummy_dir{{(/|\\\\)}}{{.*}}-footer-{{.*}}.h"


/// Check behaviors for dependency generation
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@
/// Check compilation tool steps when using the integration footer
// RUN: %clangxx -fsycl --offload-new-driver -I cmdline/dir -include dummy.h %/s -### 2>&1 \
// RUN: | FileCheck -check-prefix FOOTER %s -DSRCDIR=%/S -DCMDDIR=cmdline/dir

// FOOTER: clang{{.*}} "-fsycl-is-device"{{.*}} "-fsycl-int-header=[[INTHEADER:.+\.h]]" "-fsycl-int-footer=[[INTFOOTER:.+\h]]" "-sycl-std={{.*}}"{{.*}} "-include" "dummy.h"
// FOOTER: clang{{.*}} "-include" "[[INTHEADER]]"
// FOOTER: clang{{.*}} "-include-internal-header" "[[INTHEADER]]"
// FOOTER-SAME: "-fsycl-is-host"{{.*}} "-include" "dummy.h"{{.*}} "-I" "cmdline/dir"
// FOOTER-NOT: "-include" "[[INTHEADER]]"
// FOOTER-NOT: "-include-internal-header" "[[INTHEADER]]"

/// Preprocessed file creation with integration footer
// RUN: %clangxx -fsycl --offload-new-driver -E %/s -### 2>&1 \
// RUN: | FileCheck -check-prefix FOOTER_PREPROC_GEN %s
// FOOTER_PREPROC_GEN: clang{{.*}} "-fsycl-is-device"{{.*}} "-fsycl-int-header=[[INTHEADER:.+\.h]]" "-fsycl-int-footer=[[INTFOOTER:.+\h]]" "-sycl-std={{.*}}" "-o" "[[PREPROC_DEVICE:.+\.ii]]"
// FOOTER_PREPROC_GEN: clang{{.*}} "-include" "[[INTHEADER]]"
// FOOTER_PREPROC_GEN-SAME: "-include-footer" "[[INTFOOTER]]"
// FOOTER_PREPROC_GEN: clang{{.*}} "-include-internal-header" "[[INTHEADER]]"
// FOOTER_PREPROC_GEN-SAME: "-dependency-filter" "[[INTHEADER]]"
// FOOTER_PREPROC_GEN-SAME: "-include-internal-footer" "[[INTFOOTER]]"
// FOOTER_PREPROC_GEN-SAME: "-dependency-filter" "[[INTFOOTER]]"
// FOOTER_PREPROC_GEN-SAME: "-fsycl-is-host"{{.*}} "-E"{{.*}} "-o" "-"

/// Preprocessed file use with integration footer
Expand All @@ -24,7 +27,7 @@
// RUN: %clangxx -fsycl --offload-new-driver -fno-sycl-use-footer %s -### 2>&1 \
// RUN: | FileCheck -check-prefix NO-FOOTER --implicit-check-not "-fsycl-int-footer" %s
// NO-FOOTER: clang{{.*}} "-fsycl-is-device"{{.*}} "-fsycl-int-header=[[INTHEADER:.+\.h]]" "-sycl-std={{.*}}"
// NO-FOOTER: clang{{.*}} "-include" "[[INTHEADER]]"{{.*}} "-fsycl-is-host"{{.*}} "-o"
// NO-FOOTER: clang{{.*}} "-include-internal-header" "[[INTHEADER]]"{{.*}} "-fsycl-is-host"{{.*}} "-o"

/// Check phases without integration footer
// RUN: %clangxx -fsycl --offload-new-driver -fno-sycl-instrument-device-code -fno-sycl-device-lib=all -fno-sycl-use-footer -target x86_64-unknown-linux-gnu %s -ccc-print-phases 2>&1 \
Expand Down Expand Up @@ -58,7 +61,7 @@
// RUN: | FileCheck -check-prefix FOOTER_PATH %s
// FOOTER_PATH: clang{{.*}} "-fsycl-is-device"
// FOOTER_PATH-SAME: "-fsycl-int-footer=dummy_dir{{(/|\\\\)}}{{.*}}-footer-{{.*}}.h"
// FOOTER_PATH: clang{{.*}} "-include-footer" "dummy_dir{{(/|\\\\)}}{{.*}}-footer-{{.*}}.h"
// FOOTER_PATH: clang{{.*}} "-include-internal-footer" "dummy_dir{{(/|\\\\)}}{{.*}}-footer-{{.*}}.h"

/// Check behaviors for dependency generation
// RUN: %clangxx -fsycl --offload-new-driver -MD -c %s -### 2>&1 \
Expand Down
2 changes: 1 addition & 1 deletion clang/test/Driver/sycl-offload-aot.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@
// CHK-TOOLS-GEN: clang{{.*}} "-triple" "spir64_gen-unknown-unknown"
// CHK-TOOLS-CPU: clang{{.*}} "-triple" "spir64_x86_64-unknown-unknown"
// CHK-TOOLS-AOT: "-fsycl-is-device"{{.*}} "-fsycl-int-header=[[INPUT1:.+\-header.+\.h]]" "-fsycl-int-footer={{.*}}"{{.*}} "-o" "[[OUTPUT1:.+\.bc]]"
// CHK-TOOLS-AOT: clang{{.*}} "-triple" "x86_64-unknown-linux-gnu" {{.*}} "-include" "[[INPUT1]]" {{.*}} "-o" "[[OUTPUT7:.+\.o]]
// CHK-TOOLS-AOT: clang{{.*}} "-triple" "x86_64-unknown-linux-gnu" {{.*}} "-include-internal-header" "[[INPUT1]]" {{.*}} "-o" "[[OUTPUT7:.+\.o]]
// CHK-TOOLS-AOT: llvm-link{{.*}} "[[OUTPUT1]]" "-o" "[[OUTPUT2:.+\.bc]]"
// CHK-TOOLS-FPGA: sycl-post-link{{.*}} "-o" "[[OUTPUT2_T:.+\.table]]" "[[OUTPUT2]]"
// CHK-TOOLS-GEN: sycl-post-link{{.*}} "-o" "[[OUTPUT2_T:.+\.table]]" "[[OUTPUT2]]"
Expand Down
4 changes: 2 additions & 2 deletions clang/test/Driver/sycl-offload-header-check.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@
// RUN: FileCheck --check-prefix=CHECK-HEADER %s
// CHECK-HEADER: clang{{.*}} "-fsycl-int-header=[[HEADER:.+\.h]]"
// CHECK-HEADER: {{.*}} "-internal-isystem" "{{.*}}bin{{[/\\]+}}..{{[/\\]+}}include{{[/\\]+}}sycl{{[/\\]+}}stl_wrappers"
// CHECK-HEADER-NOT: clang{{.*}} "-include" "[[HEADER]]"
// CHECK-HEADER: clang{{.*}} "-include" "{{.*}}_dirname{{.+}}.h"
// CHECK-HEADER-NOT: clang{{.*}} "-include-internal-header" "[[HEADER]]"
// CHECK-HEADER: clang{{.*}} "-include-internal-header" "{{.*}}_dirname{{.+}}.h"
2 changes: 1 addition & 1 deletion clang/test/Driver/sycl-offload-new-driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
// RUN: %clangxx -### --target=x86_64-unknown-linux-gnu -fsycl -fsycl-targets=spir64 --offload-new-driver %s 2>&1 | FileCheck -check-prefix=CHK-FLOW %s
// CHK-FLOW: clang{{.*}} "-cc1" "-triple" "spir64-unknown-unknown" "-aux-triple" "x86_64-unknown-linux-gnu" "-fsycl-is-device" {{.*}} "-fsycl-int-header=[[HEADER:.*]].h" "-fsycl-int-footer=[[FOOTER:.*]].h" {{.*}} "--offload-new-driver" {{.*}} "-o" "[[CC1DEVOUT:.*]]" "-x" "c++" "[[INPUT:.*]]"
// CHK-FLOW-NEXT: clang-offload-packager{{.*}} "-o" "[[PACKOUT:.*]]" "--image=file=[[CC1DEVOUT]],triple=spir64-unknown-unknown,arch=,kind=sycl{{.*}}"
// CHK-FLOW-NEXT: clang{{.*}} "-cc1" "-triple" "x86_64-unknown-linux-gnu" {{.*}} "-include" "[[HEADER]].h" "-dependency-filter" "[[HEADER]].h" {{.*}} "-fsycl-is-host"{{.*}} "--offload-new-driver" {{.*}} "-fembed-offload-object=[[PACKOUT]]" {{.*}} "-o" "[[CC1FINALOUT:.*]]" "-x" "c++" "[[INPUT]]"
// CHK-FLOW-NEXT: clang{{.*}} "-cc1" "-triple" "x86_64-unknown-linux-gnu" {{.*}} "-include-internal-header" "[[HEADER]].h" "-dependency-filter" "[[HEADER]].h" {{.*}} "-include-internal-footer" "[[FOOTER]].h" "-dependency-filter" "[[FOOTER]].h" "-fsycl-is-host"{{.*}} "--offload-new-driver" {{.*}} "-fembed-offload-object=[[PACKOUT]]" {{.*}} "-o" "[[CC1FINALOUT:.*]]" "-x" "c++" "[[INPUT]]"
// CHK-FLOW-NEXT: clang-linker-wrapper{{.*}} "--host-triple=x86_64-unknown-linux-gnu"{{.*}} "--linker-path={{.*}}/ld" {{.*}} "[[CC1FINALOUT]]"

/// Verify options passed to clang-linker-wrapper
Expand Down
4 changes: 2 additions & 2 deletions clang/test/Driver/sycl-offload-old-model.c
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@
// RUN: %clang -target x86_64-unknown-linux-gnu -fsycl --no-offload-new-driver -c %s -### 2>&1 \
// RUN: | FileCheck %s -check-prefix=CHK-INT-HEADER
// CHK-INT-HEADER: clang{{.*}} "-fsycl-is-device"{{.*}} "-fsycl-int-header=[[INPUT1:.+\-header.+\.h]]" "-fsycl-int-footer={{.*}}"{{.*}} "-o" "[[OUTPUT1:.+\.bc]]"
// CHK-INT-HEADER: clang{{.*}} "-triple" "x86_64-unknown-linux-gnu" {{.*}} "-include" "[[INPUT1]]" "-dependency-filter" "[[INPUT1]]" {{.*}} "-o" "[[OUTPUT2:.+\.o]]"
// CHK-INT-HEADER: clang{{.*}} "-triple" "x86_64-unknown-linux-gnu" {{.*}} "-include-internal-header" "[[INPUT1]]" "-dependency-filter" "[[INPUT1]]" {{.*}} "-o" "[[OUTPUT2:.+\.o]]"
// CHK-INT-HEADER: clang-offload-bundler{{.*}} "-type=o" "-targets=sycl-spir64-unknown-unknown,host-x86_64-unknown-linux-gnu" {{.*}} "-input=[[OUTPUT1]]" "-input=[[OUTPUT2]]"

/// ###########################################################################
Expand Down Expand Up @@ -710,7 +710,7 @@
// RUN: %clang_cl -fsycl --no-offload-new-driver /Fosomefile.obj -c %s -### 2>&1 \
// RUN: | FileCheck -check-prefix=FO-CHECK %s
// FO-CHECK: clang{{.*}} "-fsycl-int-header=[[HEADER:.+\.h]]" "-fsycl-int-footer={{.*}}"{{.*}} "-o" "[[OUTPUT1:.+\.bc]]"
// FO-CHECK: clang{{.*}} "-include" "[[HEADER]]" {{.*}} "-o" "[[OUTPUT2:.+\.obj]]"
// FO-CHECK: clang{{.*}} "-include-internal-header" "[[HEADER]]" {{.*}} "-o" "[[OUTPUT2:.+\.obj]]"
// FO-CHECK: clang-offload-bundler{{.*}} "-output=somefile.obj" "-input=[[OUTPUT1]]" "-input=[[OUTPUT2]]"

/// passing of a library should not trigger the unbundler
Expand Down
2 changes: 1 addition & 1 deletion clang/test/Driver/sycl-offload-save-temps-old-model.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
// RUN: | FileCheck %s --check-prefixes=CHK-FSYCL-SAVE-TEMPS,CHK-FSYCL-SAVE-TEMPS-CONFL
// CHK-FSYCL-SAVE-TEMPS: clang{{.*}} "-fsycl-is-device"{{.*}} "-o" "[[DEVICE_BASE_NAME:[a-z0-9-]+]].ii"
// CHK-FSYCL-SAVE-TEMPS: clang{{.*}} "-fsycl-is-device"{{.*}} "-fsycl-int-header=[[HEADER_NAME:.+\-header.+\.h]]" "-fsycl-int-footer={{.*}}"{{.*}} "-o" "[[DEVICE_BASE_NAME]].bc"{{.*}} "[[DEVICE_BASE_NAME]].ii"
// CHK-FSYCL-SAVE-TEMPS: clang{{.*}} "-include" "[[HEADER_NAME]]"{{.*}} "-fsycl-is-host"{{.*}} "-o" "[[HOST_BASE_NAME:[a-z0-9_-]+]].ii"
// CHK-FSYCL-SAVE-TEMPS: clang{{.*}} "-include-internal-header" "[[HEADER_NAME]]"{{.*}} "-fsycl-is-host"{{.*}} "-o" "[[HOST_BASE_NAME:[a-z0-9_-]+]].ii"
// CHK-FSYCL-SAVE-TEMPS: clang{{.*}} "-o" "[[HOST_BASE_NAME:.*]].bc"{{.*}} "[[HOST_BASE_NAME:[a-z0-9_-]+]].ii"
// CHK-FSYCL-SAVE-TEMPS: clang{{.*}} "-o" "[[HOST_BASE_NAME:.*]].s"{{.*}} "[[HOST_BASE_NAME]].bc"
// CHK-FSYCL-SAVE-TEMPS: clang{{.*}} "-o" "[[HOST_BASE_NAME:.*]].o"{{.*}} "[[HOST_BASE_NAME]].s"
Expand Down
2 changes: 1 addition & 1 deletion clang/test/Driver/sycl-offload-save-temps.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
// CHK-FSYCL-SAVE-TEMPS: clang{{.*}} "-fsycl-is-device"{{.*}} "-o" "[[DEVICE_BASE_NAME:[a-z0-9-]+]].ii"
// CHK-FSYCL-SAVE-TEMPS: clang{{.*}} "-fsycl-is-device"{{.*}} "-fsycl-int-header=[[HEADER_NAME:.+\-header.+\.h]]" "-fsycl-int-footer={{.*}}"{{.*}} "-o" "[[DEVICE_BASE_NAME]].bc"{{.*}} "[[DEVICE_BASE_NAME]].ii"
// CHK-FSYCL-SAVE-TEMPS: clang-offload-packager{{.*}}
// CHK-FSYCL-SAVE-TEMPS: clang{{.*}} "-include" "[[HEADER_NAME]]"{{.*}} "-fsycl-is-host"{{.*}} "-o" "[[HOST_BASE_NAME:[a-z0-9_-]+]].ii"
// CHK-FSYCL-SAVE-TEMPS: clang{{.*}} "-include-internal-header" "[[HEADER_NAME]]"{{.*}} "-fsycl-is-host"{{.*}} "-o" "[[HOST_BASE_NAME:[a-z0-9_-]+]].ii"
// CHK-FSYCL-SAVE-TEMPS: clang{{.*}} "-o" "[[HOST_BASE_NAME:.*]].bc"{{.*}} "[[HOST_BASE_NAME:[a-z0-9_-]+]].ii"
// CHK-FSYCL-SAVE-TEMPS: clang{{.*}} "-o" "[[HOST_BASE_NAME:.*]].s"{{.*}} "[[HOST_BASE_NAME]].bc"
// CHK-FSYCL-SAVE-TEMPS: clang{{.*}} "-o" "[[HOST_BASE_NAME:.*]].o"{{.*}} "[[HOST_BASE_NAME]].s"
Expand Down
4 changes: 2 additions & 2 deletions clang/test/Driver/sycl-offload.c
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@
// RUN: %clang -target x86_64-unknown-linux-gnu -fsycl --offload-new-driver -c %s -### 2>&1 \
// RUN: | FileCheck %s -check-prefix=CHK-INT-HEADER
// CHK-INT-HEADER: clang{{.*}} "-fsycl-is-device"{{.*}} "-fsycl-int-header=[[INPUT1:.+\-header.+\.h]]" "-fsycl-int-footer={{.*}}"
// CHK-INT-HEADER: clang{{.*}} "-triple" "x86_64-unknown-linux-gnu" {{.*}} "-include" "[[INPUT1]]" "-dependency-filter" "[[INPUT1]]"
// CHK-INT-HEADER: clang{{.*}} "-triple" "x86_64-unknown-linux-gnu" {{.*}} "-include-internal-header" "[[INPUT1]]" "-dependency-filter" "[[INPUT1]]"

/// ###########################################################################

Expand Down Expand Up @@ -427,7 +427,7 @@
// RUN: %clang_cl -fsycl --offload-new-driver /Fosomefile.obj -c %s -### 2>&1 \
// RUN: | FileCheck -check-prefix=FO-CHECK %s
// FO-CHECK: clang{{.*}} "-fsycl-int-header=[[HEADER:.+\.h]]" "-fsycl-int-footer={{.*}}"
// FO-CHECK: clang{{.*}} "-include" "[[HEADER]]" {{.*}} "-o" "somefile.obj"
// FO-CHECK: clang{{.*}} "-include-internal-header" "[[HEADER]]" {{.*}} "-o" "somefile.obj"

/// passing of a library should not trigger the unbundler
// RUN: touch %t.a
Expand Down
Loading
Loading