File tree Expand file tree Collapse file tree 6 files changed +8
-8
lines changed Expand file tree Collapse file tree 6 files changed +8
-8
lines changed Original file line number Diff line number Diff line change 54
54
// / According to the Objective-C ABI, this is true only for 64-bit
55
55
// / platforms.
56
56
#ifndef SWIFT_HAS_ISA_MASKING
57
- #if SWIFT_OBJC_INTEROP && defined(__LP64__)
57
+ #if SWIFT_OBJC_INTEROP && __POINTER_WIDTH__ == 64
58
58
#define SWIFT_HAS_ISA_MASKING 1
59
59
#else
60
60
#define SWIFT_HAS_ISA_MASKING 0
Original file line number Diff line number Diff line change @@ -660,7 +660,7 @@ const ExtraInhabitantsValueWitnessTable METATYPE_VALUE_WITNESS_SYM(Bo); // Built
660
660
661
661
// / Return the value witnesses for unmanaged pointers.
662
662
static inline const ValueWitnessTable &getUnmanagedPointerValueWitnesses () {
663
- #ifdef __LP64__
663
+ #if __POINTER_WIDTH__ == 64
664
664
return VALUE_WITNESS_SYM (Bi64_);
665
665
#else
666
666
return VALUE_WITNESS_SYM (Bi32_);
Original file line number Diff line number Diff line change @@ -733,14 +733,14 @@ class SideTableRefCountBits : public RefCountBitsT<RefCountNotInline>
733
733
template <typename RefCountBits>
734
734
class RefCounts {
735
735
std::atomic<RefCountBits> refCounts;
736
- #if !__LP64__
736
+ #if __POINTER_WIDTH__ == 32
737
737
// FIXME: hack - something somewhere is assuming a 3-word header on 32-bit
738
738
// See also other fixmes marked "small header for 32-bit"
739
739
uintptr_t unused SWIFT_ATTRIBUTE_UNAVAILABLE;
740
740
#endif
741
741
742
742
// Out-of-line slow paths.
743
-
743
+
744
744
LLVM_ATTRIBUTE_NOINLINE
745
745
void incrementSlow (RefCountBits oldbits, uint32_t inc);
746
746
@@ -773,7 +773,7 @@ class RefCounts {
773
773
// Refcount of a new object is 1.
774
774
constexpr RefCounts (Initialized_t)
775
775
: refCounts(RefCountBits(0 , 1 ))
776
- #if !__LP64__ && !__has_attribute(unavailable)
776
+ #if __POINTER_WIDTH__ == 32 && !__has_attribute(unavailable)
777
777
, unused(0 )
778
778
#endif
779
779
{ }
Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ constexpr const char TypeMetadataRecordSection[] = "__swift2_types";
39
39
template <const char *SECTION_NAME,
40
40
void CONSUME_BLOCK (const void *start, uintptr_t size)>
41
41
void addImageCallback(const mach_header *mh, intptr_t vmaddr_slide) {
42
- #ifdef __LP64__
42
+ #if __POINTER_WIDTH__ == 64
43
43
using mach_header_platform = mach_header_64;
44
44
assert (mh->magic == MH_MAGIC_64 && " loaded non-64-bit image?!" );
45
45
#else
Original file line number Diff line number Diff line change @@ -1194,7 +1194,7 @@ namespace {
1194
1194
uint32_t Flags;
1195
1195
uint32_t InstanceStart;
1196
1196
uint32_t InstanceSize;
1197
- #ifdef __LP64__
1197
+ #if __POINTER_WIDTH__ == 64
1198
1198
uint32_t Reserved;
1199
1199
#endif
1200
1200
const uint8_t *IvarLayout;
Original file line number Diff line number Diff line change 37
37
using namespace std ;
38
38
using namespace llvm ;
39
39
40
- #ifdef __LP64__
40
+ #if __POINTER_WIDTH__ == 64
41
41
#define ELFCLASS ELFCLASS64
42
42
typedef Elf64_Ehdr Elf_Ehdr;
43
43
typedef Elf64_Shdr Elf_Shdr;
You can’t perform that action at this time.
0 commit comments