Skip to content

[libc][NFC] clean up some includes #99719

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 22, 2024

Conversation

michaelrj-google
Copy link
Contributor

While looking through the list of includes for #99693 I found these
includes that also need to be cleaned up. I removed the extra includes
in expm1.cpp, but the include in thread.h needs more attention so I just
marked it with a todo.

@llvmbot llvmbot added the libc label Jul 19, 2024
@llvmbot
Copy link
Member

llvmbot commented Jul 19, 2024

@llvm/pr-subscribers-libc

Author: Michael Jones (michaelrj-google)

Changes

While looking through the list of includes for #99693 I found these
includes that also need to be cleaned up. I removed the extra includes
in expm1.cpp, but the include in thread.h needs more attention so I just
marked it with a todo.


Full diff: https://github.com/llvm/llvm-project/pull/99719.diff

2 Files Affected:

  • (modified) libc/src/__support/threads/thread.h (+1)
  • (modified) libc/src/math/generic/expm1.cpp (-7)
diff --git a/libc/src/__support/threads/thread.h b/libc/src/__support/threads/thread.h
index ce23a880e048a..5950a4dfb3e53 100644
--- a/libc/src/__support/threads/thread.h
+++ b/libc/src/__support/threads/thread.h
@@ -17,6 +17,7 @@
 #include "src/__support/macros/config.h"
 #include "src/__support/macros/properties/architectures.h"
 
+// TODO: fix this unguarded linux dep
 #include <linux/param.h> // for exec_pagesize.
 
 #include <stddef.h> // For size_t
diff --git a/libc/src/math/generic/expm1.cpp b/libc/src/math/generic/expm1.cpp
index d9485864df899..a4dbf38ab27d0 100644
--- a/libc/src/math/generic/expm1.cpp
+++ b/libc/src/math/generic/expm1.cpp
@@ -30,13 +30,6 @@
 #define LIBC_MATH_EXPM1_SKIP_ACCURATE_PASS
 #endif
 
-// #define DEBUGDEBUG
-
-#ifdef DEBUGDEBUG
-#include <iomanip>
-#include <iostream>
-#endif
-
 namespace LIBC_NAMESPACE_DECL {
 
 using fputil::DoubleDouble;

While looking through the list of includes for llvm#99693 I found these
includes that also need to be cleaned up. I removed the extra includes
in expm1.cpp, but the include in thread.h needs more attention so I just
marked it with a todo.
@michaelrj-google michaelrj-google merged commit 9da0871 into llvm:main Jul 22, 2024
4 of 5 checks passed
@michaelrj-google michaelrj-google deleted the libcIncludeCleanup branch July 22, 2024 21:54
yuxuanchen1997 pushed a commit that referenced this pull request Jul 25, 2024
Summary:
While looking through the list of includes for #99693 I found these
includes that also need to be cleaned up. I removed the extra includes
in expm1.cpp, but the include in thread.h needs more attention so I just
marked it with a todo.

Test Plan: 

Reviewers: 

Subscribers: 

Tasks: 

Tags: 


Differential Revision: https://phabricator.intern.facebook.com/D60251307
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants