[clang] [llvm] [llvm][clang] Sandbox filesystem reads (PR #165350)
Jan Svoboda via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 7 15:01:27 PST 2025
================
@@ -110,9 +105,6 @@ class LLVM_ABI AsmPrinter : public MachineFunctionPass {
/// generating (such as the current section etc).
std::unique_ptr<MCStreamer> OutStreamer;
- /// The VFS to resolve asm include directives.
- IntrusiveRefCntPtr<vfs::FileSystem> VFS;
----------------
jansvoboda11 wrote:
Not a strictly necessary change, I think this might be a leftover from my attempt to make `AsmPrinter` sandbox-clean, which didn't pan out (very hard to propagate VFS from all clients).
The `VFS` was being set in `AsmPrinter::doInitialization()`, which the clients **always** call. I made the `VFS` local to `AsmPrinter::emitInlineAsm()` so that the sandbox is turned off only when necessary.
I can probably revert this and just turn off the sandbox in `AsmPrinter::doInitialization()` to minimize the diff, if you'd prefer.
https://github.com/llvm/llvm-project/pull/165350
More information about the llvm-commits
mailing list