summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/Hexagon
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2014-01-06 00:43:20 +0000
committerBill Wendling <isanbard@gmail.com>2014-01-06 00:43:20 +0000
commit908bf814e7ffdeaf857bf03b6f3d26bced4e7ea8 (patch)
tree19cdb6e3cc37c77b2e8b05903780a8d547f72a5b /llvm/lib/Target/Hexagon
parentf7fa730e616c3411cb43a4432a8db5c56d4d9668 (diff)
downloadbcm5719-llvm-908bf814e7ffdeaf857bf03b6f3d26bced4e7ea8.tar.gz
bcm5719-llvm-908bf814e7ffdeaf857bf03b6f3d26bced4e7ea8.zip
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. llvm-svn: 198579
Diffstat (limited to 'llvm/lib/Target/Hexagon')
-rw-r--r--llvm/lib/Target/Hexagon/HexagonISelLowering.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/llvm/lib/Target/Hexagon/HexagonISelLowering.cpp b/llvm/lib/Target/Hexagon/HexagonISelLowering.cpp
index e1e954afc51..1d82285317e 100644
--- a/llvm/lib/Target/Hexagon/HexagonISelLowering.cpp
+++ b/llvm/lib/Target/Hexagon/HexagonISelLowering.cpp
@@ -982,11 +982,8 @@ HexagonTargetLowering::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);
OpenPOWER on IntegriCloud