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

543 Коммитов

Автор SHA1 Сообщение Дата
Eli Friedman a9f5496df4 Class reorg for ARM. Shouldn't be any visible changes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55042 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-20 07:44:10 +00:00
Eli Friedman 01b866808f Class hierarchy reorg for Sparc architecture. While I was there, I
cleaned it up a bit, including fixing the definition of va_list; this
shouldn't break anything, but anyone using Sparc should watch for 
regressions.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55041 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-20 07:28:14 +00:00
Eli Friedman 618234a748 Reorganize the class hierarchy for x86 targets; shouldn't have any
visible effects, but this will significantly reduce the amount of 
boilerplate code necessary to add subtargets.

If this looks okay, I'll do the rest of the processors (PPC, Sparc, ARM) 
soon.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55036 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-20 02:34:37 +00:00
Chris Lattner 1e21189547 Fix PR2627, support for Q constraint.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54943 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-18 20:05:00 +00:00
Sanjiv Gupta 364af81157 Allow targets to override description string.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54914 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-18 10:05:22 +00:00
Daniel Dunbar fba5cb12ad Move some ObjC preprocessor definitions into
InitializePredefinedMacros().
 - Also now properly wired to -fobjc-gc, -fnext-runtime.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54661 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-12 00:21:46 +00:00
Daniel Dunbar f77ac86f4e Add LangOptions::NeXTRuntime.
- Wired to -fnext-runtime and -fgnu-runtime options.
 - Defaults to GNU, no autoselection for NeXT.

Emit NeXT OBJC_IMAGE_INFO marker.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54651 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-11 21:35:06 +00:00
Daniel Dunbar acc5f3e423 More #include cleaning
- Kill unnecessary #includes in .cpp files. This is an automatic
   sweep so some things removed are actually used, but happen to be
   included by a previous header. I tried to get rid of the obvious
   examples and this was the easiest way to trim the #includes in one
   fell swoop.
 - We now return to regularly scheduled development.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54632 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-11 06:23:49 +00:00
Nico Weber 7bfaaaecb3 * Remove isInSystemHeader() from DiagClient, move it to SourceManager
* Move FormatError() from TextDiagnostic up to DiagClient, remove now  
  empty class TextDiagnostic
* Make DiagClient optional for Diagnostic

This fixes the following problems:

* -html-diags (and probably others) does now output the same set of  
  warnings as console clang does
* nothing crashes if one forgets to call setHeaderSearch() on  
  TextDiagnostic
* some code duplication is removed




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54620 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-10 19:59:06 +00:00
Ted Kremenek b4398aa27d Fix --html-diags in driver by delaying the construction of an HTMLDiagnosticClient until after we have created the Preprocessor object.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54472 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-07 17:49:57 +00:00
Daniel Dunbar 4489fe10fa Add EXTWARN Diagnostic class.
- Like EXTENSION but always generates a warning (even without
   -pedantic).
 - Updated ptr -> int, int -> ptr, and incompatible cast warnings to
   be EXTWARN.
 - Other EXTENSION level diagnostics should be audited for upgrade.
 - Updated several test cases to fix code which produced unanticipated
   warnings.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54335 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-05 00:07:51 +00:00
Anders Carlsson 8b7c9fb2ef Always define __SIZE_TYPE__ as long unsigned int.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53922 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-22 17:16:13 +00:00
Nuno Lopes 9d29480174 add x86 EDI register alias
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53170 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-07 12:18:07 +00:00
Nuno Lopes 551d5e9811 move the linux predefined macro definition to the TargetInfo, where it really belongs
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53149 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-05 19:32:25 +00:00
Eli Friedman 5aa4fd65ef Make the width and alignment for long double consistent with the
hardcoded data layout in getTargetDescription.  Hopefully fixes a test 
failure.

