Commit Graph

18671 Commits

Author SHA1 Message Date
Bob Wilson 87ba1d329a Another cortex-m0 patch from James Orr.
llvm-svn: 128029
2011-03-21 21:55:25 +00:00
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
Daniel Dunbar fe908a805b Frontend: Change CC_PRINT_HEADERS to not print header depth markers, these don't
really make any sense in this environment.

llvm-svn: 128014
2011-03-21 19:37:38 +00:00
Fariborz Jahanian 413e064b45 Fix an objc++ diagnostic initializing objc pointers.
// rdar:// 9139947

llvm-svn: 128013
2011-03-21 19:08:42 +00:00
Ted Kremenek 5e14d39a88 Improve crash recovery cleanup to recovery CompilerInstances during crash recovery. This was a huge resource "root" during crashes.
This change requires making a bunch of fundamental Clang structures (optionally) reference counted to allow correct
ownership semantics of these objects (e.g., ASTContext) to play out between an active ASTUnit and CompilerInstance
object.

llvm-svn: 128011
2011-03-21 18:40:17 +00:00
Ted Kremenek 0aaa67b1c2 Relax assertion to fail during crash recovery cleanup.
llvm-svn: 128010
2011-03-21 18:40:10 +00:00
Ted Kremenek 84de4a1781 Use CrashRecoveryContextCleanup objects to reclaim resources from CompilerInstance objects.
llvm-svn: 128009
2011-03-21 18:40:07 +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
David Chisnall e1d2584d44 Fix Objective-C++ exceptions (GNU runtime).
llvm-svn: 127980
2011-03-20 21:35:39 +00:00
Anders Carlsson 6dc204de40 __cxa_atexit does not throw.
llvm-svn: 127977
2011-03-20 20:52:32 +00:00
Peter Collingbourne a85fc0a2f3 Only objects are declared const by a constexpr specifier, per C++0x [dcl.constexpr]p9
llvm-svn: 127967
2011-03-20 08:06:45 +00:00
Francois Pichet 13b4e68642 Downgrade err_mismatched_exception_spec to a ExtWarning in Microsoft mode. MSVC doesn't do any validation on exception specifications.
This remove 1 error when parsing MSVC stl lib with clang.

llvm-svn: 127961
2011-03-19 23:05:18 +00:00
Daniel Dunbar 7594237964 Unbreak build.
llvm-svn: 127942
2011-03-19 02:06:21 +00:00
Ken Dyck 6d470d9398 Use CharUnits's new increment operator. No change in functionality intended.
llvm-svn: 127938
2011-03-19 01:28:06 +00:00
Daniel Dunbar 5366ff1865 Preprocessor: Don't define __STDC__ in -traditional-cpp mode.
llvm-svn: 127933
2011-03-19 01:04:12 +00:00
Ted Kremenek a872326929 Recovery memory from TypeLocBuilders during crashes.
llvm-svn: 127932
2011-03-19 01:00:38 +00:00
Ted Kremenek f75d089679 Recover memory from RecordLayoutBuilders during crashes.
llvm-svn: 127931
2011-03-19 01:00:36 +00:00
Ted Kremenek ddc06d0bd0 Rename class 'CFGReachabilityAnalysis' to 'CFGReverseBlockReachabilityAnalysis'.
This rename serves two purposes:

- It reflects the actual functionality of this analysis.
- We will have more than one reachability analysis.

llvm-svn: 127930
2011-03-19 01:00:33 +00:00
Ken Dyck 0f2f30b241 Replace literal '8's with CharWidth in AppendBitField. No change in
functionality intended.

llvm-svn: 127927
2011-03-19 00:57:28 +00:00
Peter Collingbourne 599cb8e430 Add support for language-specific address spaces. On top of that,
add support for the OpenCL __private, __local, __constant and
__global address spaces, as well as the __read_only, _read_write and
__write_only image access specifiers.  Patch originally by ARM;
language-specific address space support by myself.

