[PATCH] clang-cl: Don't store the cl compiler Tool on the stack	(PR20131)
    Reid Kleckner 
    rnk at google.com
       
    Thu Jun 26 11:24:15 PDT 2014
    
    
  
================
Comment at: include/clang/Driver/ToolChain.h:72
@@ -71,2 +71,3 @@
   mutable std::unique_ptr<Tool> Link;
+  mutable std::unique_ptr<Tool> CL;
   Tool *getClang() const;
----------------
You should be able to get away with forward declaring tools::visualstudio::Compile, and then using that type here and on the getter.
================
Comment at: include/clang/Driver/ToolChain.h:72
@@ -71,2 +71,3 @@
   mutable std::unique_ptr<Tool> Link;
+  mutable std::unique_ptr<Tool> CL;
   Tool *getClang() const;
----------------
Reid Kleckner wrote:
> You should be able to get away with forward declaring tools::visualstudio::Compile, and then using that type here and on the getter.
Can we make the Clang tool own the CL tool when it's doing fallback?  I think that should solve the lifetime issues without adding CL to the base Toolchain class.
http://reviews.llvm.org/D4314
    
    
More information about the cfe-commits
mailing list