diff options
author | Eli Friedman <eli.friedman@gmail.com> | 2009-12-03 04:27:05 +0000 |
---|---|---|
committer | Eli Friedman <eli.friedman@gmail.com> | 2009-12-03 04:27:05 +0000 |
commit | 551fe84d0ef50f7ef16f8b68276caecd881cb900 (patch) | |
tree | 7f0c806abea8dfb4ad01bc0b05508a1dbf2f1e69 /clang/lib/CodeGen | |
parent | 6e9f8f63743495e7a4e07b06e0209560661e5c8d (diff) | |
download | bcm5719-llvm-551fe84d0ef50f7ef16f8b68276caecd881cb900.tar.gz bcm5719-llvm-551fe84d0ef50f7ef16f8b68276caecd881cb900.zip |
Minor cleanup.
llvm-svn: 90411
Diffstat (limited to 'clang/lib/CodeGen')
-rw-r--r-- | clang/lib/CodeGen/CGCXX.cpp | 13 | ||||
-rw-r--r-- | clang/lib/CodeGen/CodeGenFunction.h | 4 | ||||
-rw-r--r-- | clang/lib/CodeGen/CodeGenModule.h | 2 |
3 files changed, 7 insertions, 12 deletions
diff --git a/clang/lib/CodeGen/CGCXX.cpp b/clang/lib/CodeGen/CGCXX.cpp index 2fa13eb12d0..77d3a3eb425 100644 --- a/clang/lib/CodeGen/CGCXX.cpp +++ b/clang/lib/CodeGen/CGCXX.cpp @@ -829,7 +829,7 @@ const char *CodeGenModule::getMangledCXXDtorName(const CXXDestructorDecl *D, } 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 @@ CodeGenFunction::DynamicTypeAdjust(llvm::Value *V, 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 @@ CodeGenFunction::GenerateCovariantThunk(llvm::Function *Fn, 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 @@ CodeGenFunction::GenerateCovariantThunk(llvm::Function *Fn, } 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; diff --git a/clang/lib/CodeGen/CodeGenFunction.h b/clang/lib/CodeGen/CodeGenFunction.h index 43c968bb133..0838cf0f814 100644 --- a/clang/lib/CodeGen/CodeGenFunction.h +++ b/clang/lib/CodeGen/CodeGenFunction.h @@ -452,11 +452,11 @@ public: 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); diff --git a/clang/lib/CodeGen/CodeGenModule.h b/clang/lib/CodeGen/CodeGenModule.h index dbe9c95bf9d..b0e1b12ed93 100644 --- a/clang/lib/CodeGen/CodeGenModule.h +++ b/clang/lib/CodeGen/CodeGenModule.h @@ -234,7 +234,7 @@ public: 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 |