Mikhail Glushenkov
fd530e8c6a
Add a check for side effect-free options (specified only in the OptionList).
...
llvm-svn: 51759
2008-05-30 06:28:37 +00:00
Mikhail Glushenkov
c90efd29e5
Documentation update.
...
llvm-svn: 51758
2008-05-30 06:28:00 +00:00
Mikhail Glushenkov
77e32bbe23
Show argv[0] in error messages (like gcc).
...
llvm-svn: 51755
2008-05-30 06:26:35 +00:00
Mikhail Glushenkov
3cc06cc83a
New feature: OptionList.
...
It can be handy to have all information about options gathered in a single place
to provide an overview of all supported options. This patch allows the following:
def Options : OptionList<[
(switch_option "E", (help "Help string")),
(alias_option "quiet", "q")
...
]>;
Tool-specific option properties (like 'append_cmd') have (obviously) no meaning in
this context, so the only properties that are allowed are 'help' and 'required'.
See usage example in examples/Clang.td.
llvm-svn: 51754
2008-05-30 06:26:08 +00:00
Mikhail Glushenkov
46e4310766
Documentation update.
...
llvm-svn: 51753
2008-05-30 06:25:24 +00:00
Mikhail Glushenkov
6d853110ba
A small optimization: use static char* array instead of StrVector.
...
llvm-svn: 51752
2008-05-30 06:24:49 +00:00
Mikhail Glushenkov
85844e2353
Make it possible to test if the '-o' option is provided.
...
The following is now allowed:
(case (not_empty "o"), do_something, ...)
This didn't work previously because "-o" is built-in.
llvm-svn: 51751
2008-05-30 06:24:07 +00:00
Mikhail Glushenkov
471d982643
Add support for option aliases.
...
llvm-svn: 51749
2008-05-30 06:22:52 +00:00
Mikhail Glushenkov
64ec622f1d
Fix some headers.
...
llvm-svn: 51745
2008-05-30 06:20:54 +00:00
Mikhail Glushenkov
9f66c06b4e
New tests for the 'case' expression: not_empty, in_language.
...
llvm-svn: 51744
2008-05-30 06:19:52 +00:00
Mikhail Glushenkov
9d884b6cfb
-E should print to stdout.
...
llvm-svn: 51743
2008-05-30 06:18:50 +00:00
Mikhail Glushenkov
1abbaf5299
Make it possible to have multiple input languages for a single tool.
...
llvm-svn: 51742
2008-05-30 06:18:16 +00:00
Mikhail Glushenkov
9cc41e71af
Rename StringVector to StrVector (to be consistent with LLVMCConfigurationEmitter.cpp).
...
llvm-svn: 51741
2008-05-30 06:17:29 +00:00
Mikhail Glushenkov
419acffb7c
Minor error message fixes.
...
llvm-svn: 51740
2008-05-30 06:16:59 +00:00
Mikhail Glushenkov
2b1ce739f3
Documentation and examples improvements
...
llvm-svn: 51739
2008-05-30 06:16:32 +00:00
Mikhail Glushenkov
e0bb150778
Do not generate empty 'if's for the output_suffix property.
...
llvm-svn: 51737
2008-05-30 06:15:20 +00:00
Mikhail Glushenkov
1cc4f2a4a5
Update documentation, add examples.
...
llvm-svn: 51736
2008-05-30 06:14:42 +00:00
Mikhail Glushenkov
5bc64aef11
Rename LLVMC-Tutorial.rst to LLVMC-Reference.rst
...
llvm-svn: 51735
2008-05-30 06:14:01 +00:00
Mikhail Glushenkov
c9f69ac2fe
Make it possible to change the output file suffix based on command-line options.
...
For instance, the following command:
llvmc2 -E hello.c
now generates a file with the correct suffix (hello.i).
llvm-svn: 51733
2008-05-30 06:13:02 +00:00
Mikhail Glushenkov
7ded98d7b6
Add support for user-provided hooks and environment variable reads to the cmd_line tool property.
...
Used like this: (cmd_line "$CALL(MyHook) --option -o $ENV(VARIABLE) $CALL(AnotherHook)")
Also works with case expressions.
Hook declarations are auto-generated, the definitions should be provided by the user
(just drop a .cpp file in the tools/llvmc2 directory).
Hooks should live in the "hooks" namespace and have type std::string hooks::Hook(void).
llvm-svn: 51732
2008-05-30 06:12:24 +00:00
Mikhail Glushenkov
97687bef23
Enable the response file ('llvmc @file') support.
...
llvm-svn: 51731
2008-05-30 06:11:45 +00:00
Mikhail Glushenkov
a5bf652530
Update the code to the fact that StringSet now lives in llvm/ADT.
...
llvm-svn: 51730
2008-05-30 06:11:18 +00:00
Mikhail Glushenkov
b81c3fc00f
Make it possible to use the generalised 'case' construct in the cmd_line property.
...
llvm-svn: 51728
2008-05-30 06:10:19 +00:00
Mikhail Glushenkov
4f4ac7de01
Add a generalised 'case' construct.
...
Besides assigning edge weights, it will also be used by the cmd_line tool property.
llvm-svn: 51727
2008-05-30 06:08:50 +00:00
Anton Korobeynikov
f77142326f
For PR1338: rename include/llvm/ADT/ilist and friends to end with ".h"
...
llvm-svn: 51687
2008-05-29 17:41:17 +00:00
Mikhail Glushenkov
18508c5df4
Filter option names to escape symbols not allowed as C++ identifiers.
...
Makes it possible to use options with names like "Wa,".
Also fixes the -Wall option handling as a side-effect.
llvm-svn: 50973
2008-05-12 16:33:06 +00:00
Mikhail Glushenkov
0cc6bb7a70
Make it possible to choose between different compilation graph definitions at compile-time.
...
llvm-svn: 50972
2008-05-12 16:32:24 +00:00
Mikhail Glushenkov
5005376b0c
Fix some error messages; Make LLVMC pass through the exit code of a failed tool.
...
llvm-svn: 50971
2008-05-12 16:31:42 +00:00
Mikhail Glushenkov
216a541699
Rename Example.td to Graph.td.
...
llvm-svn: 50910
2008-05-09 19:11:28 +00:00
Mikhail Glushenkov
ac930296dd
Reapply 50867: A small refactoring (extract method) + some comment fixes.
...
Fixed the build breakage, sorry for that.
llvm-svn: 50895
2008-05-09 08:27:26 +00:00
Tanya Lattner
56baa19bfb
Revertin 50867 since it was breaking the build.
...
llvm-svn: 50871
2008-05-08 21:54:20 +00:00
Mikhail Glushenkov
c6482c5b8a
Add -E and -S options
...
llvm-svn: 50868
2008-05-08 20:02:36 +00:00
Mikhail Glushenkov
49359aa3b3
A small refactoring (extract method) + some comment fixes.
...
llvm-svn: 50867
2008-05-08 20:02:03 +00:00
Mikhail Glushenkov
7e401e5002
Use Doxygen-style comments.
...
llvm-svn: 50833
2008-05-07 21:50:19 +00:00
Mikhail Glushenkov
b2547a6c28
Change from llvm::SmallSet<std::string> to llvm::StringMap<char>.
...
llvm-svn: 50766
2008-05-06 18:18:58 +00:00
Mikhail Glushenkov
24d085fee4
Add new edge property combinator: weight.
...
llvm-svn: 50765
2008-05-06 18:18:20 +00:00
Mikhail Glushenkov
ca50cc143c
Add a help string for the -c option
...
llvm-svn: 50764
2008-05-06 18:17:42 +00:00
Mikhail Glushenkov
7710d5fb19
Update documentation to reflect the current state of affairs.
...
llvm-svn: 50763
2008-05-06 18:17:19 +00:00
Mikhail Glushenkov
7e594e9a00
Some cosmetic changes (change some comments, move code around a bit).
...
llvm-svn: 50762
2008-05-06 18:16:52 +00:00
Mikhail Glushenkov
8eaf175d62
Refactoring: split the function CompilationGraph::Build() into two parts.
...
llvm-svn: 50760
2008-05-06 18:15:35 +00:00
Mikhail Glushenkov
3534026221
Use edge weights to choose the right linker based on input language names.
...
llvm-svn: 50759
2008-05-06 18:15:12 +00:00
Mikhail Glushenkov
7ea1b7e206
Add weights to graph edges. Choose between edges based on their weight.
...
llvm-svn: 50757
2008-05-06 18:14:24 +00:00
Mikhail Glushenkov
e2005cb90d
Remove the UnpackValues() function.
...
llvm-svn: 50756
2008-05-06 18:13:45 +00:00
Mikhail Glushenkov
78aa308f84
Add a --linker command-line option, make all tests pass.
...
llvm-svn: 50755
2008-05-06 18:13:00 +00:00
Mikhail Glushenkov
89e32fbe59
Naming fix: LLVMCCConfigurationEmitter -> LLVMCConfigurationEmitter.
...
llvm-svn: 50754
2008-05-06 18:12:03 +00:00
Mikhail Glushenkov
008827951e
Add -x option (like in gcc).
...
llvm-svn: 50750
2008-05-06 18:10:53 +00:00
Mikhail Glushenkov
dc50e8c5fa
Take object file as input and handle files with the same name correctly.
...
llvm-svn: 50749
2008-05-06 18:10:20 +00:00
Mikhail Glushenkov
b70916c93f
Add output redirection, rename namespace llvmcc to namespace llvmc.
...
llvm-svn: 50746
2008-05-06 18:08:59 +00:00
Mikhail Glushenkov
e9c941de05
Make AutoGenerated.inc depend also on Tools.td and Common.td
...
llvm-svn: 50745
2008-05-06 18:08:12 +00:00
Mikhail Glushenkov
c5fb5c9d2a
Utilize topological sort in CompilationGraph::Build().
...
This makes more interesting graph topologies possible. Currently all tests pass,
but more testing is needed.
llvm-svn: 50744
2008-05-06 18:07:48 +00:00