Daniel Dunbar
81fe60b787
Add clang -cc1 parsing for preprocessor options.
...
llvm-svn: 89917
2009-11-26 02:14:07 +00:00
Daniel Dunbar
cbc693579c
Add clang -cc1 parsing for header search options.
...
llvm-svn: 89916
2009-11-26 02:13:54 +00:00
Daniel Dunbar
44b36ee78c
What the FIXMEs want, the FIXMEs shall have.
...
llvm-svn: 89861
2009-11-25 11:53:23 +00:00
Daniel Dunbar
b8c2f7d950
Add an arg_iterator, for iterating over a subset of arguments in an ArgList.
...
llvm-svn: 89860
2009-11-25 11:33:30 +00:00
Daniel Dunbar
ad2278d74c
Add clang -cc1 parsing for frontend options.
...
llvm-svn: 89856
2009-11-25 10:14:52 +00:00
Daniel Dunbar
9efcf351bd
Add clang -cc1 parsing for preprocessor output options (-E).
...
llvm-svn: 89854
2009-11-25 10:14:37 +00:00
Daniel Dunbar
5bdd299bfd
Don't pass -fexceptions=0 (it is the default).
...
llvm-svn: 89853
2009-11-25 10:14:30 +00:00
Edward O'Callaghan
c92791193d
Fix for Path::isSpecialFile to Path::isRegularFile API in rev 89765.
...
llvm-svn: 89849
2009-11-25 06:33:27 +00:00
Edward O'Callaghan
db521ec23b
Fix for PR5568.
...
llvm-svn: 89766
2009-11-24 15:23:21 +00:00
Daniel Dunbar
8d731964d0
Sketch the rest of the clang -cc1 option definitions, aka fun with C-x C-(.
...
llvm-svn: 89721
2009-11-24 00:54:16 +00:00
Daniel Dunbar
8a9fa3af69
Add clang -cc1 parsing of diagnostic options.
...
llvm-svn: 89716
2009-11-23 23:41:17 +00:00
Daniel Dunbar
180f1fe4ce
Recognize .hpp as a C++ header.
...
llvm-svn: 89630
2009-11-22 22:08:27 +00:00
Daniel Dunbar
f5835ea2e7
Add clang -cc1 parsing of analyzer options.
...
llvm-svn: 89629
2009-11-22 22:08:20 +00:00
Daniel Dunbar
f4b39e9c95
Fix refacto, gcc's cc1 needs to see --output-pch=, which is not just an alias
...
for -output-pch=.
llvm-svn: 89534
2009-11-21 02:31:29 +00:00
Daniel Dunbar
a764eef0e9
Driver: Add clang -cc1 dependency output options parsing.
...
llvm-svn: 89508
2009-11-20 23:28:07 +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
Daniel Dunbar
4274685b63
Pass '-mcpu' 'FOO' instead of '-mcpu=FOO'.
...
llvm-svn: 89498
2009-11-20 22:21:52 +00:00
Daniel Dunbar
8bed86c43e
Standardize Driver translation to call clang-cc using '-foo' form instead of '--foo'.
...
llvm-svn: 89497
2009-11-20 22:21:36 +00:00
Daniel Dunbar
69fd86dd44
Add clang -cc1 parsing of CodeGenOptions.
...
llvm-svn: 89464
2009-11-20 17:23:30 +00:00
Daniel Dunbar
f7535121a2
Driver: Add parsing for TargetOptions to CompilerInvocation::CreateFromArgs.
...
llvm-svn: 89435
2009-11-20 01:46:44 +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
Daniel Dunbar
8c9efca5bd
Driver: Move INPUT and UNKNOWN sentinel options into the OptParser.td file.
...
llvm-svn: 89371
2009-11-19 18:47:17 +00:00
Daniel Dunbar
f57e69c78a
Add missing dependency for CMake.
...
llvm-svn: 89332
2009-11-19 07:37:40 +00:00
Daniel Dunbar
be6ef3874f
Sketch .td file and build system goop for OptTable based clang-cc options.
...
llvm-svn: 89330
2009-11-19 07:19:04 +00:00
Daniel Dunbar
52ed5feee5
Factor out OptTable::ParseArgs, for parsing an entire argument vector.
...
llvm-svn: 89327
2009-11-19 06:35:06 +00:00
Daniel Dunbar
484afa2d3b
Switch -f{builtin,math-errno,rtti} and -analyzer-purge-dead to -...no... variants instead of using llvm: 🆑 :init(true) arguments.
...
llvm-svn: 89315
2009-11-19 04:55:23 +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
b323fd72ab
Driver: Take option ID for {Input,Unknown}Option, to drop dependency on actual options.
...
llvm-svn: 89312
2009-11-19 04:25:06 +00:00
Daniel Dunbar
8c00957008
Driver: Introduce OptSpecifier class for protecting access to an option id.
...
llvm-svn: 89310
2009-11-19 04:14:53 +00:00
Daniel Dunbar
fffd18167d
Driver: Switch to using explicit {getLast,has}ArgNoClaim functions instead of taking a Claim argument.
...
- Most driver code always claims, and bool arguments don't play nice with the overloads.
llvm-svn: 89308
2009-11-19 04:00:53 +00:00
Daniel Dunbar
b3b47b8dde
Driver: Resolve inconsistency in matching options against options which are
...
aliases -- just treat this case as an (unchecked) client error.
llvm-svn: 89306
2009-11-19 03:26:50 +00:00
Daniel Dunbar
0bfb21e4b0
Use Option::matches instead of direct ID comparison.
...
llvm-svn: 89305
2009-11-19 03:26:40 +00:00
Daniel Dunbar
46fffee081
Driver: Switch to using TableGen'erated Options.inc instead of Options.def file.
...
llvm-svn: 89288
2009-11-19 01:03:50 +00:00
Daniel Dunbar
aa767378ac
Driver: Split OptTable out into OptTable.{h,cpp}
...
llvm-svn: 89283
2009-11-19 00:15:11 +00:00
Daniel Dunbar
7147de2c4e
Make MSVC happy.
...
llvm-svn: 89247
2009-11-18 21:42:57 +00:00
Daniel Dunbar
26228a0d7a
Driver: Rework OptTable to have no dependency on the options it manages.
...
llvm-svn: 89234
2009-11-18 20:19:36 +00:00
Daniel Dunbar
a76762c9fb
Driver: Make local type name more distinct.
...
llvm-svn: 89233
2009-11-18 20:19:26 +00:00
Daniel Dunbar
f324fa7095
Driver: Store Option ID field as unsigned to drop dependency on the options
...
type.
llvm-svn: 89232
2009-11-18 20:19:19 +00:00
Daniel Dunbar
21432d38a0
Driver: Switch Options.def to storing flags as a bitmask (instead of mangled
...
into a string).
llvm-svn: 89212
2009-11-18 17:42:34 +00:00
Edward O'Callaghan
c14422223b
Fix passing stdc++ correctly in the FreeBSD toolchain support, Credit to Roman Divacky.
...
llvm-svn: 89205
2009-11-18 14:51:31 +00:00
David Chisnall
950a9518b1
Added block type introspection support.
...
As per Fariborz's suggestion, committed now but can be reverted later if the used flag is problematic for Apple.
llvm-svn: 89134
2009-11-17 19:33:30 +00:00
Daniel Dunbar
4930e3357b
Add -fblocks, -stack-protector, and -fobjc-nonfragile-abi defaulting to driver,
...
instead of using getDefaultLangOptions.
- Remove unused -fobjc-tight-layout while at it.
llvm-svn: 89065
2009-11-17 08:07:36 +00:00
Daniel Dunbar
f408303a3f
Add driver::types::isObjC predicate.
...
llvm-svn: 89064
2009-11-17 08:07:16 +00:00
Daniel Dunbar
4656c53e12
Move -fnext-runtime defaulting to driver (and change clang-cc default to
...
-fnext-runtime), instead of using getDefaultLangOptions.
llvm-svn: 89058
2009-11-17 07:07:28 +00:00
Daniel Dunbar
0730e4f7e0
Move -fms-extensions defaulting to driver, instead of using getDefaultLangOptions.
...
llvm-svn: 89057
2009-11-17 07:06:20 +00:00
Daniel Dunbar
d609b7bbe9
Move char-is-signed defaulting to driver, instead of using
...
getDefaultLangOptions.
llvm-svn: 89053
2009-11-17 06:37:03 +00:00
Daniel Dunbar
e13ada6a3b
Add clang -mcpu=native support, patch by Roman Divacky, varioustweaks by me.
...
- We still need support for detecting the target features, since the name
doesn't actually do a good job of decribing what the CPU supports (for LLVM).
llvm-svn: 88819
2009-11-14 22:04:54 +00:00
Edward O'Callaghan
932c32043a
Fix for FreeBSD toolchain in regards to CPP, Credit to Roman Divacky.
...
llvm-svn: 86459
2009-11-08 10:13:36 +00:00
John Thompson
ed4e2950bc
Adding -fshort-wchar option.
...
llvm-svn: 86167
2009-11-05 20:14:16 +00:00
Daniel Dunbar
5ec950218a
Move -fcolor-diagnostics logic to driver.
...
llvm-svn: 86014
2009-11-04 06:24:57 +00:00
Daniel Dunbar
2c9784769a
Move logic for selection -fmessage-length= to driver.
...
llvm-svn: 86013
2009-11-04 06:24:47 +00:00
Daniel Dunbar
1c7577c9bd
Fix indentation.
...
llvm-svn: 86011
2009-11-04 06:24:38 +00:00
Tanya Lattner
f9d41df093
Merge constant array and structures. This will create a global variables for arrays and structs that are constant and their initializer is constant. It is on by default but can be disable with the flag -fno-merge-all-constants.
...
llvm-svn: 85991
2009-11-04 01:18:09 +00:00
Chris Lattner
e9d7d78ab3
Implement support for the -undef command line option, patch by
...
Roman Divacky! PR5363
llvm-svn: 85932
2009-11-03 19:50:27 +00:00
Mike Stump
0a65b636ce
Fix -pthread on dragonfly. Patch by Sascha Wildner.
...
llvm-svn: 85679
2009-10-31 20:11:46 +00:00
Daniel Dunbar
624c21b029
Change the driver to do the Darwin triple mangling itself instead of forwarding
...
-mmacosx-version-min and -miphoneos-version-min to clang-cc.
llvm-svn: 85600
2009-10-30 18:12:20 +00:00
Daniel Dunbar
1a8a2e8e97
Remove some obsolete or unnecessary FIXMEs.
...
llvm-svn: 85475
2009-10-29 02:39:57 +00:00
Daniel Dunbar
945577ce93
PR5328: Allow duplicatic -pedantic (and -pedantic-errors) options.
...
- clang-cc doesn't care about their relative order with other -W options.
llvm-svn: 85473
2009-10-29 02:24:45 +00:00
Daniel Dunbar
b0b18615e2
Kill off MakeFormattedString helper function.
...
llvm-svn: 85472
2009-10-29 02:24:37 +00:00
Daniel Dunbar
38b6279ce4
Reject -I- in driver instead of clang-cc.
...
llvm-svn: 85469
2009-10-29 01:53:44 +00:00
Douglas Gregor
f7b87cb529
[llvm up]
...
Switch a few ugly switch-on-string-literal constructs to use the new
llvm::StringSwitch.
llvm-svn: 85461
2009-10-29 00:41:01 +00:00
Edward O'Callaghan
5c5214626c
Fix for PR4887, Credit to Jonathan Gray.
...
llvm-svn: 85392
2009-10-28 15:13:08 +00:00
Rafael Espindola
b3549d74da
Rename -nostdclanginc to -nobuiltininc.
...
llvm-svn: 85116
2009-10-26 13:36:57 +00:00
Daniel Dunbar
820782aae0
Driver: Fix thinko in logic for finding gcc's tool chain directory.
...
llvm-svn: 84805
2009-10-22 00:12:00 +00:00
Benjamin Kramer
961b4e3edb
Driver: don't produce bogus osx version numbers if no version (aka 0) was specified.
...
llvm-svn: 84781
2009-10-21 21:05:07 +00:00
Daniel Dunbar
f4534ee0a3
Driver: If unable to find the gcc tool chain, try the next OS rev.
...
llvm-svn: 84656
2009-10-20 19:25:43 +00:00
Edward O'Callaghan
f208b55825
AuroraUX toolchain should call GNU assembler not the Solaris assembler.
...
llvm-svn: 84469
2009-10-19 07:02:08 +00:00
Edward O'Callaghan
7d3c275526
dynamic linker arg is incorrectly invoking gnu ld arg syntax instead of svr4 ld syntax in AuroraUX toolchain.
...
llvm-svn: 84266
2009-10-16 19:44:18 +00:00
Nuno Lopes
275225dd05
fix -ansi in c++: it means -std=c++98
...
llvm-svn: 84254
2009-10-16 14:28:06 +00:00
Daniel Dunbar
cbc34b769e
Driver: Default to using PTH for C++ precompiled header support, PCH for C++
...
isn't implemented yet.
- <rdar://problem/7297571> Clang should use pretokenized headers for C++ PCH
files
llvm-svn: 84197
2009-10-15 20:02:44 +00:00
Edward O'Callaghan
d8712d9143
AuroraUX toolchain fixes.
...
llvm-svn: 84176
2009-10-15 07:44:07 +00:00
Edward O'Callaghan
fc460554f6
-funit-at-a-time is the default however some current makefiles pass -fno-unit-at-a-time which is ignored by GCC, we should warn about this not error out.
...
llvm-svn: 83976
2009-10-13 16:41:34 +00:00
Mike Stump
727170d2d8
Allow customization for the version line.
...
llvm-svn: 83652
2009-10-09 17:31:54 +00:00
Douglas Gregor
01249503fe
Installation of Clang libraries and headers, from Axel Naumann!
...
llvm-svn: 83582
2009-10-08 22:15:31 +00:00
Ted Kremenek
7881ac97a5
Revert r83443.
...
llvm-svn: 83451
2009-10-07 03:21:11 +00:00
Mike Stump
db9fca7735
Fixup pathnames.
...
llvm-svn: 83443
2009-10-07 01:11:54 +00:00
Rafael Espindola
7787d79c7b
Add the -nostdclanginc option to clang (the driver).
...
llvm-svn: 83377
2009-10-06 12:45:37 +00:00
Douglas Gregor
1b7035da6f
Provide a common set of routines in Version.h that return Subversion
...
branch/revision information. Use that information in the driver,
rather than one-off branch/revision computation.
llvm-svn: 83321
2009-10-05 20:33:49 +00:00
Fariborz Jahanian
e4b21aba44
Set __EXCEPTIONS by checking on darwin's triple.
...
Patch by Rafael Espindola.
llvm-svn: 83209
2009-10-01 20:30:46 +00:00
Rafael Espindola
00a665751d
Move the "needs exception support" logic to clang. This also fixes
...
-fno-exceptions in C++ code. We used to always define __EXCEPTIONS in
C++.
llvm-svn: 83199
2009-10-01 13:33:33 +00:00
Daniel Dunbar
d71a03b164
Fix truck sized thinko where Darwin/ARM toolchain didn't look for programs in
...
libexec, *blush*.
llvm-svn: 83086
2009-09-29 18:52:10 +00:00
Ted Kremenek
05e6f5b6e9
Turn on 'RegionStore' as the default store manager both for 'clang --analyze' and 'scan-build'. Leave 'BasicStore' as the default store manager in 'clang-cc'. While there are still known warts with RegionStore, it's ready to be tested by general users.
...
llvm-svn: 82752
2009-09-25 05:55:59 +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
Daniel Dunbar
6276f99be5
Split Darwin toolchain into Clang and GCC Darwin toolchains with a common base.
...
llvm-svn: 82213
2009-09-18 08:15:13 +00:00
Daniel Dunbar
26d482a1a9
Lift AddLinkRuntimeLibArgs into Darwin tool chain.
...
llvm-svn: 82212
2009-09-18 08:15:03 +00:00
Daniel Dunbar
d5bd81e869
Move isMacosxVersionLT helpers to Darwin tool chain.
...
llvm-svn: 82211
2009-09-18 08:14:55 +00:00
Daniel Dunbar
510d8a8dd8
Lift getMacosxVersionMin out into Darwin ToolChain.
...
llvm-svn: 82210
2009-09-18 08:14:46 +00:00
Daniel Dunbar
4c30b89def
Lift AddLinkerSearchPaths() into Darwin tool chain.
...
llvm-svn: 82209
2009-09-18 08:14:36 +00:00
Daniel Dunbar
48622c13f7
Rename a variable to match its semantics.
...
llvm-svn: 82208
2009-09-18 08:14:24 +00:00
Daniel Dunbar
58f7833cfb
Driver: Change -O to mean -O2, -O1 is meaningless.
...
llvm-svn: 82131
2009-09-17 06:53:36 +00:00
Daniel Dunbar
07806ca7ab
Improve driver error message when only running the preprocessor and an input is
...
already preprocessed.
--
ddunbar@giles:tmp$ touch t.i
ddunbar@giles:tmp$ gcc -E t.i
ddunbar@giles:tmp$ clang -E t.i
clang: warning: t.i: previously preprocessed input unused when '-E' is present
ddunbar@giles:tmp$
--
<rdar://problem/6813375> [driver] driver prints confusing message when running -E on preprocessed file
llvm-svn: 82120
2009-09-17 04:13:26 +00:00
Daniel Dunbar
d112f103e7
We don't need a -compile-ast clang-cc action, we can just use -S.
...
llvm-svn: 82105
2009-09-17 00:47:53 +00:00
Daniel Dunbar
306945d3d0
Incremental improvement to logic determining whether we emit unwind tables or
...
not.
- PR4932.
llvm-svn: 82021
2009-09-16 06:17:29 +00:00
Daniel Dunbar
4ed7898294
Support -mabi= for clang/ARM.
...
llvm-svn: 81734
2009-09-14 00:34:46 +00:00
Daniel Dunbar
33a004e9eb
Swizzle the target triple based on -mthumb, and update clang-cc to recognize
...
thumb-foo-bar as an ARM target.
llvm-svn: 81497
2009-09-11 01:14:50 +00:00
Daniel Dunbar
7848592ec6
Initial handling of -m{soft-float,hard-float,float-abi=} for ARM.
...
llvm-svn: 81471
2009-09-10 23:00:09 +00:00
Daniel Dunbar
e2cf8f7b53
Move X86 handling of -m[no-]soft-float and -m[no-]red-zone into AddX86TargetArgs.
...
llvm-svn: 81470
2009-09-10 22:59:57 +00:00
Daniel Dunbar
f492c92761
Change getLLVMArchNameForARM to just get the suffix.
...
llvm-svn: 81469
2009-09-10 22:59:51 +00:00
Daniel Dunbar
fb58b0aaa9
Add code to mangle the triple for LLVM on ARM.
...
- I think we should get rid of this distinction though, but I need to discuss with the interested parties.
llvm-svn: 81435
2009-09-10 06:49:20 +00:00
Daniel Dunbar
4fa0811e4c
Don't pass -fno-builtin-str{cat,cpy} to clang-cc, I forget we don't support that yet. PR4941.
...
llvm-svn: 81430
2009-09-10 04:57:27 +00:00