Commit Graph

52739 Commits

Author SHA1 Message Date
Gabor Greif 1b94d420ae add a comment
llvm-svn: 62436
2009-01-18 00:27:21 +00:00
Anders Carlsson 65774916bd Set tab width to 2 characters for all files in lib/Basic
llvm-svn: 62435
2009-01-18 00:18:31 +00:00
Nate Begeman a45707c06a Allow targets to override IntMaxTWidth
llvm-svn: 62434
2009-01-17 23:56:13 +00:00
Anders Carlsson 19aa04d270 Change TargetInfo::validateInputConstraint to take begin/end name iterators instead of the number of outputs. No functionality change.
llvm-svn: 62433
2009-01-17 23:36:15 +00:00
Fariborz Jahanian 18789e1c21 Diagnose that property name cannot be a bitfield
llvm-svn: 62432
2009-01-17 23:21:10 +00:00
Fariborz Jahanian 091ae97786 Diagnose when method parameter is an object.
llvm-svn: 62431
2009-01-17 21:57:49 +00:00
Gabor Greif 20b722fe1c switch over some other methods from indices to iterators
llvm-svn: 62430
2009-01-17 19:46:01 +00:00
Fariborz Jahanian 705c6d9cdd Patch to re-implement ivar-list meta-data generation to fix
cases of unnamed ivar bitfields.

llvm-svn: 62429
2009-01-17 19:36:33 +00:00
Gabor Greif 2269f405b0 make comparisons a bist faster
llvm-svn: 62428
2009-01-17 19:03:45 +00:00
Chris Lattner 71dc14b9f0 Rename SourceLocation::getFileID to getChunkID, because it returns
the chunk ID not the file ID.  This exposes problems in 
TextDiagnosticPrinter where it should have been using the canonical
file ID but wasn't.  Fix these along the way.

llvm-svn: 62427
2009-01-17 08:45:21 +00:00
Chris Lattner 5509d533f6 simplify some lookups.
llvm-svn: 62426
2009-01-17 08:30:10 +00:00
Chris Lattner 757169b60f Change the Lexer ctor used to lex _Pragma directives into a static factory
method.  This lets us clean up the interface and make it more obvious that
this method is *really really* _Pragma specific.

Note that _Pragma handling uglifies the Lexer in the critical path.  It would
be very interesting to consider making _Pragma remapping be a new special
lexer class of its own.

llvm-svn: 62425
2009-01-17 08:27:52 +00:00
Chris Lattner ab1d4b8abd simplify PTHManager::CreateLexer
llvm-svn: 62424
2009-01-17 08:06:50 +00:00
Devang Patel 3f634fe364 Remove tabs.
llvm-svn: 62423
2009-01-17 08:05:14 +00:00
Chris Lattner c809089b26 Change the Lexer ctor used in the non _Pragma case to take a FileID instead
of a SourceLocation.  This should speed it up and definitely simplifies it.

llvm-svn: 62422
2009-01-17 08:03:42 +00:00
Devang Patel 8ee1c9f220 Refactor code
llvm-svn: 62421
2009-01-17 08:01:33 +00:00
Chris Lattner 8ddb5cf0cf in Preprocessor::AdvanceToTokenCharacter, don't actually bother
creating a whole lexer when we just want one static method.

llvm-svn: 62420
2009-01-17 07:57:25 +00:00
Chris Lattner 5965a28a4b More simplifications to the lexer ctors.
llvm-svn: 62419
2009-01-17 07:56:59 +00:00
Bill Wendling 9880a2cb2f Testcase for last commit.
llvm-svn: 62418
2009-01-17 07:42:44 +00:00
Chris Lattner fcf6452eb4 make the verbose raw-lexer ctor fully explicit instead of having
embedded magic.

llvm-svn: 62417
2009-01-17 07:42:27 +00:00
Chris Lattner 1db27eefa1 use simplified Lexer ctor.
llvm-svn: 62416
2009-01-17 07:41:36 +00:00
Bill Wendling f9291cf43c Extend thi
llvm-svn: 62415
2009-01-17 07:40:19 +00:00
Chris Lattner 08354fef13 add a simplified lexer ctor that sets up the lexer to raw-lex an
entire file.

llvm-svn: 62414
2009-01-17 07:35:14 +00:00
Evan Cheng bf38a5e540 Fix MatchAddress bug that's preventing negative displacement from being folded in 64-bit mode.
llvm-svn: 62413
2009-01-17 07:09:27 +00:00
Devang Patel bf7d432ce4 Assign argument type to appropriate DIE.
llvm-svn: 62412
2009-01-17 06:57:25 +00:00
Chris Lattner f76b92092e refactor some common initialization code out of the two lexer ctors.
llvm-svn: 62411
2009-01-17 06:55:17 +00:00
Devang Patel 2e32f71dfa Remove dead code.
llvm-svn: 62410
2009-01-17 06:51:37 +00:00
Ted Kremenek 1da5987cb9 Update checker build.
llvm-svn: 62409
2009-01-17 06:41:35 +00:00
Chris Lattner 3793bba26f suck the call to "getSpellingLoc" that all clients do into
the implementation of PTHManager::getSpelling.

