<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Oct 5, 2015 at 11:54 AM, Adrian Prantl via cfe-commits <span dir="ltr"><<a href="mailto:cfe-commits@lists.llvm.org" target="_blank">cfe-commits@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: adrian<br>
Date: Mon Oct  5 13:54:30 2015<br>
New Revision: 249336<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=249336&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project?rev=249336&view=rev</a><br>
Log:<br>
Re-introduce the unique_ptr removed in r249328 and just make<br>
~CodeGenABITypes out-of-line, which should have the same effect.<br>
<br>
Thanks to David Blaikie for pointing this out!<br>
<br>
Modified:<br>
    cfe/trunk/include/clang/CodeGen/CodeGenABITypes.h<br>
    cfe/trunk/lib/CodeGen/CodeGenABITypes.cpp<br>
<br>
Modified: cfe/trunk/include/clang/CodeGen/CodeGenABITypes.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/CodeGen/CodeGenABITypes.h?rev=249336&r1=249335&r2=249336&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/CodeGen/CodeGenABITypes.h?rev=249336&r1=249335&r2=249336&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/include/clang/CodeGen/CodeGenABITypes.h (original)<br>
+++ cfe/trunk/include/clang/CodeGen/CodeGenABITypes.h Mon Oct  5 13:54:30 2015<br>
@@ -80,7 +80,7 @@ private:<br>
   std::unique_ptr<PreprocessorOptions> PPO;<br>
<br>
   /// The CodeGenModule we use get to the CodeGenTypes object.<br>
-  CodeGen::CodeGenModule *CGM;<br>
+  std::unique_ptr<CodeGen::CodeGenModule> CGM;<br>
 };<br>
<br>
 }  // end namespace CodeGen<br>
<br>
Modified: cfe/trunk/lib/CodeGen/CodeGenABITypes.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CodeGenABITypes.cpp?rev=249336&r1=249335&r2=249336&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CodeGenABITypes.cpp?rev=249336&r1=249335&r2=249336&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/lib/CodeGen/CodeGenABITypes.cpp (original)<br>
+++ cfe/trunk/lib/CodeGen/CodeGenABITypes.cpp Mon Oct  5 13:54:30 2015<br>
@@ -33,10 +33,9 @@ CodeGenABITypes::CodeGenABITypes(ASTCont<br>
       CGM(new CodeGen::CodeGenModule(C, *HSO, *PPO, *CGO, M, C.getDiagnostics(),<br>
                                      CoverageInfo)) {}<br>
<br>
-CodeGenABITypes::~CodeGenABITypes()<br>
-{<br>
-  delete CGM;<br>
-}<br>
+// Explicitly out-of-line because ~CodeGenModule() is private but<br></blockquote><div><br></div><div>Maybe "internal" might be a better term here. (if it were private, in the C++ sense, it wouldn't be any more callable here than it would be in the header) & probably just describe the whole type as internal, rather than just the dtor. Maybe. Not sure.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
+// CodeGenABITypes.h is part of clang's API.<br>
+CodeGenABITypes::~CodeGenABITypes() = default;<br>
<br>
 const CGFunctionInfo &<br>
 CodeGenABITypes::arrangeObjCMessageSendSignature(const ObjCMethodDecl *MD,<br>
<br>
<br>
_______________________________________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@lists.llvm.org">cfe-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits</a><br>
</blockquote></div><br></div></div>