diff options
author | Bill Wendling <isanbard@gmail.com> | 2014-01-06 00:43:20 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2014-01-06 00:43:20 +0000 |
commit | 4644d79871d5c337608dff99816ddbdc40cb1175 (patch) | |
tree | c48572a9ed99ae6272ea444c0430eacf984e9b69 /lib/Target/ARM | |
parent | 7f1068198534f563fa7640056ec1d595e6662c09 (diff) | |
download | llvm-4644d79871d5c337608dff99816ddbdc40cb1175.tar.gz llvm-4644d79871d5c337608dff99816ddbdc40cb1175.tar.bz2 llvm-4644d79871d5c337608dff99816ddbdc40cb1175.tar.xz |
Refactor function that checks that __builtin_returnaddress's argument is constant.
This moves the check up into the parent class so that all targets can use it
without having to copy (and keep in sync) the same error message.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198579 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/ARM')
-rw-r--r-- | lib/Target/ARM/ARMISelLowering.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/lib/Target/ARM/ARMISelLowering.cpp b/lib/Target/ARM/ARMISelLowering.cpp index ef165dc06e..841b2ab2fd 100644 --- a/lib/Target/ARM/ARMISelLowering.cpp +++ b/lib/Target/ARM/ARMISelLowering.cpp @@ -3753,11 +3753,8 @@ SDValue ARMTargetLowering::LowerRETURNADDR(SDValue Op, SelectionDAG &DAG) const{ MachineFrameInfo *MFI = MF.getFrameInfo(); MFI->setReturnAddressIsTaken(true); - if (!isa<ConstantSDNode>(Op.getOperand(0))) { - DAG.getContext()->emitError("argument to '__builtin_return_address' must " - "be a constant integer"); + if (verifyReturnAddressArgumentIsConstant(Op, DAG)) return SDValue(); - } EVT VT = Op.getValueType(); SDLoc dl(Op); |