1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-26 22:42:46 +02:00
Commit Graph

89 Commits

Author SHA1 Message Date
Mikhail Glushenkov
c802d57e52 Input files should go before all other options.
Important, for example, when calling 'gcc a.o b.o c.o -lD -lE -lF'.

llvm-svn: 83524
2009-10-08 04:40:08 +00:00
Mikhail Glushenkov
b676fc15a0 Add a way to query the number of input files.
llvm-svn: 82957
2009-09-28 01:16:42 +00:00
Mikhail Glushenkov
ef0b5e2f1a A bit prettier formatting.
llvm-svn: 82955
2009-09-28 01:15:44 +00:00
Mikhail Glushenkov
487c2ba4ee Use raw_ostream::indent instead of passing strings.
llvm-svn: 82456
2009-09-21 15:53:44 +00:00
Mikhail Glushenkov
65831e2bf2 Distinguish between 'empty' and empty DAG marker.
llvm-svn: 81448
2009-09-10 16:22:02 +00:00
Mikhail Glushenkov
49c2b6f4fb Add a logical 'not' operator to llvmc's TableGen dialect.
llvm-svn: 81447
2009-09-10 16:21:38 +00:00
Chris Lattner
3203639c35 Prune #includes from llvm/Linker.h and llvm/System/Path.h,
forcing them down into various .cpp files.

This change also:
1. Renames TimeValue::toString() and Path::toString() to ::str()
   for similarity with the STL.
2. Removes all stream insertion support for sys::Path, forcing
   clients to call .str().
3. Removes a use of Config/alloca.h from bugpoint, using smallvector
   instead.
4. Weans llvm-db off <iostream>

sys::Path really needs to be gutted, but I don't have the desire to
do it at this point.

llvm-svn: 79869
2009-08-23 22:45:37 +00:00
Mikhail Glushenkov
a1d8f36bb7 Add an 'init' option property.
Makes possible to provide default values for options defined in plugins (same as
cl::init).

llvm-svn: 74905
2009-07-07 16:08:41 +00:00
Mikhail Glushenkov
1bf2cd5d62 Refactoring.
Make isList(), isSwitch() and isParameter() member functions of
OptionDescription.

llvm-svn: 74904
2009-07-07 16:08:11 +00:00
Mikhail Glushenkov
6879b9fa0f Comment fix.
llvm-svn: 74903
2009-07-07 16:07:36 +00:00
Daniel Dunbar
95f6034ab6 Replace std::iostreams with raw_ostream in TableGen.
- Sorry, I can't help myself.

 - No intended functionality change.

llvm-svn: 74742
2009-07-03 00:10:29 +00:00
Mikhail Glushenkov
efc291de83 Better error message.
llvm-svn: 74193
2009-06-25 18:21:34 +00:00
Mikhail Glushenkov
f7b3bf53e2 Make llvmc work again.
Chris recently broke llvmc with his Makefile changes (r75379). That patch made
the global change .o -> .a, which caused built-in llvmc plugins to stop working
since plugin initialization in llvmc is based on static variables not referenced
from the main executable. This patch implements auto-generated forced references
to the plugin libraries.

llvm-svn: 74000
2009-06-23 20:46:48 +00:00
Mikhail Glushenkov
b246a5511d A little bit nicer formatting.
llvm-svn: 73998
2009-06-23 20:45:31 +00:00
Mikhail Glushenkov
4e4656fb6a Typo.
llvm-svn: 73997
2009-06-23 20:45:07 +00:00
Mikhail Glushenkov
d5cadeed5d A better error message.
llvm-svn: 71068
2009-05-06 04:54:23 +00:00
Mikhail Glushenkov
d9ef672a0d The 'forward_as' property did not use its second argument.
See PR4159 for details. Patch by Martin Nowack!

llvm-svn: 71054
2009-05-06 01:41:19 +00:00
Mikhail Glushenkov
2b4696b585 Fix incorrect code generation with ENV.
See PR4157 for details. Patch by Martin Nowack!

llvm-svn: 70973
2009-05-05 12:34:34 +00:00
Mikhail Glushenkov
28f3f18fcd Add some assertions.
Fixes segfaults in some corner cases.

llvm-svn: 69494
2009-04-19 00:22:35 +00:00
Mikhail Glushenkov
65cb3e0861 'append_cmd' should split its argument.
Makes '(append_cmd "-foo a b c")' work.

llvm-svn: 65623
2009-02-27 06:46:55 +00:00
Mikhail Glushenkov
cd3b13fc7b Typo.
llvm-svn: 63174
2009-01-28 03:47:58 +00:00
Mikhail Glushenkov
920118470d Add three new option properties.
Adds new option properties 'multi_val', 'one_or_more' and 'zero_or_one'.

llvm-svn: 63172
2009-01-28 03:47:20 +00:00
Mikhail Glushenkov
bf9e875d8e Change the hook API back to prevent memory leaks.
llvm-svn: 62686
2009-01-21 13:04:33 +00:00
Mikhail Glushenkov
9153777db7 Allow hooks with arguments.
llvm-svn: 62685
2009-01-21 13:04:00 +00:00
Mikhail Glushenkov
964b643cf8 Fix typo in error message.
llvm-svn: 61191
2008-12-18 04:06:58 +00:00
Mikhail Glushenkov
90baa08c2b Some enhancements for the 'case' expression.
Add (error) and (empty).

