mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-25 20:56:06 +00:00
Add EmitReferenceBindingToExpr. Have EmitCallArg use it for now. Doesn't support anything but at least we don't crash ;)
llvm-svn: 72147
This commit is contained in:
parent
95fc37fd8f
commit
6f5a015bd9
@ -260,4 +260,3 @@ const char *CodeGenModule::getMangledCXXDtorName(const CXXDestructorDecl *D,
|
||||
Name += '\0';
|
||||
return UniqueMangledName(Name.begin(), Name.end());
|
||||
}
|
||||
|
||||
|
@ -2001,6 +2001,9 @@ void CodeGenFunction::EmitFunctionEpilog(const CGFunctionInfo &FI,
|
||||
}
|
||||
|
||||
RValue CodeGenFunction::EmitCallArg(const Expr *E, QualType ArgType) {
|
||||
if (ArgType->isReferenceType())
|
||||
return EmitReferenceBindingToExpr(E, ArgType);
|
||||
|
||||
return EmitAnyExprToTemp(E);
|
||||
}
|
||||
|
||||
|
@ -70,6 +70,13 @@ RValue CodeGenFunction::EmitAnyExprToTemp(const Expr *E, llvm::Value *AggLoc,
|
||||
return EmitAnyExpr(E, AggLoc, isAggLocVolatile);
|
||||
}
|
||||
|
||||
RValue CodeGenFunction::EmitReferenceBindingToExpr(const Expr* E,
|
||||
QualType DestType) {
|
||||
CGM.ErrorUnsupported(E, "reference binding");
|
||||
return GetUndefRValue(DestType);
|
||||
}
|
||||
|
||||
|
||||
/// getAccessedFieldNo - Given an encoded value and a result number, return
|
||||
/// the input field number being accessed.
|
||||
unsigned CodeGenFunction::getAccessedFieldNo(unsigned Idx,
|
||||
|
@ -708,6 +708,10 @@ public:
|
||||
void EmitObjCSuperPropertySet(const Expr *E, const Selector &S, RValue Src);
|
||||
|
||||
|
||||
/// EmitReferenceBindingToExpr - Emits a reference binding to the passed in
|
||||
/// expression. Will emit a temporary variable if E is not an LValue.
|
||||
RValue EmitReferenceBindingToExpr(const Expr* E, QualType DestType);
|
||||
|
||||
//===--------------------------------------------------------------------===//
|
||||
// Expression Emission
|
||||
//===--------------------------------------------------------------------===//
|
||||
|
Loading…
x
Reference in New Issue
Block a user