]> granicus.if.org Git - clang/commit
[RISCV] Create a LinuxTargetInfo when targeting Linux
authorAlex Bradbury <asb@lowrisc.org>
Sat, 3 Feb 2018 11:56:11 +0000 (11:56 +0000)
committerAlex Bradbury <asb@lowrisc.org>
Sat, 3 Feb 2018 11:56:11 +0000 (11:56 +0000)
commitf79c9a1752ced0887f7395040c17774bd6790fe5
tree98b93d3d1c4e3936698b95633f6344e34710a9c0
parent0f87312e2f27ecdb78b80d807a29c0d9785ebf7d
[RISCV] Create a LinuxTargetInfo when targeting Linux

Previously, RISCV32TargetInfo or RISCV64TargetInfo were created
unconditionally. Use LinuxTargetInfo<RISCV??TargetInfo> to ensure that the
proper OS-specific defines are present.

This patch only adds logic to instantiate LinuxTargetInfo and leaves a TODO,
as I'm reluctant to add logic for other targets (e.g. FreeBSD, RTEMS) until
I've produced and tested at least one binary for that OS+target combo.

Thanks to @mgrang to reporting the issue.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@324170 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Basic/Targets.cpp
test/Preprocessor/init.c