#include "llvm/IR/GlobalVariable.h"
#include "llvm/IR/InlineAsm.h"
#include "llvm/IR/Intrinsics.h"
-#include "llvm/IR/LLVMContext.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/ErrorHandling.h"
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);