<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/72866>72866</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            [SPIR-V][clang] `--save-temps` cancels `-fintegrated-objemitter`
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            clang
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          linehill
      </td>
    </tr>
</table>

<pre>
    For example:
```
$ clang -target spirv64v1.2 -fintegrated-objemitter empty.cl -c --save-temps -###
clang version 18.0.0 (git@github.com:CHIP-SPV/llvm-project.git 8e7d42c1562f9961e5c8cdeef6490e0670b27409)
Target: spirv64v1.2
Thread model: posix
InstalledDir: /mnt/md0/linehill/ws-chipstar-4/spirv-be-issues/../install/bin
 "/mnt/md0/linehill/ws-chipstar-4/install/bin/clang-18" "-cc1" "-triple" "spirv64v1.2" "-Wspir-compat" "-E" "-save-temps=cwd" "-disable-free" "-clear-ast-before-backend" "-main-file-name" "empty.cl" "-mrelocation-model" "static" "-mframe-pointer=all" "-ffp-contract=on" "-fno-rounding-math" "-mconstructor-aliases" "-debugger-tuning=gdb" "-fdebug-compilation-dir=/mnt/md0/linehill/ws-chipstar-4/spirv-be-issues" "-fcoverage-compilation-dir=/mnt/md0/linehill/ws-chipstar-4/spirv-be-issues" "-resource-dir" "/mnt/md0/linehill/ws-chipstar-4/install/lib/clang/18" "-ferror-limit" "19" "-finclude-default-header" "-fdeclare-opencl-builtins" "-fgnuc-version=4.2.1" "-fno-threadsafe-statics" "-fcolor-diagnostics" "-o" "empty.i" "-x" "cl" "empty.cl"
 "/mnt/md0/linehill/ws-chipstar-4/install/bin/clang-18" "-cc1" "-triple" "spirv64v1.2" "-Wspir-compat" "-emit-llvm-bc" "-emit-llvm-uselists" "-save-temps=cwd" "-disable-free" "-clear-ast-before-backend" "-main-file-name" "empty.cl" "-mrelocation-model" "static" "-mframe-pointer=all" "-ffp-contract=on" "-fno-rounding-math" "-mconstructor-aliases" "-debugger-tuning=gdb" "-fdebug-compilation-dir=/mnt/md0/linehill/ws-chipstar-4/spirv-be-issues" "-fcoverage-compilation-dir=/mnt/md0/linehill/ws-chipstar-4/spirv-be-issues" "-resource-dir" "/mnt/md0/linehill/ws-chipstar-4/install/lib/clang/18" "-ferror-limit" "19" "-fgnuc-version=4.2.1" "-fcolor-diagnostics" "-disable-llvm-passes" "-o" "empty.bc" "-x" "cpp-output" "empty.i"
 "llvm-spirv" "empty.bc" "--spirv-tools-dis" "-o" "empty.s"
 "llvm-spirv" "empty.s" "-to-binary" "-o" "empty.o"
```
LLVM-SPIRV-Translator is used unexpectedly instead of the SPIR-V backend.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzsVk2P2zYQ_TX0hRiBomRZPviwqSs0QAoETbA9U-RIZkqRAkk5u_--0Ke9yaYIWgToIYBgSDPkI2fmvfGIEHRrEU9k_4bszzsxxIvzJ6MtXrQxu9qp51PlPMUn0fUGSfZA2JmwB1Kw5Zk_eU6lEbalEIVvMdLQa38t8muacAqNthFbLyIqcPUn7HSM6Cl2fXxOpKEgKUAQV4SIXR8oEJ4tzwQ_Q1_RB-0sTcuEJYwSXrY6kpy1Ol6GOpGuI9nDL7-9fQ8f3j8SXhlz7aD37hPKmLQ60hIPKucy3Re8OR6LFPeylAqxKfIjQ1YcWM0POTsSfpzP_TjFQrKH-3AW18WjULRzCs24oHdBP82utzZEYQyqs_aji_Cqs3H8VWy81pJcwqvPAeRF9yEKDznh1XQK1Ag6hAED4VWSEF7pGZDwqtZ2PoMSzr8f9yUAr6Z8QloSzkcgkDJdX6PXY53nr_uoF_-fow2k63oRV9uv68uthCQ7y89qtSsdRG0QGo-4nWlQeBAhQo2N8wi1kH-h3fZ0QltotEGwolt3rYzZFnk0ToqonYW5FMvFo4habqsaLzqE3o009CQ7T7mYfU3Tg3Q2eiEjyc7Obg7rwLvB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