Skip to content

[libc][NFC] Swap ifdef logic for UInt128 #75160

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 12, 2023

Conversation

gchatelet
Copy link
Contributor

No description provided.

@llvmbot
Copy link
Member

llvmbot commented Dec 12, 2023

@llvm/pr-subscribers-libc

Author: Guillaume Chatelet (gchatelet)

Changes

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

1 Files Affected:

  • (modified) libc/src/__support/UInt128.h (+4-4)
diff --git a/libc/src/__support/UInt128.h b/libc/src/__support/UInt128.h
index 2f688f1f31cb56..0558e5095f9f51 100644
--- a/libc/src/__support/UInt128.h
+++ b/libc/src/__support/UInt128.h
@@ -11,12 +11,12 @@
 
 #include "UInt.h"
 
-#if !defined(__SIZEOF_INT128__)
-using UInt128 = LIBC_NAMESPACE::cpp::UInt<128>;
-using Int128 = LIBC_NAMESPACE::cpp::Int<128>;
-#else
+#if defined(__SIZEOF_INT128__)
 using UInt128 = __uint128_t;
 using Int128 = __int128_t;
+#else
+using UInt128 = LIBC_NAMESPACE::cpp::UInt<128>;
+using Int128 = LIBC_NAMESPACE::cpp::Int<128>;
 #endif
 
 #endif // LLVM_LIBC_SRC___SUPPORT_UINT128_H

@gchatelet gchatelet merged commit 2bab0e0 into llvm:main Dec 12, 2023
@gchatelet gchatelet deleted the swap_ifdef_logic branch December 12, 2023 10: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.

3 participants