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

21 Commits

Author SHA1 Message Date
David Blaikie
ad61b972a6 Avoid buffer copies when a Twine already is a StringRef.
llvm-svn: 196301
2013-12-03 18:18:28 +00:00
Jakub Staszak
a0334b429e Use startswith_lower() where possible.
llvm-svn: 194007
2013-11-04 19:22:50 +00:00
Eli Friedman
2087149773 Fix another mistake in r190442.
Sorry about that; I'll try to be more careful about DEBUG mode.

llvm-svn: 190449
2013-09-10 23:22:56 +00:00
Eli Friedman
89c35cdea8 Remove unused functions.
llvm-svn: 190442
2013-09-10 22:42:31 +00:00
Rui Ueyama
3ab487af0b Option parsing: support case-insensitive option matching.
Re-submitting r189416 with fix for Windows build on where strcasecmp is not defined.

llvm-svn: 189501
2013-08-28 20:04:31 +00:00
Rui Ueyama
16ae963b6a Revert "Option parsing: support case-insensitive option matching." as it broke Windows buildbot.
This reverts r189416.

llvm-svn: 189424
2013-08-28 00:02:06 +00:00
Rui Ueyama
a9f9cbaaf6 Option parsing: support case-insensitive option matching.
Link.exe's command line options are case-insensitive. This patch
adds a new attribute to OptTable to let the option parser to compare
options, ignoring case.

Command lines are generally case-insensitive on Windows. CL.exe is an
exception. So this new attribute should be useful for other commands
running on Windows.

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

llvm-svn: 189416
2013-08-27 23:47:01 +00:00
Hans Wennborg
581964696d Options: explicit handling of --
Clients of the option parsing library should handle it explicitly
using a KIND_REMAINING_ARGS option.

Clang and lld have been updated in r188316 and r188318, respectively.

Also fix -Wsign-compare warning in the option parsing test.

llvm-svn: 188323
2013-08-13 22:23:05 +00:00
Hans Wennborg
714e82ffc5 Options: Add new option kind that consumes remaining arguments
This adds KIND_REMAINING_ARGS, a class of options that consume
all remaining arguments on the command line.

This will be used to support /link in clang-cl, which is used
to forward all remaining arguments to the linker.

It also allows us to remove the hard-coded handling of "--",
allowing clients (clang and lld) to implement that functionality
themselves with this new option class.

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

llvm-svn: 188314
2013-08-13 21:09:50 +00:00
NAKAMURA Takumi
0790962a19 Option/CMakeLists.txt: Don't use target_link_libraries. LLVMBuild knows dependencies.
llvm-svn: 187777
2013-08-06 05:56:32 +00:00
Hans Wennborg
749f8bc956 Option parsing: recognize the special -- token
Everything that comes after -- should be treated as a filename. This
enables passing in filenames that would otherwise be conflated with
command-line options.

This is especially important for clang-cl which supports options
starting with /, which are easily conflatable with Unix-style
path names.

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

llvm-svn: 187675
2013-08-02 21:20:27 +00:00
Hans Wennborg
ad911dcfea Option parsing: add support for alias arguments.
This makes option aliases more powerful by enabling them to
pass along arguments to the option they're aliasing.

For example, if we have a joined option "-foo=", we can now
specify a flag option "-bar" to be an alias of that, with the
argument "baz".

This is especially useful for the cl.exe compatible clang driver,
where many options are aliases. For example, this patch enables
us to alias "/Ox" to "-O3" (-O is a joined option), and "/WX" to
"-Werror" (again, -W is a joined option).

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

llvm-svn: 187537
2013-07-31 22:44:41 +00:00
Richard Trieu
d4dca46a3e Silence gcc warning.
llvm-svn: 186879
2013-07-22 21:29:28 +00:00
Hans Wennborg
0eedbce23d Option parsing: allow aliases in groups
Option aliases in option groups were previously disallowed by an assert.
As far as I can tell, there was no technical reason for this, and I would
like to be able to put cl.exe compatible options in their own group for Clang,
so let's change the assert.

llvm-svn: 186838
2013-07-22 16:18:13 +00:00
Reid Kleckner
045ec611a0 [Option] Add inclusion and exclusion flags to option parsing
Summary:
This allows the clang driver to put MSVC compatible options in the same
enumerator space as its normal options but exclude them from normal
option parsing.

Also changes the standard ParseArgs() method to consider unknown
arguments with a leading slash as being inputs rather than flags.

High level discussion for clang-cl is here:
http://lists.cs.uiuc.edu/pipermail/cfe-dev/2013-June/030404.html

CC: llvm-commits

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

llvm-svn: 186703
2013-07-19 18:04:57 +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
780d4ccf9e Fix a crash bug in dumping options with groups
Option groups don't have prefixes.  Option dumping is basically dead
code unless there is something wrong with the option table, so this
isn't an important crasher.

llvm-svn: 185031
2013-06-26 22:43:37 +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