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

263 Коммитов

Автор SHA1 Сообщение Дата
Chris Lattner 5b37dc0380 some arm triples have weird characters in them, just fuzzy match
on armv* to be more compatible


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69864 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-23 04:22:04 +00:00
Douglas Gregor 370187c8a3 Remove the serialization code that predates precompiled
headers. Future approaches to (de-)serializing ASTs will be based on
the PCH infrastructure.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69828 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-22 21:45:53 +00:00
Chris Lattner 25bcbaf556 Add missing dependency, patch by Jason Haslam!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69819 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-22 18:59:57 +00:00
Sanjiv Gupta 70aa5f9e9f Pass and return aggregate types directly to function calls.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69668 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-21 06:01:16 +00:00
Daniel Dunbar e46e354ecb Don't crash in the diagnostic printer if we happen to get passed a
null string / identifier.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69575 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-20 06:13:16 +00:00
Chris Lattner 3bc172bc6a move group twiddling options into Diagnostic.cpp instead of
Warnings.cpp.  Warnings.cpp now doesn't need to #include
tblgen produced output directly.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69559 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-19 22:34:23 +00:00
Eli Friedman b030f02725 Add target property for whether thread-local storage is supported.
Let me know if I messed up for some target.  Note that for Windows, we 
should be able to support it (MSVC supports "__declspec(thread)"), but 
I'm pretty sure LLVM doesn't know how to generate the correct code.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69552 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-19 21:38:35 +00:00
Chris Lattner 5417544b42 actually just do this on all x86 targets, it won't hurt
non-glibc ones.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69528 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-19 17:32:33 +00:00
Chris Lattner 09b5cc69f0 Define __NO_MATH_INLINES on linux/x86 so that we don't get inline
functions in glibc header files that use FP Stack inline asm which the
backend can't deal with (PR879).