llvm-svn: 61117
2008-12-17 02:47:01 +00:00
Mikhail Glushenkov
e50ddcc42a Put Edge* classes into anonymous namespace.
Prevents conflicts between plugins.

llvm-svn: 60871
2008-12-11 10:34:18 +00:00
Mikhail Glushenkov
c75a4df77c Make 'extern' an option property.
Makes (forward) work better.

llvm-svn: 60667
2008-12-07 16:47:12 +00:00
Mikhail Glushenkov
e0c9f63882 Better error message.
llvm-svn: 60664
2008-12-07 16:45:12 +00:00
Mikhail Glushenkov
85098f0f90 Re-apply Cedric's changes.
Use B instead of Beg (for consistency), but NodeA and NodeB instead of A
and B.

llvm-svn: 60663
2008-12-07 16:44:47 +00:00
Mikhail Glushenkov
4522fd9b8a Try to guess when the auto-generated cl::Sink option should be marked 'extern'.
This would be much easier to do if the CommandLine library didn't use
global state. Global state is evil.

llvm-svn: 60659
2008-12-07 16:42:47 +00:00
Mikhail Glushenkov
1348ac2185 Add a (progn)-like construct for (actions). Implemented as a DAG list.
llvm-svn: 60658
2008-12-07 16:42:22 +00:00
Mikhail Glushenkov
f01331152a Use (actions) instead of option properties, support external options.
Also includes a major refactoring. See documentation for more
information.

llvm-svn: 60656
2008-12-07 16:41:11 +00:00
Cedric Venet
c2986f3f3a The use of the construct:
for(Type1 B = ...;;) { Type2 B ; ... }
is bad: code is hard to read and VS VS don't like it (it ignore the second declaration of B).
This patch fix the problem in tablegen. Please don't write code like this. 

llvm-svn: 60590
2008-12-05 13:37:30 +00:00
Mikhail Glushenkov
cd57fbc9c4 Support multiple compilation graph definitions. Not terribly useful, but makes the code more generic.
llvm-svn: 60199
2008-11-28 00:13:47 +00:00
Mikhail Glushenkov
187b171022 Add 'hidden' and 'really_hidden' option properties.
llvm-svn: 60198
2008-11-28 00:13:25 +00:00
Mikhail Glushenkov
7534e81f38 Small fix: the error message was incorrect in some cases.
llvm-svn: 60099
2008-11-26 10:55:45 +00:00
Mikhail Glushenkov
0c4ad9c7cc Support dependencies between plugins by priority-sorting.
llvm-svn: 59449
2008-11-17 17:30:25 +00:00
Mikhail Glushenkov
c44e8c9f2b Filter ToolPropertiesList to exclude all Tools not mentioned in the compilation graph.
llvm-svn: 59448
2008-11-17 17:29:42 +00:00
Mikhail Glushenkov
773924299a Add a layer of indirection to make plugins more flexible.
Use strings instead of TableGen defs in the compilation graph
definition. Makes it easier for the plugins to modify an existing graph.

llvm-svn: 59447
2008-11-17 17:29:18 +00:00
Mikhail Glushenkov
db3ab89624 Check the return value of std::getenv.
When constructing std::strings from C strings, we should check the input
value to be not NULL so that the std::string constructor does not
segfault.
Fixes #3047.

llvm-svn: 59131
2008-11-12 12:41:18 +00:00
Mikhail Glushenkov
3c568b376c Add a bit of lazy evaluation to PopulateCompilationGraph().
Only the tools that are mentioned in the compilation graph definition
are now inserted by PopulateCompilationGraph(). This should cut down
plugin loading time a little.

llvm-svn: 59097
2008-11-12 00:05:17 +00:00
Mikhail Glushenkov
bb1a81c8e7 Some cosmetic changes.
llvm-svn: 59096
2008-11-12 00:04:46 +00:00
Mikhail Glushenkov
3e7723bbac Allow $CALL and $ENV in command names. Fixes #3025.
llvm-svn: 58922
2008-11-08 19:43:32 +00:00
Anton Korobeynikov
3f69727bd5 Properly escape dashes in TableGen's LLVMC2 emitter.
Patch by Patrick Walton!

llvm-svn: 58901
2008-11-08 10:16:21 +00:00
Mikhail Glushenkov
cf04ed88af Move llvmc2 header files under include/llvm/CompilerDriver
llvm-svn: 56466
2008-09-22 20:50:40 +00:00
Mikhail Glushenkov
3895eee874 Plugin support for llvmc2 (a-la opt).
llvm-svn: 56465
2008-09-22 20:49:34 +00:00
Mikhail Glushenkov
e412a69526 Make comments a little bit more clear.
llvm-svn: 56463
2008-09-22 20:48:22 +00:00
Mikhail Glushenkov
72e4c4e976 Get rid of GlobalLanguageMap. Global state is evil.
llvm-svn: 56462
2008-09-22 20:47:46 +00:00
Mikhail Glushenkov
7afbd753b7 Add a (forward_as) option property
llvm-svn: 56459
2008-09-22 20:46:19 +00:00