[Lldb-commits] [lldb] [lldb][Posix] Remove unused includes in file system (PR #121913)
via lldb-commits
lldb-commits at lists.llvm.org
Tue Jan 7 02:48:19 PST 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-lldb
Author: David Spickett (DavidSpickett)
<details>
<summary>Changes</summary>
You could remove unistd.h and it builds, but only because something else included it. So I've left it in in the spirit of "include what you use".
Tested on Linux and FreeBSD.
---
Full diff: https://github.com/llvm/llvm-project/pull/121913.diff
1 Files Affected:
- (modified) lldb/source/Host/posix/FileSystemPosix.cpp (-5)
``````````diff
diff --git a/lldb/source/Host/posix/FileSystemPosix.cpp b/lldb/source/Host/posix/FileSystemPosix.cpp
index 945e2affc83715..d2e5b52917ac26 100644
--- a/lldb/source/Host/posix/FileSystemPosix.cpp
+++ b/lldb/source/Host/posix/FileSystemPosix.cpp
@@ -9,12 +9,7 @@
#include "lldb/Host/FileSystem.h"
// C includes
-#include <dirent.h>
#include <fcntl.h>
-#include <sys/mount.h>
-#include <sys/param.h>
-#include <sys/stat.h>
-#include <sys/types.h>
#include <unistd.h>
#if defined(__NetBSD__)
#include <sys/statvfs.h>
``````````
</details>
https://github.com/llvm/llvm-project/pull/121913
More information about the lldb-commits
mailing list