Of course, this should be fixed properly, but that's a bigger fix.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51948 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-04 17:01:45 +00:00
Chris Lattner 5b4681c8ef Implement support for -w, which silences all warnings. PR2384.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51683 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-29 15:36:45 +00:00
Eli Friedman bf0c9bdd49 Make sure to define __sparc__ on Solaris; this should "fix"
test/Codegen/mandel.c on Solaris. :-)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51554 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-25 05:26:09 +00:00
Eli Friedman 2553126e29 Missed an include.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51321 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-20 14:27:34 +00:00
Eli Friedman d37f0b82f1 Minor correction for PPC targets.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51320 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-20 14:25:01 +00:00
Eli Friedman 61538a7d13 Some small changes to make the target info a bit more accurate.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51319 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-20 14:21:01 +00:00
Chris Lattner f291b10fa9 set long/pointers to 64-bits on ppc64/x86-64
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50891 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-09 06:17:04 +00:00
Chris Lattner 927686fe8c parameterize pointer size/align better without doing virtual method calls in normal case.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50890 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-09 06:08:39 +00:00
Chris Lattner ec10f58865 parameterize long long.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50887 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-09 05:50:02 +00:00
Chris Lattner 8059e997ee correctly parameterize long, patch by Nate.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50886 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-09 05:47:41 +00:00
Chris Lattner 2621fd1d6d Add basic support for the pic-* target triples and add support for
targets that do not support recursion (and thus codegen stack variables
as globals).

Patch contributed by Alireza Moshtaghi!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50844 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-08 05:58:21 +00:00
Ted Kremenek 01d9dbf4ae Add -fobjc-gc and -fobjc-gc-only options to the driver.
Add corresponding enum in LangOptions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50387 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-29 04:37:03 +00:00
Ted Kremenek 5ab201a324 Have ValidateOutputConstraint return false instead of firing an assertion
when processing a constraint we don't understand.  This allows the frontend
to gracefully fail.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50213 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-24 16:36:38 +00:00
Nate Begeman ad487f4ef2 Add some basic ARM asm constraints
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50085 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-22 05:03:19 +00:00
Chris Lattner d0c33d3527 Fix pasto, thanks to Anders for pointing this out.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50055 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-21 20:19:54 +00:00
Chris Lattner 393ff04a07 add arm support
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50049 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-21 18:56:49 +00:00
Nate Begeman 3d292065d8 Tabs -> spaces
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49909 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-18 17:17:24 +00:00
Nate Begeman d5e2d87d53 Initialize default double width and alignment
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49899 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-18 05:49:49 +00:00
Ted Kremenek d0734e56d6 Fix regression in Diagnostic that caused it to not register the number
of errors.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49686 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-14 21:21:38 +00:00
Ted Kremenek 9fd87b1db4 Added "getCanonicalID()", "isFromSameFile", and "isFromMainFile" to compare
the files of different SourceLocations.  These methods correctly handle the
case where a file may have multiple FileIDs due to it being large enough
to be spread across several chunks.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49682 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-14 21:04:18 +00:00
Ted Kremenek 06bdb3a4fa Only increment the number of diagnostics when the DiagnosticClient used
is the one attached to the Diagnostic object.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49677 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-14 19:56:12 +00:00
Chris Lattner 5483bdf386 add a missing #include
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49256 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-06 04:02:29 +00:00
Ted Kremenek 1758b07ef7 Added "getLogicalLineNumber" and "getLogicalColumnNumber" to FullSourceLoc.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49177 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-03 17:55:15 +00:00
Chris Lattner 35de512b9c Update to match simplified llvm MemoryBuffer interfaces for files.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49042 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-01 18:04:30 +00:00
Chris Lattner be2ab45def prune dead #includes
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49033 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-01 06:08:11 +00:00
Chris Lattner 3c1f7b615c MemoryBuffer::getFile got smarter, obviating the need for readfilefast.
The new MemoryBuffer doesn't "leak" file descriptors and handles the
small file case efficiently.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49032 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-01 06:06:37 +00:00
Steve Naroff ff721524ec Hack ReadFileFast() to raise the threshold of memory mapped files (from 4->12 pages).
This is a temporary solution to avoid running out of file descriptors (which defaults to 256).

Need to benchmark to understand the speed benefit. If the benefit is small, the simple solution is to avoid memory mapping files. If the benefit is significant, more thought is necessary.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48991 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-31 18:44:59 +00:00
Ted Kremenek 615f517709 Added variation of the "Report" method in the class Diagnostic that takes
an optional DiagnosticClient argument that differs from the client stored
internally in the Diagnostic object.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48986 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-31 18:23:15 +00:00
Chris Lattner bda0b626e7 Make a major restructuring of the clang tree: introduce a top-level
lib dir and move all the libraries into it.  This follows the main
llvm tree, and allows the libraries to be built in parallel.  The
top level now enforces that all the libs are built before Driver,
but we don't care what order the libs are built in.  This speeds
up parallel builds, particularly incremental ones.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48402 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-15 23:59:48 +00:00