forked from OSchip/llvm-project
GlobalDecl doesn't have an explicit constructor anymore.
llvm-svn: 81481
This commit is contained in:
parent
38988d7ee0
commit
ecf9bf0158
|
@ -227,7 +227,7 @@ RValue CodeGenFunction::EmitCXXMemberCallExpr(const CXXMemberCallExpr *CE) {
|
|||
= dyn_cast<CXXDestructorDecl>(MD))
|
||||
Callee = CGM.GetAddrOfFunction(GlobalDecl(Destructor, Dtor_Complete), Ty);
|
||||
else
|
||||
Callee = CGM.GetAddrOfFunction(GlobalDecl(MD), Ty);
|
||||
Callee = CGM.GetAddrOfFunction(MD, Ty);
|
||||
|
||||
return EmitCXXMemberCall(MD, Callee, This,
|
||||
CE->arg_begin(), CE->arg_end());
|
||||
|
@ -256,7 +256,7 @@ CodeGenFunction::EmitCXXOperatorMemberCallExpr(const CXXOperatorCallExpr *E,
|
|||
const llvm::Type *Ty =
|
||||
CGM.getTypes().GetFunctionType(CGM.getTypes().getFunctionInfo(MD),
|
||||
FPT->isVariadic());
|
||||
llvm::Constant *Callee = CGM.GetAddrOfFunction(GlobalDecl(MD), Ty);
|
||||
llvm::Constant *Callee = CGM.GetAddrOfFunction(MD, Ty);
|
||||
|
||||
llvm::Value *This = EmitLValue(E->getArg(0)).getAddress();
|
||||
|
||||
|
@ -576,8 +576,7 @@ llvm::Value *CodeGenFunction::EmitCXXNewExpr(const CXXNewExpr *E) {
|
|||
// Emit the call to new.
|
||||
RValue RV =
|
||||
EmitCall(CGM.getTypes().getFunctionInfo(NewFTy->getResultType(), NewArgs),
|
||||
CGM.GetAddrOfFunction(GlobalDecl(NewFD)),
|
||||
NewArgs, NewFD);
|
||||
CGM.GetAddrOfFunction(NewFD), NewArgs, NewFD);
|
||||
|
||||
// If an allocation function is declared with an empty exception specification
|
||||
// it returns null to indicate failure to allocate storage. [expr.new]p13.
|
||||
|
@ -699,7 +698,7 @@ void CodeGenFunction::EmitCXXDeleteExpr(const CXXDeleteExpr *E) {
|
|||
// Emit the call to delete.
|
||||
EmitCall(CGM.getTypes().getFunctionInfo(DeleteFTy->getResultType(),
|
||||
DeleteArgs),
|
||||
CGM.GetAddrOfFunction(GlobalDecl(DeleteFD)),
|
||||
CGM.GetAddrOfFunction(DeleteFD),
|
||||
DeleteArgs, DeleteFD);
|
||||
|
||||
EmitBlock(DeleteEnd);
|
||||
|
@ -900,7 +899,7 @@ public:
|
|||
mi != e; ++mi) {
|
||||
const CXXMethodDecl *OMD = *mi;
|
||||
llvm::Constant *om;
|
||||
om = CGM.GetAddrOfFunction(GlobalDecl(OMD), Ptr8Ty);
|
||||
om = CGM.GetAddrOfFunction(OMD, Ptr8Ty);
|
||||
om = llvm::ConstantExpr::getBitCast(om, Ptr8Ty);
|
||||
|
||||
for (Index_t i = 0, e = submethods.size();
|
||||
|
@ -964,8 +963,7 @@ public:
|
|||
++mi)
|
||||
if (mi->isVirtual()) {
|
||||
const CXXMethodDecl *MD = *mi;
|
||||
llvm::Constant *m = wrap(CGM.GetAddrOfFunction(GlobalDecl(MD),
|
||||
Ptr8Ty));
|
||||
llvm::Constant *m = wrap(CGM.GetAddrOfFunction(MD, Ptr8Ty));
|
||||
OverrideMethod(MD, m, MorallyVirtual, Offset);
|
||||
}
|
||||
}
|
||||
|
@ -1440,7 +1438,7 @@ void CodeGenFunction::EmitClassAggrCopyAssignment(llvm::Value *Dest,
|
|||
const llvm::Type *LTy =
|
||||
CGM.getTypes().GetFunctionType(CGM.getTypes().getFunctionInfo(MD),
|
||||
FPT->isVariadic());
|
||||
llvm::Constant *Callee = CGM.GetAddrOfFunction(GlobalDecl(MD), LTy);
|
||||
llvm::Constant *Callee = CGM.GetAddrOfFunction(MD, LTy);
|
||||
|
||||
CallArgList CallArgs;
|
||||
// Push the this (Dest) ptr.
|
||||
|
@ -1532,7 +1530,7 @@ void CodeGenFunction::EmitClassCopyAssignment(
|
|||
const llvm::Type *LTy =
|
||||
CGM.getTypes().GetFunctionType(CGM.getTypes().getFunctionInfo(MD),
|
||||
FPT->isVariadic());
|
||||
llvm::Constant *Callee = CGM.GetAddrOfFunction(GlobalDecl(MD), LTy);
|
||||
llvm::Constant *Callee = CGM.GetAddrOfFunction(MD, LTy);
|
||||
|
||||
CallArgList CallArgs;
|
||||
// Push the this (Dest) ptr.
|
||||
|
|
|
@ -468,7 +468,7 @@ void CodeGenFunction::EmitLocalBlockVarDecl(const VarDecl &D) {
|
|||
if (const CleanupAttr *CA = D.getAttr<CleanupAttr>()) {
|
||||
const FunctionDecl *FD = CA->getFunctionDecl();
|
||||
|
||||
llvm::Constant* F = CGM.GetAddrOfFunction(GlobalDecl(FD));
|
||||
llvm::Constant* F = CGM.GetAddrOfFunction(FD);
|
||||
assert(F && "Could not find function!");
|
||||
|
||||
CleanupScope scope(*this);
|
||||
|
|
|
@ -744,7 +744,7 @@ LValue CodeGenFunction::EmitDeclRefLValue(const DeclRefExpr *E) {
|
|||
LV.SetGlobalObjCRef(LV, true);
|
||||
return LV;
|
||||
} else if (const FunctionDecl *FD = dyn_cast<FunctionDecl>(E->getDecl())) {
|
||||
llvm::Value* V = CGM.GetAddrOfFunction(GlobalDecl(FD));
|
||||
llvm::Value* V = CGM.GetAddrOfFunction(FD);
|
||||
if (!FD->hasPrototype()) {
|
||||
if (const FunctionProtoType *Proto =
|
||||
FD->getType()->getAsFunctionProtoType()) {
|
||||
|
|
|
@ -601,7 +601,7 @@ public:
|
|||
case Expr::QualifiedDeclRefExprClass: {
|
||||
NamedDecl *Decl = cast<DeclRefExpr>(E)->getDecl();
|
||||
if (const FunctionDecl *FD = dyn_cast<FunctionDecl>(Decl))
|
||||
return CGM.GetAddrOfFunction(GlobalDecl(FD));
|
||||
return CGM.GetAddrOfFunction(FD);
|
||||
if (const VarDecl* VD = dyn_cast<VarDecl>(Decl)) {
|
||||
// We can never refer to a variable with local storage.
|
||||
if (!VD->hasLocalStorage()) {
|
||||
|
|
|
@ -743,7 +743,7 @@ void CodeGenModule::DeferredCopyAssignmentToEmit(GlobalDecl CopyAssignDecl) {
|
|||
if (!BaseClassDecl->hasTrivialCopyAssignment() &&
|
||||
!BaseClassDecl->hasUserDeclaredCopyAssignment() &&
|
||||
BaseClassDecl->hasConstCopyAssignment(getContext(), MD))
|
||||
GetAddrOfFunction(GlobalDecl(MD), 0);
|
||||
GetAddrOfFunction(MD, 0);
|
||||
}
|
||||
|
||||
for (CXXRecordDecl::field_iterator Field = ClassDecl->field_begin(),
|
||||
|
@ -761,7 +761,7 @@ void CodeGenModule::DeferredCopyAssignmentToEmit(GlobalDecl CopyAssignDecl) {
|
|||
if (!FieldClassDecl->hasTrivialCopyAssignment() &&
|
||||
!FieldClassDecl->hasUserDeclaredCopyAssignment() &&
|
||||
FieldClassDecl->hasConstCopyAssignment(getContext(), MD))
|
||||
GetAddrOfFunction(GlobalDecl(MD), 0);
|
||||
GetAddrOfFunction(MD, 0);
|
||||
}
|
||||
}
|
||||
DeferredDeclsToEmit.push_back(CopyAssignDecl);
|
||||
|
@ -919,7 +919,7 @@ void CodeGenModule::EmitTentativeDefinition(const VarDecl *D) {
|
|||
// later.
|
||||
const char *MangledName = getMangledName(D);
|
||||
if (GlobalDeclMap.count(MangledName) == 0) {
|
||||
DeferredDecls[MangledName] = GlobalDecl(D);
|
||||
DeferredDecls[MangledName] = D;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -1640,10 +1640,11 @@ void CodeGenModule::EmitTopLevelDecl(Decl *D) {
|
|||
if (cast<FunctionDecl>(D)->getDescribedFunctionTemplate())
|
||||
return;
|
||||
|
||||
// Fall through
|
||||
|
||||
EmitGlobal(cast<FunctionDecl>(D));
|
||||
break;
|
||||
|
||||
case Decl::Var:
|
||||
EmitGlobal(GlobalDecl(cast<VarDecl>(D)));
|
||||
EmitGlobal(cast<VarDecl>(D));
|
||||
break;
|
||||
|
||||
// C++ Decls
|
||||
|
|
Loading…
Reference in New Issue