]> granicus.if.org Git - clang/commitdiff
Simplify crash recovery cleanup registration.
authorTed Kremenek <kremenek@apple.com>
Tue, 22 Mar 2011 01:15:19 +0000 (01:15 +0000)
committerTed Kremenek <kremenek@apple.com>
Tue, 22 Mar 2011 01:15:19 +0000 (01:15 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128057 91177308-0d34-0410-b5e6-96231b3b80d8

lib/AST/RecordLayoutBuilder.cpp

index a8ba8e24e756ea05fb3087b8953b61f1ad26342b..75228a2b7b625347c1c5ec6d6da69bfd97d374c6 100644 (file)
@@ -1709,9 +1709,8 @@ ASTContext::getASTRecordLayout(const RecordDecl *D) const {
       Builder.reset(new MSRecordLayoutBuilder(*this, &EmptySubobjects));
     }
     // Recover resources if we crash before exiting this method.
-    llvm::CrashRecoveryContextCleanupRegistrar
-      RecordBuilderCleanup(llvm::CrashRecoveryContextCleanup::
-                        create<RecordLayoutBuilder>(Builder.get()));
+    llvm::CrashRecoveryContextCleanupRegistrar<RecordLayoutBuilder>
+      RecordBuilderCleanup(Builder.get());
     
     Builder->Layout(RD);