Bob Wilson
d9249414b3
Add clang support for cortex-m0 cpus. Patch by James Orr.
...
llvm-svn: 128018
2011-03-21 20:40:05 +00:00
Joerg Sonnenberger
fcc3ec90a5
Introduce FindTargetProgramPath to check for a target-specific helper
...
program and fallback to plain version otherwise. Use this for the NetBSD
target to make it try e.g. i486--netbsdelf-as and -ld for target
i486--netbsdelf.
llvm-svn: 127996
2011-03-21 14:01:40 +00:00
Joerg Sonnenberger
bc923f3f7d
Memorize presence/absence of -nostdlib in Driver.
...
Drop program paths on NetBSD (unused). Only include lib dir, if
-nostdlib is absent. Use = to allow --sysroot to work.
llvm-svn: 127995
2011-03-21 13:59:26 +00:00
Joerg Sonnenberger
6165ab1132
Remember sysroot in Driver. Pass it down to ld for NetBSD, FreeBSD
...
and DragonFly. Use the --sysroot= form for Linux. Fix handling of =
prefix for -B.
llvm-svn: 127994
2011-03-21 13:51:29 +00:00
Daniel Dunbar
8c3d735118
Driver: Forward -traditional and -traditional-cpp in preprocessing modes.
...
- We don't really support the majority of the horrible -traditional-cpp
behavior, but it is unlikely that we ever will either. This allows us to
start trying to use clang as a /usr/bin/cpp replacement and see what pieces
of -traditional-cpp mode people actually care about.
llvm-svn: 127911
2011-03-18 21:23:40 +00:00
Daniel Dunbar
151a372113
Driver/Darwin: Transparently fallback when compiling i386 -fapple-kext code, we
...
don't support the ABI yet.
llvm-svn: 127903
2011-03-18 20:14:03 +00:00
Daniel Dunbar
1e1c3ca51c
Driver: Give SelectTool access to the action inputs.
...
llvm-svn: 127902
2011-03-18 20:14:00 +00:00
Daniel Dunbar
c76a9e6962
Driver/Darwin: Change fallback to use llvm-gcc search paths instead of GCC.
...
llvm-svn: 127897
2011-03-18 19:25:15 +00:00
Daniel Dunbar
50fab351d7
Driver/Darwin: Kill the DarwinGCC toolchain.
...
llvm-svn: 127896
2011-03-18 19:25:10 +00:00
Rafael Espindola
6b314b3d94
On !Darwin, do use the integrated as with -static.
...
llvm-svn: 127879
2011-03-18 15:50:12 +00:00
John McCall
7ef5cb3038
The Darwin kernel does not provide useful guard variable support.
...
Issue this as an IR-gen error; it's not really worthwhile doing this
"right", i.e. in Sema, because IR gen knows a lot of tricks beyond
what the constant evaluator knows.
llvm-svn: 127854
2011-03-18 02:56:14 +00:00
Daniel Dunbar
c44f8cf7b8
Driver/Obj-C: Be compatible with GCC behavior in that -fno-exceptions *does not*
...
disable Obj-C exceptions.
llvm-svn: 127836
2011-03-17 23:28:31 +00:00
Daniel Dunbar
033a4bc49e
Driver/Darwin: These are command line options, not target features.
...
llvm-svn: 127820
2011-03-17 18:29:04 +00:00
Daniel Dunbar
1d733e2d7e
Driver/Darwin: Suppress spurious warning about -force_cpusubtype_ALL.
...
llvm-svn: 127819
2011-03-17 17:37:29 +00:00
Daniel Dunbar
c9388c11f1
Driver/Darwin/ARM: Kernel/kext code has more strict alignment requirements.
...
llvm-svn: 127815
2011-03-17 17:10:06 +00:00
Daniel Dunbar
b1db4b69cc
Driver/ARM: Match GCC behavior in that -msoft-float disables NEON, despite this
...
not being consistent at all with other parts of the GCC implementation.
llvm-svn: 127777
2011-03-17 00:07:34 +00:00
Joerg Sonnenberger
bdbdf70334
Use C as fallback type if in C preprocessor mode.
...
llvm-svn: 127769
2011-03-16 22:45:02 +00:00
Douglas Gregor
0a36f4d654
Support Ubuntu hardy and intrepid, from Thomas Gamper!
...
llvm-svn: 127583
2011-03-14 15:39:50 +00:00
Ted Kremenek
a4a57c10da
Re-enable the IdempotentOperations checker for --analyze, and put it and the DeadStores checker into the "deadcode" group.
...
llvm-svn: 127531
2011-03-12 06:14:28 +00:00
Joerg Sonnenberger
f496164ceb
Redo part of r127137:
...
Pass down the correct C->getArgs, but keep it with the original
DerivedArgList type. Slightly adjust the MakeIndex call for the
different base type. This unbreaks the handling of --no-mangle on Darwin.
llvm-svn: 127142
2011-03-07 01:15:29 +00:00
Joerg Sonnenberger
9c8ad5fe02
Explicitly initialize CCCIsCPP
...
llvm-svn: 127139
2011-03-07 00:09:32 +00:00
Joerg Sonnenberger
b86f5f4106
If called as *cpp or *cpp-[^-]*, run only the preprocessor. If no
...
input is specified, use stdin implicitly. Based on a patch from
Roman Divacky.
llvm-svn: 127137
2011-03-06 23:31:01 +00:00
Douglas Gregor
d9bb152821
Fix driver for thumb-capable ARM hosts, from Mikko Lehtonen!
...
llvm-svn: 127128
2011-03-06 19:11:49 +00:00
Anton Korobeynikov
a9ff8576fb
Normalize target triple passed out of driver. Basically this means
...
that at cc1 level we will always have normalized triple and thus can
provide necessary default based on e.g. environment value (e.g. for
"arm-eabi" triple, etc.)
llvm-svn: 127087
2011-03-05 16:05:17 +00:00
Daniel Dunbar
908b48565d
build: Allow disabling movt/movw from build, for testing purposes.
...
llvm-svn: 126810
2011-03-02 00:55:57 +00:00
Benjamin Kramer
51477bd0d0
Since getDriver().getInstalledDir() returns a const char *, don't try to
...
compare it with getDriver().Dir.c_str(), since that is a pointer
comparison, not a "are these strings equal" comparison.
Instead, just compare with getDriver().Dir directly, so both sides will
get promoted to std::string, and the regular std::string comparison
operator applies.
Patch by Dimitry Andric!
llvm-svn: 126791
2011-03-01 22:50:47 +00:00
Daniel Dunbar
733b0f87df
Driver/Darwin: Be bug compatible with GCC and ignore -pg on ARM.
...
llvm-svn: 126767
2011-03-01 18:49:30 +00:00
Roman Divacky
432f10df68
The default CPU on FreeBSD for i386 should be i486, not pentium4.
...
Patch by Dimitry Andric!
llvm-svn: 126763
2011-03-01 18:11:37 +00:00
Roman Divacky
2e5065d889
On FreeBSD, we don't want 'getDriver().Dir + "/../lib"' added to the
...
ToolChain's FilePaths. If clang is installed as a port in /usr/local,
it is *not* supposed to use /usr/local/lib by default, for example.
Additionally, there are no clang-related executables in either
/usr/libexec, or getDriver().Dir + "/../libexec", anymore, so remove
that from the ToolChain's ProgramPaths.
Patch by Dimitry Andric!
llvm-svn: 126760
2011-03-01 18:03:28 +00:00
Roman Divacky
ee8188a23b
For linking on FreeBSD, don't add a hardcoded "-L/usr/lib", but
...
retrieve the library paths from the ToolChain object instead.
Copy the relevant code from linuxtools::Link::ConstructJob(), and
replace the std::string stuff with llvm::StringRef, while we're here.
Patch by Dimitry Andric!
llvm-svn: 126757
2011-03-01 17:53:14 +00:00
Roman Divacky
65b88cdb3b
Implement -mrtd which sets the StdCall calling convention to be the default
...
one.
llvm-svn: 126756
2011-03-01 17:40:53 +00:00
Rafael Espindola
d95a81293b
Disable more warnings so that it is safe to use
...
CC="clang -use-gold-plugin -emit-llvm"
CXX="clang++ -use-gold-plugin -emit-llvm"
llvm-svn: 126740
2011-03-01 05:25:27 +00:00
Rafael Espindola
22f60303f2
Don't warn about "clang -use-gold-plugin -c ...". With this users can say
...
CC="clang -use-gold-plugin" CFLAGS=-emit-llvm ../configure...
and not be hit with a warning for each .c file.
llvm-svn: 126713
2011-02-28 23:29:45 +00:00
Argyrios Kyrtzidis
9eb02dfa89
[analyzer] Remove '-analyzer-check-objc-mem' flag, the nominee for best misnomer award.
...
llvm-svn: 126676
2011-02-28 19:49:42 +00:00
David Chisnall
da20991a1b
Make -fobjc-nonfragile-abi and -fgnu-runtime imply -fblocks (unless -fno-blocks is specified), because this combination of flags defines an Objective-C runtime that includes a blocks runtime.
...
llvm-svn: 126654
2011-02-28 17:11:43 +00:00
Chandler Carruth
74f8711802
Fix a tiny goof in the Driver's logic which caused the explicit presence
...
of -fexceptions to disably C++ exceptions. The correct code was in the
ObjC branch, this just mirrors that logic on the C++ side of things.
Thanks to John Wiegley for pointing this out.
llvm-svn: 126640
2011-02-28 07:25:18 +00:00
Anders Carlsson
e96ab55b28
Add a -fcxx-exceptions flag to the frontend, which can be used to enable
...
C++ exceptions, even when exceptions have been turned off using -fno-exceptions.
Make the -fobjc-exceptions flag do the same thing, but for Objective-C exceptions.
C++ and Objective-C exceptions can also be disabled using -fno-cxx-excptions and
-fno-objc-exceptions.
llvm-svn: 126630
2011-02-28 02:27:16 +00:00
Argyrios Kyrtzidis
3e7ab19863
[analyzer] Move the DeadStores checker out of the 'core' package.
...
-Now it gets enabled with '-analyzer-checker=DeadStores'.
-The driver passes the above flag by default.
llvm-svn: 126612
2011-02-28 01:27:12 +00:00
Anders Carlsson
246ff3f19f
Factor code out into a helper function, shouldUseExceptionTablesForObjCExceptions.
...
llvm-svn: 126601
2011-02-28 00:44:51 +00:00
Daniel Dunbar
5480578d83
Driver: Attmpt to fix some possibly UB that MSVC doesn't care for.
...
llvm-svn: 126513
2011-02-25 21:20:15 +00:00
Chandler Carruth
6a4e8e38f2
Add support for ArchLinux, patch by Kevin Winchester.
...
llvm-svn: 126476
2011-02-25 06:39:53 +00:00
Chris Lattner
ba9006df9e
improve support for SUSE Linux Enterprise Server 11 SP1 (x86_64).
...
Patch by Csaba Raduly!
llvm-svn: 126245
2011-02-22 20:47:07 +00:00
Joerg Sonnenberger
fe74286a48
Remove the storage for -cxx-system-include. Make libcxx toolchain
...
use -nostdinc++ and -cxx-isystem.
llvm-svn: 126223
2011-02-22 15:19:35 +00:00
Anders Carlsson
3320e1575f
Make clang -cc1 disable Objective-C exceptions by default, and add a -fobjc-exceptions flag to turn them on.
...
Update all tests accordingly.
llvm-svn: 126177
2011-02-22 01:52:06 +00:00
Chris Lattner
d0257f79bc
Pass the right linker flag in openbsd::Link::ConstructJob,
...
patch by Matthew Dempsky!
llvm-svn: 126133
2011-02-21 18:36:51 +00:00
Anders Carlsson
ce8dd3a5d4
Add a new ObjCExceptions member variable to LangOptions. This controls whether Objective-C exceptions are enabled or not (they are by default).
...
llvm-svn: 126061
2011-02-19 23:53:54 +00:00
Argyrios Kyrtzidis
3b1b3fe039
[analyzer] '-analyzer-check-objc-mem' can go through the llvm/clang codebase without crashing; enable it for C++.
...
llvm-svn: 126026
2011-02-19 08:03:21 +00:00
Daniel Dunbar
1094bb101b
Driver/Darwin: Support -Wl, with -Xarch_. This doesn't work naturally because of
...
the special way we model "linker input" arguments.
llvm-svn: 126023
2011-02-19 05:33:51 +00:00
Argyrios Kyrtzidis
af45aca670
[analyzer] Use the new registration mechanism on the non-path-sensitive-checkers:
...
DeadStoresChecker
ObjCMethSigsChecker
ObjCUnusedIvarsChecker
SizeofPointerChecker
ObjCDeallocChecker
SecuritySyntaxChecker
llvm-svn: 125779
2011-02-17 21:39:33 +00:00
NAKAMURA Takumi
31ea2f14bc
Triple::MinGW64 is deprecated and removed. We can use Triple::MinGW32 instead.
...
No one uses *-mingw64. mingw-w64 is represented as {i686|x86_64}-w64-mingw32.
llvm-svn: 125742
2011-02-17 08:51:38 +00:00