[PATCH] [Driver] Move description of toolchain specific include directories from the common driver code to the corresponding `MultilibSet` declarations

Simon Atanasyan simon at atanasyan.com
Tue Aug 5 14:14:33 PDT 2014


In fact CSMipsMultilibs and FSFMipsMultilibs toolchains require different include paths. Currently we have to probe all possible paths in the `Linux::AddClangSystemIncludeArgs()` routine. One of the goal of this patch is to get paths from the toolchain description and do not enumerate all possible variants. So it is intended change.

================
Comment at: lib/Driver/ToolChains.cpp:1838
@@ -1817,1 +1837,3 @@
+        return Dirs;
+      });
   }
----------------
Rafael Ávila de Espíndola wrote:
> This is identical to the first lambda, no? Can you factor it out?
> 
Yes, both lambdas are identical now but it is just a chance. The corresponding toolchains are not related, have separate directories trees in the tests etc. So I think the factoring out might make the code more complicated and error prone.

http://reviews.llvm.org/D4720






More information about the cfe-commits mailing list