[PATCH] clang-cl: Don't store the cl compiler Tool on the stack (PR20131)

Hans Wennborg hans at chromium.org
Thu Jun 26 12:51:23 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;
Reid Kleckner wrote:
> 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.
Yes, that seems nicer.


More information about the cfe-commits mailing list