[llvm] [llvm][Support] Make sys::fs::file_t into a seperate type (PR #160588)

Alexandre Ganea via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 20 06:27:03 PST 2025


================
@@ -0,0 +1,57 @@
+//===----------------------------------------------------------------------===//
+//
+// 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
+//
+//===----------------------------------------------------------------------===//
+//
+/// \file
+/// This file declares llvm::sys::fs::file_t type.
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_SUPPORT_FILE_H
+#define LLVM_SUPPORT_FILE_H
+
+#include "llvm/Support/Compiler.h"
+
+namespace llvm::sys::fs {
+
+/// This class wraps the platform specific file handle/descriptor type to
+/// provide an unified representation.
+struct file_t {
----------------
aganea wrote:

What would "_t" mean in this context? Previously it was a short for "typedef", but here should we keep that? Or make it something more explicit, like `file`? `file_desc`? `file_descriptor`? `file_handle`?

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


More information about the llvm-commits mailing list