llvm-svn: 62408
2009-01-17 06:29:33 +00:00
Chris Lattner d32480d3db this massive patch introduces a simple new abstraction: it makes
"FileID" a concept that is now enforced by the compiler's type checker
instead of yet-another-random-unsigned floating around.

This is an important distinction from the "FileID" currently tracked by
SourceLocation.  *That* FileID may refer to the start of a file or to a
chunk within it.  The new FileID *only* refers to the file (and its 
#include stack and eventually #line data), it cannot refer to a chunk.

FileID is a completely opaque datatype to all clients, only SourceManager
is allowed to poke and prod it.

llvm-svn: 62407
2009-01-17 06:22:33 +00:00
Devang Patel d250ef911f Disable composite type debug info for now.
llvm-svn: 62406
2009-01-17 05:05:12 +00:00
Bill Wendling dd40f26877 Temporarily revert my last change. It is causing a bootstrap failure.
llvm-svn: 62405
2009-01-17 04:23:51 +00:00
Bill Wendling 4d5275905e Implement a special algorithm for converting uint_to_fp for i32 values on
X86. This code:

void f() {
  uint32_t x;
  float y = (float)x;
}

used to be:

     movl     %eax, -8(%ebp)
     movl     [2^52 double], -4(%ebp)
     movsd    -8(%ebp), %xmm0
     subsd    [2^52 double], %xmm0
     cvtsd2ss %xmm0, %xmm0

Is now:

   movsd        [2^52 double], %xmm0
   movsd        %xmm0, %xmm1
   movd         %ecx, %xmm2
   orps         %xmm2, %xmm1
   subsd        %xmm0, %xmm1
   cvtsd2ss     %xmm1, %xmm0

This is faster on X86. Note that there's an extra load of %xmm0 into %xmm1. That
will be fixed in a later coalescer fix.

llvm-svn: 62404
2009-01-17 03:56:04 +00:00
Chris Lattner 800979259e make "ContentCache::Buffer" mutable to avoid a const_cast.
llvm-svn: 62403
2009-01-17 03:54:16 +00:00
Chris Lattner 1ed28ce3fd no need to check this: content cache is already 1-1 map with fileentries.
llvm-svn: 62402
2009-01-17 03:49:48 +00:00
Chris Lattner 1abd20901b Instead of iterating over FileID's, have PTH generation iterate over the
content cache directly.  Content cache has a 1-1 mapping with fileentries,
whereas multiple FileIDs can be the same FileEntry.

llvm-svn: 62401
2009-01-17 03:48:08 +00:00
Chris Lattner 3feddd91f7 remove an irrelevant idea
llvm-svn: 62400
2009-01-17 03:46:44 +00:00
Douglas Gregor 051d8fd809 Warn about typedefs of enums without any declarator name. Fixes rdar://problem/6503878
llvm-svn: 62397
2009-01-17 02:55:50 +00:00
Daniel Dunbar 5f40dec258 ccc: Support running piped jobs (-pipe now works).
llvm-svn: 62396
2009-01-17 02:02:35 +00:00
Ted Kremenek 1ab188f48a Fix analyzer crash found when scanning Wine sources where the analyzer used old logic to determine the value of a switch 'case' label.
llvm-svn: 62395
2009-01-17 01:54:16 +00:00
Oscar Fuentes 90cc7050f2 CMake: Add lib/Target/IA64/IA64Subtarget.cpp
llvm-svn: 62394
2009-01-17 01:50:32 +00:00
Douglas Gregor f23311d63b PODify LookupResult, for a measly 1% speedup on Cocoa.h.
llvm-svn: 62391
2009-01-17 01:13:24 +00:00
Douglas Gregor 088ea012cd Add -fnext-runtime to Objective-C properties testcase
llvm-svn: 62390
2009-01-17 00:53:59 +00:00
Daniel Dunbar ee5a4a8cce ccc: Don't be pedantically compatible with -Z options, these are the
result of an internal implementation detail of gcc.

llvm-svn: 62389
2009-01-17 00:53:19 +00:00
Daniel Dunbar 563dc04faa Return success indicator from CmpDriver.
llvm-svn: 62388
2009-01-17 00:50:45 +00:00
Nuno Lopes 4d78cf0fa7 add support for usage of cast to union thing with static vars
llvm-svn: 62387
2009-01-17 00:48:48 +00:00
Douglas Gregor dee1be8e95 Teach DeclContext how to find the primary declaration for any TagDecl
even when we are still defining the TagDecl. This is required so that
qualified name lookup of a class name within its definition works (see
the new bits in test/SemaCXX/qualified-id-lookup.cpp).

As part of this, move the nested redefinition checking code into
ActOnTag. This gives us diagnostics earlier (when we try to perform
the nested redefinition, rather than when we try to complete the 2nd
definition) and removes some code duplication.

llvm-svn: 62386
2009-01-17 00:42:38 +00:00
Gabor Greif 1c6549db6f speed up iterative loop by using iterators. changes direction, but functionally equivalent
if this works out, I'll change the others next.

llvm-svn: 62385
2009-01-17 00:14:25 +00:00
Gabor Greif f1abfdccdc introduce typedef for complicated vector, and use it too
llvm-svn: 62384
2009-01-17 00:09:08 +00:00
Mon P Wang ca6d6dea0b Simplify extract element of a scalar to vector.
llvm-svn: 62383
2009-01-17 00:07:25 +00:00