[clang] [llvm] [llvm][clang] Sandbox filesystem reads (PR #165350)

Ben Langmuir via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 6 15:10:02 PST 2025


================
@@ -0,0 +1,41 @@
+//===- IOSandbox.h ----------------------------------------------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_SUPPORT_IOSANDBOX_H
+#define LLVM_SUPPORT_IOSANDBOX_H
+
+#if defined(LLVM_ENABLE_IO_SANDBOX) && LLVM_ENABLE_IO_SANDBOX
+
+#include "llvm/Support/ErrorHandling.h"
+#include "llvm/Support/SaveAndRestore.h"
+
+namespace llvm::sys::sandbox {
+inline thread_local bool Enabled = false;
----------------
benlangmuir wrote:

`LLVM_THREAD_LOCAL` maybe?

https://github.com/llvm/llvm-project/pull/165350


More information about the llvm-commits mailing list