diff options
author | Jan Svoboda <jan_svoboda@apple.com> | 2025-09-26 10:35:22 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-09-26 10:35:22 -0700 |
commit | 37282bcee10dc20d0469d014e566f42377f0c22c (patch) | |
tree | 6ec8f2e46cf59adeb1dfd0787e66f3915b4a55c5 /clang/lib/CodeGen/CodeGenAction.cpp | |
parent | ff98e516136a2e4c77934c52e6c7cef65a9fadee (diff) | |
download | llvm-37282bcee10dc20d0469d014e566f42377f0c22c.zip llvm-37282bcee10dc20d0469d014e566f42377f0c22c.tar.gz llvm-37282bcee10dc20d0469d014e566f42377f0c22c.tar.bz2 |
[clang] Load `-fembed-offload-object=` through the VFS (#160906)
This PR loads the path from `-fembed-offload-object=<path>` through the
VFS rather than going straight to the real file system. This matches the
behavior of other input files of the compiler. This technically changes
behavior in that `-fembed-offload-object=-` no longer loads the file
from stdin, but I don't think that was the intention of the original
code anyways.
Diffstat (limited to 'clang/lib/CodeGen/CodeGenAction.cpp')
-rw-r--r-- | clang/lib/CodeGen/CodeGenAction.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CodeGenAction.cpp b/clang/lib/CodeGen/CodeGenAction.cpp index 8e32349..9286f1f2 100644 --- a/clang/lib/CodeGen/CodeGenAction.cpp +++ b/clang/lib/CodeGen/CodeGenAction.cpp @@ -1141,7 +1141,8 @@ void CodeGenAction::ExecuteAction() { TheModule->setTargetTriple(Triple(TargetOpts.Triple)); } - EmbedObject(TheModule.get(), CodeGenOpts, Diagnostics); + EmbedObject(TheModule.get(), CodeGenOpts, CI.getVirtualFileSystem(), + Diagnostics); EmbedBitcode(TheModule.get(), CodeGenOpts, *MainFile); LLVMContext &Ctx = TheModule->getContext(); |