diff options
| author | Timur Iskhodzhanov <timurrrr@google.com> | 2012-04-20 08:05:00 +0000 |
|---|---|---|
| committer | Timur Iskhodzhanov <timurrrr@google.com> | 2012-04-20 08:05:00 +0000 |
| commit | f32a377a7c2e619e79666d8c5181009786c732fe (patch) | |
| tree | 8dd1b07c571655f1658cf58cc6f183b842977424 /clang/lib/CodeGen | |
| parent | c7242e054ddba4ad0514cb632903bfa0aa1461f5 (diff) | |
| download | bcm5719-llvm-f32a377a7c2e619e79666d8c5181009786c732fe.tar.gz bcm5719-llvm-f32a377a7c2e619e79666d8c5181009786c732fe.zip | |
Fix bug 12574 - Avoid infinite recursion in constructors and destructors when using Microsoft C++ ABI
llvm-svn: 155189
Diffstat (limited to 'clang/lib/CodeGen')
| -rw-r--r-- | clang/lib/CodeGen/CGClass.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CGClass.cpp b/clang/lib/CodeGen/CGClass.cpp index 2aedf95e6a1..a01cdc07830 100644 --- a/clang/lib/CodeGen/CGClass.cpp +++ b/clang/lib/CodeGen/CGClass.cpp @@ -717,7 +717,8 @@ void CodeGenFunction::EmitConstructorBody(FunctionArgList &Args) { // Before we go any further, try the complete->base constructor // delegation optimization. - if (CtorType == Ctor_Complete && IsConstructorDelegationValid(Ctor)) { + if (CtorType == Ctor_Complete && IsConstructorDelegationValid(Ctor) && + CGM.getContext().getTargetInfo().getCXXABI() != CXXABI_Microsoft) { if (CGDebugInfo *DI = getDebugInfo()) DI->EmitLocation(Builder, Ctor->getLocEnd()); EmitDelegateCXXConstructorCall(Ctor, Ctor_Base, Args); @@ -916,7 +917,7 @@ void CodeGenFunction::EmitDestructorBody(FunctionArgList &Args) { // Enter the cleanup scopes for virtual bases. EnterDtorCleanups(Dtor, Dtor_Complete); - if (!isTryBody) { + if (!isTryBody && CGM.getContext().getTargetInfo().getCXXABI() != CXXABI_Microsoft) { EmitCXXDestructorCall(Dtor, Dtor_Base, /*ForVirtualBase=*/false, LoadCXXThis()); break; |

