Emit an error message if the value passed to __builtin_returnaddress isn't a constant
authorBill Wendling <isanbard@gmail.com>
Sun, 5 Jan 2014 01:47:20 +0000 (01:47 +0000)
committerBill Wendling <isanbard@gmail.com>
Sun, 5 Jan 2014 01:47:20 +0000 (01:47 +0000)
commit4a816471f527b90464806892feeecc242491a459
tree9ca957843b95ddfcd4da7de54fedaddbcbdaad75
parente43a0f801506cbc2f5a4e5ac020d23d9038aff4d
Emit an error message if the value passed to __builtin_returnaddress isn't a constant

__builtin_returnaddress requires that the value passed into is be a constant.
However, at -O0 even a constant expression may not be converted to a constant.
Emit an error message intead of crashing.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198531 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/AArch64/AArch64ISelLowering.cpp
lib/Target/ARM/ARMISelLowering.cpp
lib/Target/Hexagon/HexagonISelLowering.cpp
lib/Target/MSP430/MSP430ISelLowering.cpp
lib/Target/Mips/MipsISelLowering.cpp
lib/Target/PowerPC/PPCISelLowering.cpp
lib/Target/Sparc/SparcISelLowering.cpp
lib/Target/X86/X86ISelLowering.cpp
test/CodeGen/Generic/builtin-returnaddress-error.ll [new file with mode: 0644]