This "fixes" PR3970 for linux.  Other affected systems should do similar
things.  Maybe this should just go to the general i386/x86-64 sections?



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69527 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-19 17:29:50 +00:00
Chris Lattner 87d854ebed optimize and comment GetDiagInfo.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69273 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-16 06:13:46 +00:00
Chris Lattner 121f60c2aa merge several scattered tables into StaticDiagInfo.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69272 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-16 06:07:15 +00:00
Chris Lattner 33dd2822f3 Implement Diagnostic::getWarningOptionForDiag with information from tblgen,
this implements -fdiagnostics-show-option in clang-cc.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69271 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-16 06:00:24 +00:00
Chris Lattner 19cbb44e3c tblgen is now passing diagnostic group information in the .inc file, ignore it everywhere.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69269 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-16 05:52:14 +00:00
Chris Lattner d51d74a3e8 implement framework for -fdiagnostics-show-option, but tblgen isn't
passing down the right info yet.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69268 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-16 05:44:38 +00:00
Chris Lattner b54b276a92 move handling of -pedantic and -pedantic-errors into Diagnostics,
out of Warnings.cpp.  This simplifies warnings.cpp and makes it more
efficient.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69266 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-16 05:04:32 +00:00
Chris Lattner 2b07d8fe9e arrange for -Wno-error=foo warnings to be immune to -Werror as
they are supposed to be.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69265 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-16 04:32:54 +00:00
Chris Lattner 691f1ae716 change mappings to distinguish between "unset", "set by the user" and
"set to the default value".


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69264 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-16 04:12:40 +00:00
Chris Lattner fe526d2be9 fix some out of bounds array access problems, which manifest particularly
spectacularly when built for x86-64.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69197 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-15 18:48:23 +00:00
Chris Lattner d2aa7c90e7 move {'s
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69179 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-15 17:13:42 +00:00
Chris Lattner 8a941e0c71 Make diagnostic class explicit in the diag record instead of
implicit from its parenting.  Now that diag mapping is 
explicit, eliminate the fatal and extwarn classes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69177 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-15 16:56:26 +00:00
Chris Lattner 4ac072aceb Tblgen now passes the default mapping explicitly, instead of having it
be tied to the diag class.  This requires an LLVM tree update.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69175 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-15 16:44:12 +00:00
Chris Lattner 27ceb9d77d Rejigger how -pedantic and -pedantic-errors work and their interaction
with other diagnostic mapping.  In the new scheme, -Wfoo or -Wno-foo or 
-Werror=foo all override the -pedantic options, and __extension__ 
robustly silences all extension diagnostics in their scope.

An added bonus of this change is that MAP_DEFAULT goes away, meaning that
per-diagnostic mapping information can now be stored in 2 bits, doubling
the density of the Diagnostic::DiagMapping array.  This also 
substantially simplifies Diagnostic::getDiagnosticLevel.

OTOH, this temporarily introduces some "macro intensive" code in 
Diagnostic.cpp.  This will be addressed in a later patch.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69154 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-15 07:01:18 +00:00
Mike Stump aa771a838a Fixup whitespacing.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69055 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-14 18:24:37 +00:00
Douglas Gregor bd94500d3a Include the SourceManager's line table in the PCH file. We can now
properly cope with #line directives in PCH files.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68963 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-13 16:31:14 +00:00
Douglas Gregor d4f77aa7c2 Factor the internals of SourceManager (specially, LineTableInfo) into a separate Internals header. No functionality change
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68960 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-13 15:31:25 +00:00
Daniel Dunbar 8d33cd77dc Support -miphoneos-version-min in clang-cc.
- Patch by Shantonu Sen (with a minor tweak to split out
   getDarwin{OSX,IPhoneOS}Defines)!

 - <rdar://problem/6776277> Need clang-cc/ccc-analyzer support for
   -miphoneos-version-min


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68815 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-10 19:52:24 +00:00
Chris Lattner b8e240ed8b Add initial support for -imacros. Right now it has the same semantics as
-include, but that will be fixed soon.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68625 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-08 18:24:34 +00:00
Chris Lattner 837e897660 remove fixme!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68589 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-08 03:47:39 +00:00
Mike Stump 437bb4b6ec Add basic support for arm static analysis checking. Radar 6699395
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68582 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-08 02:07:04 +00:00
Chris Lattner 10d2427386 Fariborz points out that weak is now defined to the attribute even
in C mode.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68520 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-07 16:50:40 +00:00
Chris Lattner 3a5cbd37c9 The __weak and __strong defines are common to all darwin targets
and are even set in C mode.  As such, move them to Targets.cpp.

__OBJC_GC__ is also darwin specific, but seems reasonable to always
define it when in objc-gc mode.

This fixes rdar://6761450


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68494 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-07 04:48:21 +00:00
Anton Korobeynikov 264a76cdf3 Provide sema proper values of maximal number of arguments passed in registers.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68413 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-03 23:38:25 +00:00
Daniel Dunbar a9668e0b4c Add target hook for setting symbol prefix and section of unicode
string literals.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68363 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-03 00:57:44 +00:00
Douglas Gregor 2b63fbc9bf Fix a little typo that was killing de-serialization
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68354 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-03 00:25:09 +00:00
Douglas Gregor 3050ed44ae Resynchronize Decl/VarDecl serialization code with the structures
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68346 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-02 23:40:00 +00:00
Steve Naroff e9b7d8ace8 Add ConvertUTF module from http://www.unicode.org/Public/PROGRAMS/CVTUTF.
#ifdef'd out the 5 conversion routines that we don't currently need.

Still need a bit more work in GetAddrOfConstantCFString(). Added a FIXME to indicate this.

Expect to remove the FIXME today...


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68208 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-01 15:50:34 +00:00
Daniel Dunbar 8e5c2b8072 Add Target hooks for IRgen of [cf]string literals.
- Notably, set section on cfstring literal string data (for now, this
   is done everywhere because it matches what we were already doing
   for the CFString data itself)

 - <rdar://problem/6599098> [irgen] linker requires objc string data
   to go into cstring


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68160 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-31 23:42:16 +00:00
Eli Friedman 1afabd9485 Fix the default for intptr_t on *BSD x86-32 and Windows. Slight cleanup
by moving the general case to the generic x86-32 target.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68015 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-29 20:31:09 +00:00
Daniel Dunbar 1e0107a3d1 Ad FreeBSD ARM target info.
- Patch by Ed Schoeten!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67527 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-23 16:09:04 +00:00
Douglas Gregor 25a88bbf04 Eliminate post-diagnostic hooks. Instead, implement a Sema-specific
variant of DiagnosticBuilder that emits the template instantiation
backtrace when needed.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67413 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-20 22:48:49 +00:00
Chris Lattner ca45cffe5e refactor some code, fixing a problem discovered by the dragonfly bsd people, where
clang was defining "i386" even when in non-gnu mode.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67378 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-20 16:06:38 +00:00
Chris Lattner 318ca7106d pass langoptions around.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67376 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-20 15:55:34 +00:00
Chris Lattner 33328642a7 pass LangOptions into TargetInfo::getTargetDefines, so that targets
can have language-specific defines.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67375 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-20 15:52:06 +00:00
Sebastian Redl 4d7a089144 Bindir and Win32 builds work, so switch to .inc files. Leave the .def files in the tree for a day or so longer.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67346 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-19 23:18:26 +00:00
Douglas Gregor 525c4b0d1b Allow notes to be printed following a fatal error, then suppress any
diagnostics following those notes. 

Make exceeding the template instantiation depth a fatal error.

Thanks to Daniel for pointing out the problem!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67320 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-19 18:55:06 +00:00
Douglas Gregor a393e9eedc Build system changes to use TableGen to generate the various
diagnostics. This builds on the patch that Sebastian committed and
then revert. Major differences are:

  - We don't remove or use the current ".def" files. Instead, for now,
    we just make sure that we're building the ".inc" files.
  - Fixed CMake makefiles to run TableGen and build the ".inc" files
    when needed. Tested with both the Xcode and Makefile generators
    provided by CMake, so it should be solid.
  - Fixed normal makefiles to handle out-of-source builds that involve
    the ".inc" files.

I'll send a separate patch to the list with Sebastian's changes that
eliminate the use of the .def files.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67058 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-16 23:06:59 +00:00
Sebastian Redl e89b6b272f Revert the switch to the tablegen diags. It fails for seperate objdir builds and cmake builds, and I have no clue what to do about it. Revisit this after someone with a clue about the build systems has looked at it.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67009 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-14 15:58:54 +00:00
Sebastian Redl 3801d71fbe Switch diagnostics from .def to tablegen files. Please validate the Windows build.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67007 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-14 12:00:12 +00:00
Daniel Dunbar 50f4f46902 Add Diagnostic files for Frontend and move a couple errors over.
- Notably, clang now exits with an error if it can't find a
   file. This flushed out a bug in the CGColorSpace.c test case. :)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66789 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-12 10:14:16 +00:00
Daniel Dunbar 4ad4b3ebbe Driver: Use standard Diagnostic interface for diagnostics.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66786 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-12 08:55:43 +00:00