Skip to content

[ADT] Make use of the endian.h header on NetBSD and DragonFly #74037

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
Dec 1, 2023

Conversation

brad0
Copy link
Contributor

@brad0 brad0 commented Dec 1, 2023

Move away from machine/endian.h to POSIX endian.h header.

@llvmbot
Copy link
Member

llvmbot commented Dec 1, 2023

@llvm/pr-subscribers-llvm-adt

Author: Brad Smith (brad0)

Changes

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

1 Files Affected:

  • (modified) llvm/include/llvm/ADT/bit.h (+2-1)
diff --git a/llvm/include/llvm/ADT/bit.h b/llvm/include/llvm/ADT/bit.h
index 12223facbb30500..266feb65c20ae9b 100644
--- a/llvm/include/llvm/ADT/bit.h
+++ b/llvm/include/llvm/ADT/bit.h
@@ -28,7 +28,8 @@
 #endif
 
 #if defined(__linux__) || defined(__GNU__) || defined(__HAIKU__) ||            \
-    defined(__Fuchsia__) || defined(__EMSCRIPTEN__) || defined(__OpenBSD__)
+    defined(__Fuchsia__) || defined(__EMSCRIPTEN__) || defined(__NetBSD__) ||  \
+    defined(__OpenBSD__)
 #include <endian.h>
 #elif defined(_AIX)
 #include <sys/machine.h>

Copy link
Collaborator

@dwblaikie dwblaikie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, if that works - might be worth noting in the commit message what benefit/effect this has.

@brad0 brad0 force-pushed the adt_netbsd_endian branch from 889e075 to 76a4135 Compare December 1, 2023 05:44
Move away from machine/endian.h to POSIX endian.h header.
@brad0 brad0 force-pushed the adt_netbsd_endian branch from 76a4135 to dc797d8 Compare December 1, 2023 05:58
@brad0 brad0 changed the title [ADT] Make use of the endian.h header on NetBSD [ADT] Make use of the endian.h header on NetBSD and DragonFly Dec 1, 2023
@brad0
Copy link
Contributor Author

brad0 commented Dec 1, 2023

Sure, if that works - might be worth noting in the commit message what benefit/effect this has.

Ok, done.

@brad0 brad0 merged commit 71ba05b into llvm:main Dec 1, 2023
@brad0 brad0 deleted the adt_netbsd_endian branch December 1, 2023 06:25
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