llvm-svn: 127915
2011-03-18 22:38: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 1057f86d0e Lexer: Add extremely limited support for -traditional-cpp, ignoring BCPL
comments.

llvm-svn: 127910
2011-03-18 21:23:38 +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
Anders Carlsson 9583f794c3 Use the newly added FileManager::getNoncachedStatValue when trying to determine if any files in the preamble have changed.
llvm-svn: 127894
2011-03-18 19:23:38 +00:00
Anders Carlsson 5e36840562 Add FileManager::getNoncachedStatValue, which will resolve relative paths against the working directory specified in the file system options.
llvm-svn: 127893
2011-03-18 19:23:19 +00:00
Anders Carlsson c30dcecb5c Correctly store and keep track of the FileSystemOptions in ASTUnit and in clang_codeCompleteAt.
llvm-svn: 127890
2011-03-18 18:22:40 +00:00
Douglas Gregor 96a4bddefb Add an opt-in -Wheader-hygiene, which current diagnoses the use of
global using directives in C++ headers, from Elliot Glaysher!

llvm-svn: 127881
2011-03-18 16:10:52 +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
Abramo Bagnara a3088e6568 Defined friend functions are *implicitly* inlined, unless the inline specifier occurs explicitly.
llvm-svn: 127877
2011-03-18 15:21:59 +00:00
Abramo Bagnara 60804e1604 Fixed inconsistency when adding TemplateParameterListsInfo.
llvm-svn: 127876
2011-03-18 15:16:37 +00:00
Ted Kremenek c93cf2e912 Construct 'Sema' object on the stack, so that crash recovery can recovery it's associated resources without walking over dead stack space.
llvm-svn: 127864
2011-03-18 03:44:21 +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
Ted Kremenek 4422bfea50 Use CrashRecoveryContextCleanup objects to recover an ASTUnit if we crash in ASTUnit::LoadFromCommandLine() and ASTUnit::LoadFromCompilerInvocation().
llvm-svn: 127851
2011-03-18 02:06:56 +00:00
Ted Kremenek 750028b6f4 Use CrashRecoveryContextCleanup objects to release resources associated with Sema during a crash while parsing.
llvm-svn: 127850
2011-03-18 02:06:53 +00:00
Ken Dyck a1b35109cf Convert alignment values to CharUnits. No change in functionality intended.
llvm-svn: 127848
2011-03-18 01:26:17 +00:00
Ken Dyck 33fa9ee4fd Convert getSizeInBytes() to getSizeInChars(), which returns its result in
CharUnits. No change in functionality intended.

llvm-svn: 127846
2011-03-18 01:12:13 +00:00
Ken Dyck 4e54dcaca1 Convert variables to CharUnits in ConvertStructToPacked(). No change in
functionality intended.

llvm-svn: 127844
2011-03-18 00:55:06 +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
Richard Smith 9647d3ca02 Fix PR9488: 'auto' type substitution can fail (for instance, if it creates a reference-to-void type). Don't crash if it does.
Also fix an issue where type source information for the resulting type was being lost.

llvm-svn: 127811
2011-03-17 16:11:59 +00:00
David Chisnall a9e5460f03 Remove code that was intentionally generating bad code on the GNU runtime for no reason (failing to emit .cxx_constructor / .cxx_destructor methods).
llvm-svn: 127806
2011-03-17 14:19:08 +00:00
Ted Kremenek 2551fbe928 Don't construct two CFGs just to run -Wuninitialized. While this causes new warnings to be flagged under -Wconditional-uninitialized, this is something we
can improve over time.

llvm-svn: 127802
2011-03-17 05:29:57 +00:00
Ted Kremenek 70727343cf Teach VariadicMethodTypeChecker about pointers attributed as 'NSObject'.
llvm-svn: 127798
2011-03-17 04:10:25 +00:00