aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Driver/Multilib.cpp
AgeCommit message (Collapse)AuthorFilesLines
2017-05-05Multilib: add dump methodsJonathan Roelofs1-0/+8
llvm-svn: 302296
2017-03-08[Driver] Consolidate tools and toolchains by target platform. (NFC)David L. Jones1-1/+1
Summary: (This is a move-only refactoring patch. There are no functionality changes.) This patch splits apart the Clang driver's tool and toolchain implementation files. Each target platform toolchain is moved to its own file, along with the closest-related tools. Each target platform toolchain has separate headers and implementation files, so the hierarchy of classes is unchanged. There are some remaining shared free functions, mostly from Tools.cpp. Several of these move to their own architecture-specific files, similar to r296056. Some of them are only used by a single target platform; since the tools and toolchains are now together, some helpers now live in a platform-specific file. The balance are helpers related to manipulating argument lists, so they are now in a new file pair, CommonArgs.h and .cpp. I've tried to cluster the code logically, which is fairly straightforward for most of the target platforms and shared architectures. I think I've made reasonable choices for these, as well as the various shared helpers; but of course, I'm happy to hear feedback in the review. There are some particular things I don't like about this patch, but haven't been able to find a better overall solution. The first is the proliferation of files: there are several files that are tiny because the toolchain is not very different from its base (usually the Gnu tools/toolchain). I think this is mostly a reflection of the true complexity, though, so it may not be "fixable" in any reasonable sense. The second thing I don't like are the includes like "../Something.h". I've avoided this largely by clustering into the current file structure. However, a few of these includes remain, and in those cases it doesn't make sense to me to sink an existing file any deeper. Reviewers: rsmith, mehdi_amini, compnerd, rnk, javed.absar Subscribers: emaste, jfb, danalbert, srhines, dschuff, jyknight, nemanjai, nhaehnle, mgorny, cfe-commits Differential Revision: https://reviews.llvm.org/D30372 llvm-svn: 297250
2016-07-18[NFC] Header cleanupMehdi Amini1-2/+0
Summary: Removed unused headers, replaced some headers with forward class declarations Patch by: Eugene <claprix@yandex.ru> Differential Revision: https://reviews.llvm.org/D20100 llvm-svn: 275882
2015-10-12[Driver] Remove `else` after `return`Simon Atanasyan1-3/+2
llvm-svn: 250043
2015-03-22[multilib] Turn virtual functor into functin_refBenjamin Kramer1-81/+42
And update code to use lambdas where possible, plus random cleanup. NFCI. llvm-svn: 232916
2015-03-18Remove many superfluous SmallString::str() calls.Yaron Keren1-1/+1
Now that SmallString is a first-class citizen, most SmallString::str() calls are not required. This patch removes a whole bunch of them, yet there are lots more. There are two use cases where str() is really needed: 1) To use one of StringRef member functions which is not available in SmallString. 2) To convert to std::string, as StringRef implicitly converts while SmallString do not. We may wish to change this, but it may introduce ambiguity. llvm-svn: 232622
2014-08-03Driver: Simplify a use of the path APIJustin Bogner1-1/+1
It's a bit more obvious what's going on if we use path::filename rather than decrementing an iterator here. llvm-svn: 214668
2014-05-08[Driver] Range-based loop simplification.Simon Atanasyan1-35/+18
llvm-svn: 208354
2014-03-05Revert "[C++11] Replace trivial lambda with std::cref."Benjamin Kramer1-1/+3
MSVC2013's standard library is too broken to understand this pattern. llvm-svn: 202971
2014-03-05[C++11] Replace trivial lambda with std::cref.Benjamin Kramer1-3/+1
llvm-svn: 202968
2014-03-04[cleanup] Re-sort includes with llvm/utils/sort_includes.py and fixChandler Carruth1-1/+1
a missing include from CLog.h. CLog.h referenced most of the core libclang types but never directly included Index.h that provides them. Previously it got lucky and other headers were always included first but with the sorting it ended up first in one case and stopped compiling. Adding the Index.h include fixes it right up. llvm-svn: 202810
2014-03-02Switch all uses of LLVM_OVERRIDE to just use 'override' directly.Craig Topper1-2/+2
llvm-svn: 202625
2014-03-01[C++11] Replace verbose functors with succinct lambdasBenjamin Kramer1-12/+3
No functionality change. llvm-svn: 202590
2014-02-12clang/lib/Driver/Multilib.cpp: Rewrite normalizePathSegment() to be tolerant ↵NAKAMURA Takumi1-5/+20
dosish pathsep. FIXME: It could be more simple... llvm-svn: 201227
2014-02-12Fix r201205's use-after-free bug caught by sanitizer botJonathan Roelofs1-8/+6
llvm-svn: 201209
2014-02-12Add Multilib selection machineryJonathan Roelofs1-0/+347
This patch improves the support for picking Multilibs from gcc installations. It also provides a better approximation for the flags '-print-multi-directory' and '-print-multi-lib'. This reverts r201203 (i.e. re-applying r201202 with small fixes in unittests/CMakeLists.txtto make the build bots happy). review: http://llvm-reviews.chandlerc.com/D2538 llvm-svn: 201205
2014-02-12Revert 201202Jonathan Roelofs1-347/+0
Breaks cmake configure of new unit tests directory llvm-svn: 201203
2014-02-12Add Multilib selection machineryJonathan Roelofs1-0/+347
This patch improves the support for picking Multilibs from gcc installations. It also provides a better approximation for the flags '-print-multi-directory' and '-print-multi-lib'. review: http://llvm-reviews.chandlerc.com/D2538 llvm-svn: 201202