Jeffrey Yasskin
1615d45daa
Un-namespace-qualify llvm_unreachable. It's a macro, so the qualification gave
...
no extra safety anyway.
llvm-svn: 91207
2009-12-12 05:05:38 +00:00
Daniel Dunbar
f72bdf7eed
Implement clang -cc1.
...
- I apologize for the link time horrors, my goal is to kill off clang-cc in fairly short order.
llvm-svn: 91170
2009-12-11 22:20:12 +00:00
Jeffrey Yasskin
567ae47b4a
Remove several .c_str() to be forward-compatible with StringRef.
...
llvm-svn: 90822
2009-12-08 01:46:24 +00:00
Rafael Espindola
73d4637545
Add gcc's -no-canonical-prefixes option to clang.
...
llvm-svn: 90577
2009-12-04 19:31:58 +00:00
Daniel Dunbar
1c39f3c89d
Put CompilerInvocation testing code in clang-cc instead of clang for now, I can't bear to link all of clang into 'clang' yet. :)
...
- Still triggered by a magic leading -cc1 argument, as before.
llvm-svn: 90114
2009-11-30 07:18:13 +00:00
Daniel Dunbar
fcb9caa772
Change CompilerInvocation::CreateFromArgs to report errors using a proper diagnostic engine.
...
- Clients that care about having the diagnostics output honor the user-controllable diagnostic options can buffer the diagnostics and issue them later.
llvm-svn: 90092
2009-11-29 20:58:50 +00:00
Daniel Dunbar
65ca1c6f02
Change CompilerInvocation::CreateFromArgs to take Argv0 and the address of main (or something in the main executable) so it can find the builtin compiler files.
...
llvm-svn: 90090
2009-11-29 20:58:32 +00:00
Daniel Dunbar
a604639635
Switch CompilerInvocation::CreateFromArgs to take const char** arguments until Driver itself switches to StringRef.
...
llvm-svn: 89503
2009-11-20 22:47:55 +00:00
Benjamin Kramer
df5280df05
Add a workaround to silence a bogus g++-4.4 -pedantic warning.
...
driver.cpp:211: warning: ISO C++ forbids zero-size array 'argv'
llvm-svn: 89455
2009-11-20 11:49:06 +00:00
Daniel Dunbar
84e8a249fa
Fix some default in the option classes, and some CompilerInvocation argification
...
errors.
llvm-svn: 89388
2009-11-19 20:54:59 +00:00
Douglas Gregor
45959e5556
Try yet again to de-bork CMake Windows build w.r.t. clang++
...
llvm-svn: 89361
2009-11-19 16:42:34 +00:00
Douglas Gregor
c3851cd0d8
Try to fix CMake clang++ creation on Windows
...
llvm-svn: 89336
2009-11-19 07:59:29 +00:00
Daniel Dunbar
51cd8f085f
Sketch some 'clang -cc1' support, for testing parts of CompilerInvocation.
...
llvm-svn: 89333
2009-11-19 07:37:51 +00:00
Douglas Gregor
564d41fbe4
CMake goop to create clang++ symlink
...
llvm-svn: 89320
2009-11-19 05:46:45 +00:00
Daniel Dunbar
da13faf982
Driver: ArgList doesn't depend on Options.h anymore.
...
llvm-svn: 89313
2009-11-19 04:25:22 +00:00
Daniel Dunbar
b8c4825fed
Use TOOLALIAS so that clang++ gets 'built'.
...
llvm-svn: 89286
2009-11-19 00:21:33 +00:00
Daniel Dunbar
559f7a5c3c
Fix unsafe use of StringRef I introduced.
...
llvm-svn: 86829
2009-11-11 10:10:25 +00:00
Daniel Dunbar
f76c9d270a
Driver: Run 'clang' in C++ mode based on the name it was invoked by. We match
...
anything that ends with ++ or ++-FOO (e.g., c++, clang++, clang++-1.1) as being
a "C++ compiler".
This allows easy testing of the C++ compiler by 'ln -s clang clang++', or by 'cp
clang clang++'.
Based on patch by Roman Divacky.
llvm-svn: 86697
2009-11-10 18:47:41 +00:00
Daniel Dunbar
5564ba743f
Push "clang-is-production" logic up to tools/driver, and make it hittable by
...
defining the CLANG_IS_PRODUCTION Makefile variable.
llvm-svn: 82583
2009-09-22 22:31:13 +00:00
Douglas Gregor
33870d908f
CMake: Improve installation of Clang
...
- Install clang-cc into libexec
- Install headers into lib/clang/<version>/include
- Don't install other clang-based tools (clang-wpa, clang-index, etc.)
llvm-svn: 79827
2009-08-23 05:28:29 +00:00
Daniel Dunbar
c3ccd180e7
Fix indentation / trailing white space.
...
llvm-svn: 76200
2009-07-17 18:10:27 +00:00
Daniel Dunbar
54091b82b5
[llvm up] Add support for '#' component of QA_OVERRIDE_GCC3_OPTIONS.
...
- This silences the output about how command line arguments are being changed.
llvm-svn: 76107
2009-07-16 21:32:51 +00:00
Daniel Dunbar
38bfda6ab5
Driver: Move Compilation::Execute to Driver::ExecuteCompilation.
...
- The Compilation is just a helper class, it shouldn't have that amount of
logic in it.
- No functionality change.
llvm-svn: 74634
2009-07-01 20:03:04 +00:00
Douglas Gregor
b4fd5b03c9
Make the clang executable target depend on clang-cc
...
llvm-svn: 73568
2009-06-16 22:26:26 +00:00
Daniel Dunbar
fed44d215e
Revert to using &...[0] for std::vector, apparently .data isn't generally
...
available (and it isn't necessary in this case).
llvm-svn: 72425
2009-05-26 18:00:25 +00:00
Daniel Dunbar
33794edae7
Use .data() vs &...[0]
...
llvm-svn: 72420
2009-05-26 17:13:50 +00:00
Daniel Dunbar
f7323f3f65
The driver/diagnostic client don't need to be on the heap.
...
llvm-svn: 72418
2009-05-26 16:15:44 +00:00
Daniel Dunbar
3f4a2c286e
Support QA_OVERRIDE_GCC3_OPTIONS
...
- Cover your eyes...
- This is a simple but effective way to allow developers to build a
project with clang while manipulating the command line, without
having to edit the project itself.
llvm-svn: 69342
2009-04-17 01:54:00 +00:00
Daniel Dunbar
8b723e299c
Driver: CCC_ADD_ARGS could end up using dangling pointers.
...
llvm-svn: 68805
2009-04-10 18:32:59 +00:00
Daniel Dunbar
35b0c52add
Allow CCC_ADD_ARGS to add empty arguments
...
llvm-svn: 68235
2009-04-01 19:38:07 +00:00
Daniel Dunbar
dae1d347df
Support CCC_ADD_ARGS in new driver.
...
llvm-svn: 68231
2009-04-01 19:08:46 +00:00
Daniel Dunbar
d640be24fd
(LLVM up) Update to use llvm::sys::getHostTriple().
...
- Always pass -triple to clang-cc (-arch will be removed).
- clang-cc doesn't play guess work with the target triple anymore.
llvm-svn: 68119
2009-03-31 17:35:15 +00:00
Mike Stump
90a3707225
Really fix cmake style builds.
...
llvm-svn: 67633
2009-03-24 17:52:34 +00:00
Daniel Dunbar
36245c5a90
Rename clang-driver to clang.
...
Again, I tried to update cmake but it is untested.
llvm-svn: 67606
2009-03-24 03:07:05 +00:00
Daniel Dunbar
e5a7ecc23a
Move <root>/Driver into <root>/tools/clang-cc.
...
Again, I tried to update cmake but it is untested.
llvm-svn: 67605
2009-03-24 03:00:12 +00:00
Daniel Dunbar
3db73ab7f6
Add CMake files for tools/driver; I am just guessing here, can someone test/fix?
...
llvm-svn: 67604
2009-03-24 02:52:57 +00:00
Daniel Dunbar
1acb0eb24f
Driver: Give Compilation::Execute total control over the Driver result
...
code; and don't return an error code when -### is present, even if
errors occur.
llvm-svn: 67425
2009-03-21 00:40:53 +00:00
Daniel Dunbar
da382a88bf
Driver: Get executable path using llvm::sys::Path::GetMainExecutable.
...
llvm-svn: 67228
2009-03-18 20:25:53 +00:00
Daniel Dunbar
d9b80c2af8
Driver: Use custom diag printer to drop dependency on libFrontend and
...
libLex.
llvm-svn: 67155
2009-03-18 02:11:26 +00:00
Daniel Dunbar
2608c548b5
Driver: Use PrettyStackTrace.
...
llvm-svn: 67149
2009-03-18 01:38:48 +00:00
Douglas Gregor
23d75bb326
Build system changes to use TableGen to generate the various
...
diagnostics. This builds on the patch that Sebastian committed and
then revert. Major differences are:
- We don't remove or use the current ".def" files. Instead, for now,
we just make sure that we're building the ".inc" files.
- Fixed CMake makefiles to run TableGen and build the ".inc" files
when needed. Tested with both the Xcode and Makefile generators
provided by CMake, so it should be solid.
- Fixed normal makefiles to handle out-of-source builds that involve
the ".inc" files.
I'll send a separate patch to the list with Sebastian's changes that
eliminate the use of the .def files.
llvm-svn: 67058
2009-03-16 23:06:59 +00:00
Daniel Dunbar
e75d834c7c
Driver: Implement majority tool binding logic.
...
- Still need code for determining proper output location.
- Doesn't work yet, of course, as the host isn't providing real
tool chains.
- Interface still has a few warts, but has gotten a nice bit of
polish during the rewrite.
llvm-svn: 67038
2009-03-16 06:56:51 +00:00
Daniel Dunbar
3efedddcf9
Driver: Return 0 from BuildCompilation on -ccc-print-phases,
...
-ccc-print-options.
llvm-svn: 66907
2009-03-13 17:24:34 +00:00
Daniel Dunbar
c0b3e95a1a
Driver: Use standard Diagnostic interface for diagnostics.
...
llvm-svn: 66786
2009-03-12 08:55:43 +00:00
Daniel Dunbar
4dff6a4973
Driver: Add host info.
...
- Replace assorted -ccc-host-* options by -ccc-host-triple which is
more sane.
llvm-svn: 66600
2009-03-10 23:41:59 +00:00
Daniel Dunbar
ee66cf2249
Driver: Handle magic -ccc- options.
...
- Follows ccc currently, but this functionality should eventually be
outside the Driver lib.
llvm-svn: 66575
2009-03-10 20:52:46 +00:00
Daniel Dunbar
b2cd66bf4d
Driver: Sink Driver/Compilation into clang::driver namespace.
...
- Add OptTable instance to Driver.
llvm-svn: 66063
2009-03-04 20:49:20 +00:00
Daniel Dunbar
5637208a88
Driver: More Option implementation.
...
- Add Options.def file, collects option information.
- Actual option instantiation is handled lazily by OptTable to allow
the driver to not need to instantiate all options.
- cast<> support for Option, other minor tweaks.
llvm-svn: 66028
2009-03-04 08:33:23 +00:00
Daniel Dunbar
b2da933989
Sketch Driver Option classes.
...
llvm-svn: 65933
2009-03-03 05:55:11 +00:00
Daniel Dunbar
544ecd14b6
Stub out some structure for C++ driver.
...
llvm-svn: 65867
2009-03-02 19:59:07 +00:00