[cfe-commits] r90411 - in /cfe/trunk/lib/CodeGen: CGCXX.cpp CodeGenFunction.h CodeGenModule.h
Eli Friedman
eli.friedman at gmail.com
Wed Dec 2 20:27:10 PST 2009
Author: efriedma
Date: Wed Dec 2 22:27:05 2009
New Revision: 90411
URL: http://llvm.org/viewvc/llvm-project?rev=90411&view=rev
Log:
Minor cleanup.
Modified:
cfe/trunk/lib/CodeGen/CGCXX.cpp
cfe/trunk/lib/CodeGen/CodeGenFunction.h
cfe/trunk/lib/CodeGen/CodeGenModule.h
Modified: cfe/trunk/lib/CodeGen/CGCXX.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGCXX.cpp?rev=90411&r1=90410&r2=90411&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGCXX.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGCXX.cpp Wed Dec 2 22:27:05 2009
@@ -829,7 +829,7 @@
}
llvm::Constant *
-CodeGenFunction::GenerateThunk(llvm::Function *Fn, const GlobalDecl &GD,
+CodeGenFunction::GenerateThunk(llvm::Function *Fn, GlobalDecl GD,
bool Extern,
const ThunkAdjustment &ThisAdjustment) {
return GenerateCovariantThunk(Fn, GD, Extern,
@@ -875,9 +875,8 @@
llvm::Constant *
CodeGenFunction::GenerateCovariantThunk(llvm::Function *Fn,
- const GlobalDecl &GD, bool Extern,
+ GlobalDecl GD, bool Extern,
const CovariantThunkAdjustment &Adjustment) {
-
const CXXMethodDecl *MD = cast<CXXMethodDecl>(GD.getDecl());
QualType ResultType = MD->getType()->getAs<FunctionType>()->getResultType();
@@ -908,11 +907,7 @@
const llvm::Type *Ty =
CGM.getTypes().GetFunctionType(CGM.getTypes().getFunctionInfo(MD),
FPT->isVariadic());
- llvm::Value *Callee;
- if (const CXXDestructorDecl *Dtor = dyn_cast<CXXDestructorDecl>(MD))
- Callee = CGM.GetAddrOfCXXDestructor(Dtor, GD.getDtorType());
- else
- Callee = CGM.GetAddrOfFunction(MD, Ty);
+ llvm::Value *Callee = CGM.GetAddrOfFunction(GD, Ty);
CallArgList CallArgs;
@@ -990,7 +985,7 @@
}
llvm::Constant *
-CodeGenModule::BuildThunk(const GlobalDecl &GD, bool Extern,
+CodeGenModule::BuildThunk(GlobalDecl GD, bool Extern,
const ThunkAdjustment &ThisAdjustment) {
const CXXMethodDecl *MD = cast<CXXMethodDecl>(GD.getDecl());
llvm::SmallString<256> OutName;
Modified: cfe/trunk/lib/CodeGen/CodeGenFunction.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CodeGenFunction.h?rev=90411&r1=90410&r2=90411&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CodeGenFunction.h (original)
+++ cfe/trunk/lib/CodeGen/CodeGenFunction.h Wed Dec 2 22:27:05 2009
@@ -452,11 +452,11 @@
const ThunkAdjustment &Adjustment);
/// GenerateThunk - Generate a thunk for the given method
- llvm::Constant *GenerateThunk(llvm::Function *Fn, const GlobalDecl &GD,
+ llvm::Constant *GenerateThunk(llvm::Function *Fn, GlobalDecl GD,
bool Extern,
const ThunkAdjustment &ThisAdjustment);
llvm::Constant *
- GenerateCovariantThunk(llvm::Function *Fn, const GlobalDecl &GD,
+ GenerateCovariantThunk(llvm::Function *Fn, GlobalDecl GD,
bool Extern,
const CovariantThunkAdjustment &Adjustment);
Modified: cfe/trunk/lib/CodeGen/CodeGenModule.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CodeGenModule.h?rev=90411&r1=90410&r2=90411&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CodeGenModule.h (original)
+++ cfe/trunk/lib/CodeGen/CodeGenModule.h Wed Dec 2 22:27:05 2009
@@ -234,7 +234,7 @@
llvm::Constant *GenerateRTTI(QualType Ty);
/// BuildThunk - Build a thunk for the given method.
- llvm::Constant *BuildThunk(const GlobalDecl &GD, bool Extern,
+ llvm::Constant *BuildThunk(GlobalDecl GD, bool Extern,
const ThunkAdjustment &ThisAdjustment);
/// BuildCoVariantThunk - Build a thunk for the given method
More information about the cfe-commits
mailing list