Граф коммитов

966 Коммитов

Автор SHA1 Сообщение Дата
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
Daniel Dunbar 34f9e29641 Driver: Attmpt to fix some possibly UB that MSVC doesn't care for.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126513 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-25 21:20:15 +00:00
Chandler Carruth 3fd345a59d Add support for ArchLinux, patch by Kevin Winchester.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126476 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-25 06:39:53 +00:00
Chris Lattner 6b7367e53c improve support for SUSE Linux Enterprise Server 11 SP1 (x86_64).
Patch by Csaba Raduly!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126245 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-22 20:47:07 +00:00
Joerg Sonnenberger 0bb208c91e Remove the storage for -cxx-system-include. Make libcxx toolchain
use -nostdinc++ and -cxx-isystem.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126223 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-22 15:19:35 +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
Ted Kremenek 2fb468dcf8 Disable default synthesized properties until we can properly re-evaluate the feature.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125708 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-17 02:17:56 +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
NAKAMURA Takumi 886e1606c2 CMake: LLVM_NO_RTTI must be obsolete now!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125275 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-10 09:15:32 +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
Benjamin Kramer 09982cec00 Allow multiple -B prefixes. Patch by Joerg Sonnenberger.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125111 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-08 20:31:42 +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
Oscar Fuentes 2100fe952a Moved here from LLVM Clang's configuration options and related macros.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124825 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-03 22:48:20 +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
Nick Lewycky e10f900953 Add support for x86-64 Mandriva 2010.2. Reported by 'rindolf' on IRC!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124699 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-01 23:03:29 +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
Chris Lattner 48aef3625a optimize out a temporary sys::Path
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123359 91177308-0d34-0410-b5e6-96231b3b80d8
2011-01-13 01:35:58 +00:00
Michael J. Spencer 2dea7c7c23 replace all uses of PathV1::IsSymlink with PathV2::is_symlink.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123344 91177308-0d34-0410-b5e6-96231b3b80d8
2011-01-12 23:54:48 +00:00
Daniel Dunbar 95a907fc0f Driver: Change -dumpversion to return a GCC compatible answer.
- See comment for why.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123296 91177308-0d34-0410-b5e6-96231b3b80d8
2011-01-12 00:43:47 +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
Nick Lewycky 3fdcc6fb12 Remove stray emacs mode markers in all these files that was causing emacs to
open them in fundamental-mode instead of c++-mode.
Also twiddle whitespace for consistency in ToolChains.cpp.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122646 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-31 17:31:54 +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 d5b08bee79 Replace all uses of PathV1::get{Basename,Dirname,Suffix} with their PathV2 equivalents.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122140 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-18 04:13:32 +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