[RISCV] Define __riscv_cmodel_medlow and __riscv_cmodel_medany correctly
authorKito Cheng <kito.cheng@gmail.com>
Tue, 17 Sep 2019 08:09:56 +0000 (08:09 +0000)
committerKito Cheng <kito.cheng@gmail.com>
Tue, 17 Sep 2019 08:09:56 +0000 (08:09 +0000)
commit645593844164187a2de37b40e62cd790cfb48a03
tree0d790bd63cedfb8052a44b7507d1c67840f4326a
parent3ee98a1455cbd1ba6fcb3f74ddf137c503734a97
[RISCV] Define __riscv_cmodel_medlow and __riscv_cmodel_medany correctly

RISC-V LLVM was only implement small/medlow code model, so it defined
__riscv_cmodel_medlow directly without check.

Now, we have medium/medany code model in RISC-V back-end, it should
define according the actually code model.

Reviewed By: lewis-revill

Differential Revision: https://reviews.llvm.org/D67065

llvm-svn: 372078
clang/lib/Basic/Targets/RISCV.cpp
clang/test/Preprocessor/riscv-cmodel.c [new file with mode: 0644]