Daniel Dunbar
bbe8e3eff5
Driver/Darwin: Be bug compatible with GCC and ignore -pg on ARM.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126767 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-01 18:49:30 +00:00
Roman Divacky
451f8caf37
The default CPU on FreeBSD for i386 should be i486, not pentium4.
...
Patch by Dimitry Andric!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126763 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-01 18:11:37 +00:00
Roman Divacky
58e5ac9d41
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!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126757 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-01 17:53:14 +00:00
Roman Divacky
cfe9af250f
Implement -mrtd which sets the StdCall calling convention to be the default
...
one.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126756 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-01 17:40:53 +00:00
Rafael Espindola
9c094fbcfa
Disable more warnings so that it is safe to use
...
CC="clang -use-gold-plugin -emit-llvm"
CXX="clang++ -use-gold-plugin -emit-llvm"
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126740 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-01 05:25:27 +00:00
Rafael Espindola
035ff0c674
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126713 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-28 23:29:45 +00:00
Argyrios Kyrtzidis
c4d2c9074b
[analyzer] Remove '-analyzer-check-objc-mem' flag, the nominee for best misnomer award.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126676 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-28 19:49:42 +00:00
David Chisnall
e6533ffc68
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.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126654 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-28 17:11:43 +00:00
Chandler Carruth
43f220f6d7
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126640 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-28 07:25:18 +00:00
Anders Carlsson
15348aeb81
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126630 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-28 02:27:16 +00:00
Argyrios Kyrtzidis
a676d501a0
[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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126612 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-28 01:27:12 +00:00
Anders Carlsson
525544de08
Factor code out into a helper function, shouldUseExceptionTablesForObjCExceptions.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126601 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-28 00:44:51 +00:00
Anders Carlsson
e9b801f763
Make clang -cc1 disable Objective-C exceptions by default, and add a -fobjc-exceptions flag to turn them on.
...
Update all tests accordingly.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126177 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-22 01:52:06 +00:00
Chris Lattner
a2e40219e0
Pass the right linker flag in openbsd::Link::ConstructJob,
...
patch by Matthew Dempsky!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126133 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-21 18:36:51 +00:00
Anders Carlsson
da4b7cf09e
Add a new ObjCExceptions member variable to LangOptions. This controls whether Objective-C exceptions are enabled or not (they are by default).
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126061 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-19 23:53:54 +00:00
Argyrios Kyrtzidis
8899ab01d4
[analyzer] '-analyzer-check-objc-mem' can go through the llvm/clang codebase without crashing; enable it for C++.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126026 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-19 08:03:21 +00:00
Daniel Dunbar
8ac38d7b5d
Driver/Darwin: Support -Wl, with -Xarch_. This doesn't work naturally because of
...
the special way we model "linker input" arguments.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126023 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-19 05:33:51 +00:00
Argyrios Kyrtzidis
7dd445ec20
[analyzer] Use the new registration mechanism on the non-path-sensitive-checkers:
...
DeadStoresChecker
ObjCMethSigsChecker
ObjCUnusedIvarsChecker
SizeofPointerChecker
ObjCDeallocChecker
SecuritySyntaxChecker
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125779 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-17 21:39:33 +00:00
NAKAMURA Takumi
0aa205765a
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125742 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-17 08:51:38 +00:00
NAKAMURA Takumi
125b4cb355
Fix whitespace.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125741 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-17 08:50:50 +00:00
Argyrios Kyrtzidis
c9f2e0f286
[analyzer] Use the new registration mechanism on the IdempotentOperationChecker.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125611 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-15 22:55:14 +00:00
Argyrios Kyrtzidis
027a6abdd6
[analyzer] Use the new registration mechanism on some of the internal checks. These are:
...
StackAddrLeakChecker
ObjCAtSyncChecker
UnixAPIChecker
MacOSXAPIChecker
The rest have/create implicit dependencies between checkers and need to be handled differently.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125559 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-15 07:42:33 +00:00
Argyrios Kyrtzidis
43dee22025
[analyzer] Overhauling of the checker registration mechanism.
...
-Checkers will be defined in the tablegen file 'Checkers.td'.
-Apart from checkers, we can define checker "packages" that will contain a collection of checkers.
-Checkers can be enabled with -analyzer-checker=<name> and disabled with -analyzer-disable-checker=<name> e.g:
Enable checkers from 'cocoa' and 'corefoundation' packages except the self-initialization checker:
-analyzer-checker=cocoa -analyzer-checker=corefoundation -analyzer-disable-checker=cocoa.SelfInit
-Introduces CheckerManager and CheckerProvider. CheckerProviders get the set of checker names to enable/disable and
register them with the CheckerManager which will be the entry point for all checker-related functionality.
Currently only the self-initialization checker takes advantage of the new mechanism.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125503 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-14 18:13:31 +00:00
Matt Beaumont-Gay
242302673b
Add braces to quiet a gcc warning.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125309 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-10 20:35:01 +00:00
Roman Divacky
c16bb76f25
Adjust the object files to be linked in when mcount profiling
...
is specified in the FreeBSD linker driver.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125285 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-10 16:59:40 +00:00
Roman Divacky
be4c8705e4
Implement mcount profiling, enabled via -pg.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125282 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-10 16:52:03 +00:00
Daniel Dunbar
17d3fea677
Driver/Frontend: Wire up -mregparm=.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125201 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-09 17:54:19 +00:00
Bob Wilson
fc2bd7c3ef
Add better support for ARM EABI triples.
...
Patch by Renato Golin!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124878 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-04 17:59:28 +00:00
Daniel Dunbar
2843c1900b
Driver: Fix spurious warning (from -cc1) about unused -fapple-kext on C inputs.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124875 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-04 17:24:47 +00:00
Daniel Dunbar
398c610b16
build: Add support for DISABLE_DEFAULT_STRICT_ALIASING, which does what one
...
might expect.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124848 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-04 02:20:39 +00:00
Daniel Dunbar
322c29fefe
clang: Add support for a CC_PRINT_HEADERS environment variable, which mirrors
...
CC_PRINT_OPTIONS and can be used to get some out-of-band information on header
usage from a build.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124751 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-02 21:11:35 +00:00
Benjamin Kramer
8e50a96b38
Add NetBSD target support. Patch by Joerg Sonnenberger.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124736 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-02 18:59:27 +00:00
Nick Lewycky
b2d11cc3ab
Turn on -momit-leaf-frame-pointer by default on all non-Darwin platforms.
...
Fixes PR9121!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124718 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-02 06:43:03 +00:00
Douglas Gregor
6f75550e40
Basic support for -mms-bitfields, from Carl Norum!
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124661 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-01 15:15:22 +00:00
Roman Divacky
80f0ab78f6
Add hardcoded -L/usr/lib after all -L options to the FreeBSD linker
...
invocation.
This mimics what gcc does and fixes libtool check for libraries.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124558 91177308-0d34-0410-b5e6-96231b3b80d8
2011-01-30 08:12:24 +00:00
Argyrios Kyrtzidis
bd5a94e263
[analyzer] Enable the self-init checker under command-line option '-analyzer-check-objc-self-init' which by default
...
is enabled by the driver for '--analyze'.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124266 91177308-0d34-0410-b5e6-96231b3b80d8
2011-01-26 01:26:50 +00:00
Chris Lattner
657ca6683d
improve compatibility with GCC: when generating the ".d" filename to use
...
and the filename has multiple .'s in it, use the last. For example, "foo.bar.cpp"
should produce "foo.bar.d" not "foo.d". Patch by Johan Boule in PR8391
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123576 91177308-0d34-0410-b5e6-96231b3b80d8
2011-01-16 08:14:11 +00:00
Ted Kremenek
f0335171b4
Driver: tweak handling of '--analyze' to invoke
...
analyzer -cc1 options that are tailored to the
input type. If the input type is "C++", we should
only run the dead stores checker (for now). Similarly,
checks specific to Objective-C should only run
on Objective-C Code.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123481 91177308-0d34-0410-b5e6-96231b3b80d8
2011-01-14 22:31:31 +00:00
Michael J. Spencer
32bef4edba
Replace all uses of PathV1::exists with PathV2::fs::exists.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123150 91177308-0d34-0410-b5e6-96231b3b80d8
2011-01-10 02:34:13 +00:00
Fariborz Jahanian
b466d01e46
Add all options needed to support -fapple-kext. wip.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122987 91177308-0d34-0410-b5e6-96231b3b80d8
2011-01-07 01:05:02 +00:00
Fariborz Jahanian
112c3307aa
Fold -fobjc-nonfragile-abi2 into -fobjc-nonfragile-abi.
...
// rdar://8818375
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122831 91177308-0d34-0410-b5e6-96231b3b80d8
2011-01-04 20:05:20 +00:00
Ted Kremenek
c32647d111
Add -fobjc-default-synthesized-properties flag
...
to allow us to explicitly control whether or
not Objective-C properties are default synthesized.
Currently this feature only works when using
the -fobjc-non-fragile-abi2 flag (so there is
no functionality change), but we can now turn
off this feature without turning off all the features
coupled with -fobjc-non-fragile-abi2.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122519 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-23 21:35:43 +00:00
Rafael Espindola
592f241d0a
Fix PR8639 by making the "argument unused during compilation" less agressive. Now we
...
don't warn if an argument is not used because it is shadowed by a subsequent argument.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122281 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-20 22:45:09 +00:00
Michael J. Spencer
472ccff00c
Replace all uses of PathV1::getLast with PathV2::filename.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122117 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-18 00:19:12 +00:00
Daniel Dunbar
9eb93b07ea
Driver: M and MM should be grouped together, <rdar://problem/8744831>.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121284 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-08 21:33:40 +00:00
Rafael Espindola
49c64fdcf3
Handle -nostartfiles.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120528 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-01 01:52:43 +00:00
Michael J. Spencer
03013fa9a0
Merge System into Support.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120297 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-29 18:12:39 +00:00
Anders Carlsson
a4c2475961
Forward the -fno-elide-constructor argument to clang -cc1. Fixes PR8652.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119915 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-21 00:09:52 +00:00
Daniel Dunbar
a30d6cdc3a
Driver/Darwin: Don't pass -demangle to an iOS linker, which may not understand
...
it.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119809 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-19 17:51:40 +00:00
Daniel Dunbar
d02bba8e2a
Driver: Ignore -force_cpusubtype_ALL.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119803 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-19 16:23:35 +00:00