summaryrefslogtreecommitdiff
path: root/include/llvm/Target/TargetLowering.h
diff options
context:
space:
mode:
authorSaleem Abdulrasool <compnerd@compnerd.org>2014-05-17 21:50:01 +0000
committerSaleem Abdulrasool <compnerd@compnerd.org>2014-05-17 21:50:01 +0000
commitd825568843af30f761696f86276d93fc29c9e74c (patch)
treead4afe683d179d4697f6bec2eff516c291ebe769 /include/llvm/Target/TargetLowering.h
parenta53c7657451d9c4db1cb434e78863a73805bb3c9 (diff)
downloadllvm-d825568843af30f761696f86276d93fc29c9e74c.tar.gz
llvm-d825568843af30f761696f86276d93fc29c9e74c.tar.bz2
llvm-d825568843af30f761696f86276d93fc29c9e74c.tar.xz
Target: change member from reference to pointer
This is a preliminary step to help ease the construction of CallLoweringInfo. Changing the construction to a chained function pattern requires that the parameter be nullable. However, rather than copying the vector, save a pointer rather than the reference to permit a late binding of the arguments. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209080 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Target/TargetLowering.h')
-rw-r--r--include/llvm/Target/TargetLowering.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/include/llvm/Target/TargetLowering.h b/include/llvm/Target/TargetLowering.h
index dc2c74a835..63a95411b5 100644
--- a/include/llvm/Target/TargetLowering.h
+++ b/include/llvm/Target/TargetLowering.h
@@ -2111,7 +2111,7 @@ public:
unsigned NumFixedArgs;
CallingConv::ID CallConv;
SDValue Callee;
- ArgListTy &Args;
+ ArgListTy *Args;
SelectionDAG &DAG;
SDLoc DL;
ImmutableCallSite *CS;
@@ -2131,7 +2131,7 @@ public:
DoesNotReturn(cs.doesNotReturn()),
IsReturnValueUsed(!cs.getInstruction()->use_empty()),
IsTailCall(isTailCall), NumFixedArgs(FTy->getNumParams()),
- CallConv(cs.getCallingConv()), Callee(callee), Args(args), DAG(dag),
+ CallConv(cs.getCallingConv()), Callee(callee), Args(&args), DAG(dag),
DL(dl), CS(&cs) {}
/// Constructs a call lowering context based on the provided call
@@ -2145,7 +2145,12 @@ public:
IsVarArg(isVarArg), IsInReg(isInReg), DoesNotReturn(doesNotReturn),
IsReturnValueUsed(isReturnValueUsed), IsTailCall(isTailCall),
NumFixedArgs(numFixedArgs), CallConv(callConv), Callee(callee),
- Args(args), DAG(dag), DL(dl), CS(nullptr) {}
+ Args(&args), DAG(dag), DL(dl), CS(nullptr) {}
+
+ ArgListTy &getArgs() {
+ assert(Args && "Arguments must be set before accessing them");
+ return *Args;
+ }
};
/// This function lowers an abstract call to a function into an actual call.