Skip to content

[libc] Fix missing math_extras include #74356

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

Closed
wants to merge 1 commit into from

Conversation

michaelrj-google
Copy link
Contributor

The file integer_utils.h assumes it has access to the add_with_carry
function from math_extras.h, but did not have a direct include for that
file. This caused build errors on arm32 where the indirect include chain
was broken. This patch adds the missing include.

The file integer_utils.h assumes it has access to the add_with_carry
function from math_extras.h, but did not have a direct include for that
file. This caused build errors on arm32 where the indirect include chain
was broken. This patch adds the missing include.
@llvmbot llvmbot added the libc label Dec 4, 2023
@llvmbot
Copy link
Member

llvmbot commented Dec 4, 2023

@llvm/pr-subscribers-libc

Author: None (michaelrj-google)

Changes

The file integer_utils.h assumes it has access to the add_with_carry
function from math_extras.h, but did not have a direct include for that
file. This caused build errors on arm32 where the indirect include chain
was broken. This patch adds the missing include.


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

2 Files Affected:

  • (modified) libc/src/__support/CMakeLists.txt (+1)
  • (modified) libc/src/__support/integer_utils.h (+1)
diff --git a/libc/src/__support/CMakeLists.txt b/libc/src/__support/CMakeLists.txt
index ba80965b5aaaf..06e335c9dd8b5 100644
--- a/libc/src/__support/CMakeLists.txt
+++ b/libc/src/__support/CMakeLists.txt
@@ -190,6 +190,7 @@ add_header_library(
   DEPENDS
     .bit
     .number_pair
+    .math_extras
     libc.src.__support.common
     libc.src.__support.CPP.type_traits
 )
diff --git a/libc/src/__support/integer_utils.h b/libc/src/__support/integer_utils.h
index 433e99227bcfd..661318f03bfd3 100644
--- a/libc/src/__support/integer_utils.h
+++ b/libc/src/__support/integer_utils.h
@@ -13,6 +13,7 @@
 #include "src/__support/common.h"
 
 #include "bit.h"
+#include "math_extras.h"
 #include "number_pair.h"
 
 #include <stdint.h>

@michaelrj-google
Copy link
Contributor Author

I missed that #74259 existed when I created this patch. It's more complete and supersedes this patch.

@michaelrj-google michaelrj-google deleted the libcIntUtilsFix branch December 4, 2023 18:44
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.

2 participants