Mikhail Glushenkov
096fc103fb
Validate the generated C++ code in llvmc tests.
...
Checks that the code generated by 'tblgen --emit-llvmc' can be actually
compiled. Also fixes two bugs found in this way:
- forward_transformed_value didn't work with non-list arguments
- cl::ZeroOrOne is now called cl::Optional
llvm-svn: 91404
2009-12-15 03:04:52 +00:00
Mikhail Glushenkov
2cb65bd5ab
Allow $CALL(Hook, '$INFILE') for non-join tools.
...
llvm-svn: 91402
2009-12-15 03:04:02 +00:00
Mikhail Glushenkov
57a67facb8
Simplify a bit.
...
llvm-svn: 90785
2009-12-07 19:16:13 +00:00
Mikhail Glushenkov
fca845187d
Throw 'const char*' instead of 'std::string'.
...
llvm-svn: 90784
2009-12-07 19:15:57 +00:00
Mikhail Glushenkov
67c106664b
Deprecate 'unpack_values'.
...
Use 'forward_values' + 'comma_separated' instead.
llvm-svn: 90774
2009-12-07 18:25:54 +00:00
Mikhail Glushenkov
6b6be99632
Implement 'forward_value' and 'forward_transformed_value'.
...
llvm-svn: 90770
2009-12-07 17:03:05 +00:00
Mikhail Glushenkov
d5774dfb8d
Refactoring, no functionality change.
...
llvm-svn: 90764
2009-12-07 10:51:55 +00:00
Mikhail Glushenkov
ed163ed103
Forward -save-temps to llvm-gcc.
...
llvm-svn: 90214
2009-12-01 06:51:30 +00:00
Chris Lattner
9e69536607
mark some constant global const.
...
llvm-svn: 85910
2009-11-03 18:30:31 +00:00
Mikhail Glushenkov
b7f7673feb
80-col violation.
...
llvm-svn: 85215
2009-10-27 09:02:49 +00:00
Mikhail Glushenkov
3b3e9a1c27
Make 'unset_option' work on list options.
...
llvm-svn: 84827
2009-10-22 04:15:07 +00:00
Mikhail Glushenkov
456d734945
Implement any_[not_]empty and list versions of switch_on and [not_]empty.
...
Useful for OptionPreprocessor.
llvm-svn: 84728
2009-10-21 02:13:13 +00:00
Mikhail Glushenkov
9abd706881
More refactoring...
...
llvm-svn: 84537
2009-10-19 21:24:28 +00:00
Mikhail Glushenkov
7d2019f9b3
Refactoring, no functionality change.
...
llvm-svn: 84450
2009-10-18 22:51:30 +00:00
Mikhail Glushenkov
867f67301b
First draft of the OptionPreprocessor.
...
More to follow...
llvm-svn: 84352
2009-10-17 20:09:29 +00:00
Mikhail Glushenkov
b2eba4904f
Disallow multiple instances of PluginPriority.
...
Several instances of PluginPriority in a single file most probably signifies a
programming error.
llvm-svn: 84350
2009-10-17 20:08:30 +00:00
Mikhail Glushenkov
0bd47063ab
Omit the 'out_file_index != -1' check when possible.
...
llvm-svn: 83619
2009-10-09 05:45:21 +00:00
Mikhail Glushenkov
182765004e
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
efc9763468
Add a way to query the number of input files.
...
llvm-svn: 82957
2009-09-28 01:16:42 +00:00
Mikhail Glushenkov
1766617386
A bit prettier formatting.
...
llvm-svn: 82955
2009-09-28 01:15:44 +00:00
Mikhail Glushenkov
fdd0a2fb40
Use raw_ostream::indent instead of passing strings.
...
llvm-svn: 82456
2009-09-21 15:53:44 +00:00
Mikhail Glushenkov
c1e23592ec
Distinguish between 'empty' and empty DAG marker.
...
llvm-svn: 81448
2009-09-10 16:22:02 +00:00
Mikhail Glushenkov
7b047b9c81
Add a logical 'not' operator to llvmc's TableGen dialect.
...
llvm-svn: 81447
2009-09-10 16:21:38 +00:00
Chris Lattner
c521f54198
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
b0df5047e5
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
182512b403
Refactoring.
...
Make isList(), isSwitch() and isParameter() member functions of
OptionDescription.
llvm-svn: 74904
2009-07-07 16:08:11 +00:00
Mikhail Glushenkov
2de4161b23
Comment fix.
...
llvm-svn: 74903
2009-07-07 16:07:36 +00:00
Daniel Dunbar
38a22bffdc
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
269884ead5
Better error message.
...
llvm-svn: 74193
2009-06-25 18:21:34 +00:00
Mikhail Glushenkov
248c414024
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
ae3b1a8b55
A little bit nicer formatting.
...
llvm-svn: 73998
2009-06-23 20:45:31 +00:00
Mikhail Glushenkov
beecd51f95
Typo.
...
llvm-svn: 73997
2009-06-23 20:45:07 +00:00
Mikhail Glushenkov
b43eb8200f
A better error message.
...
llvm-svn: 71068
2009-05-06 04:54:23 +00:00
Mikhail Glushenkov
6da4749ce6
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
d953cd9401
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
c48ede23bd
Add some assertions.
...
Fixes segfaults in some corner cases.
llvm-svn: 69494
2009-04-19 00:22:35 +00:00
Mikhail Glushenkov
f6281fb47c
'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
02b47b5e7a
Typo.
...
llvm-svn: 63174
2009-01-28 03:47:58 +00:00
Mikhail Glushenkov
2115d09a10
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
fbc89cecad
Change the hook API back to prevent memory leaks.
...
llvm-svn: 62686
2009-01-21 13:04:33 +00:00
Mikhail Glushenkov
bf9716e15d
Allow hooks with arguments.
...
llvm-svn: 62685
2009-01-21 13:04:00 +00:00
Mikhail Glushenkov
cf029824e1
Fix typo in error message.
...
llvm-svn: 61191
2008-12-18 04:06:58 +00:00
Mikhail Glushenkov
5932d8c986
Some enhancements for the 'case' expression.
...
Add (error) and (empty).
llvm-svn: 61117
2008-12-17 02:47:01 +00:00
Mikhail Glushenkov
e30a2820f6
Put Edge* classes into anonymous namespace.
...
Prevents conflicts between plugins.
llvm-svn: 60871
2008-12-11 10:34:18 +00:00
Mikhail Glushenkov
7f1bef5a55
Make 'extern' an option property.
...
Makes (forward) work better.
llvm-svn: 60667
2008-12-07 16:47:12 +00:00
Mikhail Glushenkov
4cc945da6e
Better error message.
...
llvm-svn: 60664
2008-12-07 16:45:12 +00:00
Mikhail Glushenkov
395cb25ac7
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
0d88271490
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
35a46f808b
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
85467c71d2
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