1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 19:12:56 +02:00
Commit Graph

26 Commits

Author SHA1 Message Date
Douglas Katzman
cecb2d53e3 Generalize ArgList::AddAllArgs more
llvm-svn: 282755
2016-09-29 19:47:58 +00:00
David Majnemer
9880e078f0 Use the range variant of remove_if instead of unpacking begin/end
No functionality change is intended.

llvm-svn: 278475
2016-08-12 04:32:37 +00:00
Eric Christopher
d315447cf7 Convert Arg, ArgList, and Option to dump() to dbgs() rather than errs().
Also add print() functions.

Patch by Justin Lebar!

llvm-svn: 256010
2015-12-18 18:55:26 +00:00
Eric Christopher
de13aaf4d1 Add a dump method for ArgList.
Patch by Justin Lebar!

llvm-svn: 256009
2015-12-18 18:55:22 +00:00
Douglas Katzman
0643ad2d1e Add an ArgList::AddAllArgs that accepts a vector of OptSpecifier.
This lifts the somewhat arbitrary restriction on 3 OptSpecifiers.

Differential Revision: http://reviews.llvm.org/D11597

llvm-svn: 243539
2015-07-29 17:34:41 +00:00
Benjamin Kramer
3c12a2cb20 [Option] Plug a leak when move-assigning an InputArgList.
The class has a non-trivial dtor so we have to clean up before we move
in new members. Remove misleading comment as a default move assignment
operator will never be synthesized for this class.

llvm-svn: 240417
2015-06-23 15:28:10 +00:00
David Blaikie
42301b8c06 Devirtualize ArgList's dtor now that -Wvirtual-dtor and C++11 allow a better way to describe this situation
llvm-svn: 240238
2015-06-21 06:51:35 +00:00
Yaron Keren
5d3d22628b Remove more superfluous .str() and replace std::string concatenation with Twine.
Following r233392, http://llvm.org/viewvc/llvm-project?rev=233392&view=rev.

llvm-svn: 233555
2015-03-30 15:42:36 +00:00
Filipe Cabecinhas
5860032280 Make getLastArgNoClaim work for up to 4 arguments.
Summary:
This is needed for http://reviews.llvm.org/D8507
I have no idea what stand-alone tests could be done, if needed.

Reviewers: Bigcheese, craig.topper, samsonov

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D8508

llvm-svn: 232859
2015-03-20 23:32:58 +00:00
Yaron Keren
44f97787a1 Teach Twine to support SmallString.
Enable removing .str() member calls for these frequent cases. 

 http://reviews.llvm.org/D6372

llvm-svn: 232465
2015-03-17 09:51:17 +00:00
David Blaikie
9465551fc2 Fix uses of reserved identifiers starting with an underscore followed by an uppercase letter
This covers essentially all of llvm's headers and libs. One or two weird
cases I wasn't sure were worth/appropriate to fix.

llvm-svn: 232394
2015-03-16 18:06:57 +00:00
Benjamin Kramer
21bee91af5 Prefer SmallVector::append/insert over push_back loops.
Same functionality, but hoists the vector growth out of the loop.

llvm-svn: 229500
2015-02-17 15:29:18 +00:00
Chandler Carruth
0b619fcc8e [cleanup] Re-sort all the #include lines in LLVM using
utils/sort_includes.py.

I clearly haven't done this in a while, so more changed than usual. This
even uncovered a missing include from the InstrProf library that I've
added. No functionality changed here, just mechanical cleanup of the
include order.

llvm-svn: 225974
2015-01-14 11:23:27 +00:00
Ehsan Akhgari
5d1b3a1694 Add an overload of getLastArgNoClaim taking two OptSpecifiers.
Summary: This will be used in clang.

Test Plan: Will be tested on the clang side.

Reviewers: hansw

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D5337

llvm-svn: 217702
2014-09-12 19:42:53 +00:00
Tim Northover
89066c9335 Generic: add range-adapter for option parsing.
I want to use it in lld, but while I'm here I'll update LLVM uses.

llvm-svn: 212615
2014-07-09 13:03:37 +00:00
Justin Bogner
770d258ab4 ArgList: use MakeArgList overloads in subclasses and clean up some calls.
llvm-svn: 211340
2014-06-20 04:36:29 +00:00
Benjamin Kramer
c580197e76 Options: Use erase_if to remove Args from the list.
While there make getOption return a const reference so we don't have to put it
on the stack when calling methods on it. No functionality change.

llvm-svn: 209088
2014-05-18 15:14:13 +00:00
David Blaikie
a7b0347b5d Protect the ArgList dtor
It could even be made non-virtual if it weren't for bad compiler
warnings.

This demonstrates that ArgList objects aren't destroyed polymorphically
and possibly that they aren't even used polymorphically. If that's the
case, it might be possible to refactor the two ArgList types more
separately and simplify the Arg ownership model. *continues
experimenting*

llvm-svn: 206727
2014-04-20 23:59:00 +00:00
David Blaikie
f89b4c6c30 Use unique_ptr to handle ownership of synthesized args in DerivedArgList
This might be able to be simplified further by using Arg as a value type
in a linked list (to maintain pointer validity), but here's something
simple to start with.

llvm-svn: 206724
2014-04-20 22:37:46 +00:00
Craig Topper
c2260fc0ab [C++11] More 'nullptr' conversion. In some cases just using a boolean check instead of comparing to nullptr.
llvm-svn: 206252
2014-04-15 06:32:26 +00:00
David Blaikie
ad61b972a6 Avoid buffer copies when a Twine already is a StringRef.
llvm-svn: 196301
2013-12-03 18:18:28 +00:00
Reid Kleckner
2da0e325fb Revert "[Option] Store arg strings in a set backed by a BumpPtrAllocator"
This broke clang's crash-report.c test, and I haven't been able to
figure it out yet.

This reverts commit r186319.

llvm-svn: 186329
2013-07-15 16:40:52 +00:00
Reid Kleckner
588e7b3d3d [Option] Store arg strings in a set backed by a BumpPtrAllocator
No functionality change.

This is preparing to move response file parsing into lib/Option so it
can be shared between clang and lld.  This change isn't just a
micro-optimization.  Clang's driver uses a std::set<std::string> to
unique arguments while parsing response files, so this matches that.

llvm-svn: 186319
2013-07-15 13:46:24 +00:00
Reid Kleckner
cd4d94dfeb Merge changes to clang's Driver code into LLVM's Option library
This is in preparation for switching the clang driver over to using LLVM's
Option library.  Richard Smith introduced most of these changes to the clang
driver in r167638.

Reviewers: espindola on IRC

Differential Revision: http://llvm-reviews.chandlerc.com/D970

llvm-svn: 183925
2013-06-13 18:12:12 +00:00
Chandler Carruth
5f5c383ef1 Resort the #include lines in include/... and lib/... with the
utils/sort_includes.py script.

Most of these are updating the new R600 target and fixing up a few
regressions that have creeped in since the last time I sorted the
includes.

llvm-svn: 171362
2013-01-02 10:22:59 +00:00
Michael J. Spencer
c0bd8f95ce Copy clang/Driver/<Option parsing stuff> to llvm.
llvm-svn: 169344
2012-12-05 00:29:32 +00:00