swiftlang/swift

[SR-7148] Compile-time conditionalization of endianness in the compiler should be done by target checking

Open

#49,696 创建于 2018年3月8日

在 GitHub 查看
 (5 评论) (0 反应) (0 负责人)Swift (10,719 fork)batch import
bugcompilergood first issue

仓库指标

Star
 (69,989 star)
PR 合并指标
 (平均合并 8天 17小时) (30 天内合并 510 个 PR)

描述

Previous ID SR-7148
Radar None
Original Reporter @jckarter
Type Bug
Votes 0
Component/s Compiler
Labels Bug, StarterBug
Assignee None
Priority Medium

md5: 7f26b7e8c0700431c7bacc1871180f85

Issue Description:

IRGen appears to have grown compile-time conditionalizations on host properties, e.g.:

https://github.com/apple/swift/blob/master/lib/IRGen/GenEnum.cpp#L3892

This is not correct if cross-compiling for a target with different endianness than the compiler host. This should check the properties of the target instead of being a #if

贡献者指南