]> granicus.if.org Git - clang/commitdiff
Undo the unique_ptr'fication of CodeGenABITypes::CGM introduced in r248762.
authorAdrian Prantl <aprantl@apple.com>
Mon, 5 Oct 2015 17:41:16 +0000 (17:41 +0000)
committerAdrian Prantl <aprantl@apple.com>
Mon, 5 Oct 2015 17:41:16 +0000 (17:41 +0000)
include/clang/CodeGenABITypes.h is in meant to be included by external
users, but using a unique_ptr on the private CodeGenModule introduces a
dependency on the type definition that prevents such a use.

NFC

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@249328 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/CodeGen/CodeGenABITypes.h
lib/CodeGen/CodeGenABITypes.cpp

index 455ad7458443625065eb14b80b2dacd1486c58a2..25b8ef154af6690e3f3ad3240ee0cf2a3f9719d0 100644 (file)
@@ -52,6 +52,7 @@ class CodeGenABITypes
 public:
   CodeGenABITypes(ASTContext &C, llvm::Module &M,
                   CoverageSourceInfo *CoverageInfo = nullptr);
+  ~CodeGenABITypes();
 
   /// These methods all forward to methods in the private implementation class
   /// CodeGenTypes.
@@ -79,7 +80,7 @@ private:
   std::unique_ptr<PreprocessorOptions> PPO;
 
   /// The CodeGenModule we use get to the CodeGenTypes object.
-  std::unique_ptr<CodeGen::CodeGenModule> CGM;
+  CodeGen::CodeGenModule *CGM;
 };
 
 }  // end namespace CodeGen
index b673fc2471781d1a760e74617d690e3e7a07fe56..b892f070b511af34d386406dcb2527d482ec21f1 100644 (file)
@@ -33,6 +33,11 @@ CodeGenABITypes::CodeGenABITypes(ASTContext &C, llvm::Module &M,
       CGM(new CodeGen::CodeGenModule(C, *HSO, *PPO, *CGO, M, C.getDiagnostics(),
                                      CoverageInfo)) {}
 
+CodeGenABITypes::~CodeGenABITypes()
+{
+  delete CGM;
+}
+
 const CGFunctionInfo &
 CodeGenABITypes::arrangeObjCMessageSendSignature(const ObjCMethodDecl *MD,
                                                  QualType receiverType) {