Commit Graph

2755 Commits

Author SHA1 Message Date
Sebastian Redl a2b5e31cb1 Diagnose declarations that don't declare anything, and fix PR3020.
Examples:
int;
typedef int;

llvm-svn: 61454
2008-12-28 15:28:59 +00:00
Anders Carlsson f562b39e80 Add a MS specific intrinsic.
llvm-svn: 61446
2008-12-27 04:26:15 +00:00
Anders Carlsson a7e0e61b9d Eli noticed that I had forgotten some #defines. Add them.
llvm-svn: 61445
2008-12-26 22:49:10 +00:00
Anders Carlsson 70f8da06d3 Add float.h header. Eli, please review :)
llvm-svn: 61444
2008-12-26 17:10:18 +00:00
Douglas Gregor 1dc9826a46 Add support for out-of-line definitions of conversion functions and member operators
llvm-svn: 61442
2008-12-26 15:00:45 +00:00
Anders Carlsson 88b53663fb Fix implementation of _mm_pause.
llvm-svn: 61441
2008-12-26 02:22:10 +00:00
Anders Carlsson 19ef5d49d4 OK, all tests pass. Let's start using the SSE2 header
llvm-svn: 61440
2008-12-26 00:57:11 +00:00
Anton Korobeynikov d72f47aa05 Add full dllimport / dllexport support: both sema checks and codegen.
Patch by Ilya Okonsky

llvm-svn: 61437
2008-12-26 00:52:02 +00:00
Anders Carlsson 37ba1a5927 Fix formatting
llvm-svn: 61435
2008-12-26 00:50:47 +00:00
Anders Carlsson 37c2371a88 Add _mm_pause and _MM_SHUFFLE
llvm-svn: 61434
2008-12-26 00:49:43 +00:00
Anders Carlsson 85eb1247a3 More SSE2 intrinsics
llvm-svn: 61433
2008-12-26 00:45:50 +00:00
Anders Carlsson a0d5ca2773 More SSE2 intrinsics
llvm-svn: 61432
2008-12-25 23:48:58 +00:00
Steve Naroff f9c29d4200 Add parser support for __forceinline, __w64, __ptr64.
llvm-svn: 61431
2008-12-25 14:41:26 +00:00
Steve Naroff 44ac777741 Add parser support for __cdecl, __stdcall, and __fastcall.
Change preprocessor implementation of _cdecl to reference __cdecl.

llvm-svn: 61430
2008-12-25 14:16:32 +00:00
Zhongxing Xu 4c1661102e Add Fedora 10 GCC paths.
llvm-svn: 61429
2008-12-25 09:28:01 +00:00
Anders Carlsson 51beccbd0b Make _mm_add_si64 inlined
llvm-svn: 61428
2008-12-25 07:07:08 +00:00
Steve Naroff 3a9b7e0cff Add explicit "fuzzy" parse support for Microsoft declspec.
Remove previous __declspec macro that would effectively erase the construct prior to parsing.

llvm-svn: 61422
2008-12-24 20:59:21 +00:00
Sebastian Redl 068b13d62a Fix try statement deserialization.
llvm-svn: 61421
2008-12-24 13:02:38 +00:00
Ted Kremenek 2907ab7d77 Add a bunch of comments and FIXMEs.
llvm-svn: 61419
2008-12-24 07:46:32 +00:00
Zhongxing Xu c7a2792817 set region default value if there are not enough init values for array and struct.
llvm-svn: 61418
2008-12-24 07:29:24 +00:00
Zhongxing Xu be2d5535f6 Add serialization support for TypeOfType.
llvm-svn: 61417
2008-12-24 07:22:26 +00:00
Zhongxing Xu 329f204b1b Add serialization support for TypeOfExpr.
llvm-svn: 61416
2008-12-24 06:36:01 +00:00
Douglas Gregor b9bd8a994c Keep track of template arguments when we parse them. Right now, we don't actually do anything with the template arguments, but they'll be used to create template declarations
llvm-svn: 61413
2008-12-24 02:52:09 +00:00
Anders Carlsson a283f91a67 Add integer arithmetic intrinsics
llvm-svn: 61412
2008-12-24 02:41:00 +00:00
Anders Carlsson b08ac0b2b0 Add store/set/load intrisics
llvm-svn: 61411
2008-12-24 02:11:54 +00:00
Anders Carlsson f15e71d170 Start implementing some SSE2 instructions
llvm-svn: 61410
2008-12-24 01:45:22 +00:00
Ted Kremenek ae189ec1be Comment and fixup GDM entries for RegionStore to use unique 'tag classes' to identify GDM entries.
llvm-svn: 61409
2008-12-24 01:05:03 +00:00
Douglas Gregor 583540360c Correct the order in which we cope with end-of-class-definition
semantics and improve our handling of default arguments. Specifically,
we follow this order:

  - As soon as the see the '}' in the class definition, the class is
  complete and we add any implicit declarations (default constructor,
  copy constructor, etc.) to the class.
  - If there are any default function arguments, parse them
  - If there were any inline member function definitions, parse them

As part of this change, we now keep track of the the fact that we've
seen unparsed default function arguments within the AST. See the new
ParmVarDecl::hasUnparsedDefaultArg member. This allows us to properly
cope with calls inside default function arguments to other functions
where we're making use of the default arguments.

Made some C++ error messages regarding failed initializations more
specific. 

llvm-svn: 61406
2008-12-24 00:01:03 +00:00
Anton Korobeynikov 484f05e14d Sema for fastcall/stdcall stuff. Tests will follow.
Patch by Ilya Okonsky!

llvm-svn: 61394
2008-12-23 22:24:07 +00:00
Douglas Gregor 17eb26bc4e Fix misguided type selection
llvm-svn: 61393
2008-12-23 22:05:29 +00:00
Douglas Gregor 74a3444394 When determining whether a class type has a const copy constructor, be
sure to look at all of the results returned by name lookup. Fixes
<rdar://problem/6465262>

llvm-svn: 61388
2008-12-23 21:31:30 +00:00
Fariborz Jahanian 4ecf1e94db Last patch, for now, to privde ObjC's encoding of types.
We now pass all gcc's encoding compatibility tests.

llvm-svn: 61387
2008-12-23 21:30:15 +00:00
Douglas Gregor 8b9ccca5e5 Don't push OverloadedFunctionDecls onto the chain of declarations
attached to an identifier. Instead, all overloaded functions will be
pushed into scope, and we'll synthesize an OverloadedFunctionDecl on
the fly when we need it. 

llvm-svn: 61386
2008-12-23 21:05:05 +00:00
Fariborz Jahanian 0f66a6c926 Lot more encoding work. We are closing the gap to
gcc compatibilty in all aspects of encoding now.

llvm-svn: 61383
2008-12-23 19:56:47 +00:00
Ted Kremenek b0051a9955 Remove old PTH token-generation test harness.
llvm-svn: 61382
2008-12-23 19:25:33 +00:00
Ted Kremenek 78cc24730e PTH: Remove some methods and simplify some conditions in PTHLexer::Lex(). No big functionality change.
llvm-svn: 61381
2008-12-23 19:24:24 +00:00
Ted Kremenek a754c40390 PTH: Use 3 bytes instead of 4 bytes to encode the persistent ID for a token.
- This reduces the PTH size for Cocoa.h by 7%.
- The increases PTH -Eonly speed for Cocoa.h by 0.8%.

llvm-svn: 61377
2008-12-23 18:41:34 +00:00
Ted Kremenek 3f94706e57 Cosmetics: rename a variable and tighten spacing. No functionality change.
llvm-svn: 61375
2008-12-23 18:27:26 +00:00
Ted Kremenek 1bd0a550d0 PTH:
- Encode the token length with 2 bytes instead of 4.
- This reduces the size of the .pth file for Cocoa.h by 12%.
- This speeds up PTH time (-Eonly) on Cocoa.h by 1.6%.

llvm-svn: 61364
2008-12-23 02:52:12 +00:00
Ted Kremenek 66076a964b PTH:
- In PTHLexer::Lex read all of the token data from PTH file before
  constructing the token.  The idea is to enhance locality.
- Do not use Read8/Read32 in PTHLexer::Lex.  Inline these operations manually.
- Change PTHManager::ReadIdentifierInfo() to PTHManager::GetIdentifierInfo().
  They are functionally the same except that PTHLexer::Lex() reads the
  persistent id.

These changes result in a 3.3% speedup for PTH on Cocoa.h (-Eonly).

llvm-svn: 61363
2008-12-23 02:30:15 +00:00
Ted Kremenek 1b18ad240c PTH:
- Embed 'eom' tokens in PTH file.
- Use embedded 'eom' tokens to not lazily generate them in the PTHLexer.
  This means that PTHLexer can always advance to the next token after
  reading a token (instead of buffering tokens using a copy).
- Moved logic of 'ReadToken' into Lex.  GetToken & ReadToken no longer exist.
- These changes result in a 3.3% speedup (-Eonly) on Cocoa.h.
- The code is a little gross.  Many cleanups are possible and should be done.

llvm-svn: 61360
2008-12-23 01:30:52 +00:00
Douglas Gregor 033f56d533 Add some block-pointer conversions in C++
llvm-svn: 61359
2008-12-23 00:53:59 +00:00
Douglas Gregor 55297ac499 Don't explicitly represent OverloadedFunctionDecls within
DeclContext. Instead, just keep the list of currently-active
declarations and only build the OverloadedFunctionDecl when we
absolutely need it.

This is a half-step toward eliminating the need to explicitly build
OverloadedFunctionDecls that store sets of overloaded
functions. This was suggested by Argiris a while back, and it's a good
thing for several reasons: first, it eliminates the messy logic that
currently tries to keep the OverloadedFunctionDecl in sync with the 
declarations that are being added. Second, it will (eventually)
eliminate the need to allocate memory for overload sets, which could
help performance. Finally, it helps set us up for when name lookup can
return multiple (possibly ambiguous) results, as can happen with
lookup of class members in C++.

Next steps: make the IdentifierResolver store overloads as separate
entries in its list rather than replacing them with an
OverloadedFunctionDecl now, then see how far we can go toward
eliminating OverloadedFunctionDecl entirely.

llvm-svn: 61357
2008-12-23 00:26:44 +00:00
Fariborz Jahanian daef00bca6 More encoding support; in this case, encoding of
outer-most const of pointer types.

llvm-svn: 61355
2008-12-22 23:22:27 +00:00
Sebastian Redl 9b244a8797 Full AST support and better Sema support for C++ try-catch.
llvm-svn: 61346
2008-12-22 21:35:02 +00:00
Douglas Gregor 79a6b01802 Support conversion from a null pointer constant o any Objective-C object pointer type. Fixes rdar://problem/6463298
llvm-svn: 61340
2008-12-22 20:51:52 +00:00
Fariborz Jahanian 8b2d1294db Fixed a bug showed up the meta-data for protocol
instance methods by building print-class-info.m,
whose output is now identical to what gcc puts out.

llvm-svn: 61339
2008-12-22 20:41:58 +00:00
Sebastian Redl 54c04d4700 Partial AST and Sema support for C++ try-catch.
llvm-svn: 61337
2008-12-22 19:15:10 +00:00
Fariborz Jahanian ed4c443193 Patch to remove bogus warning in case of @dynamic
property in a category and to issue diagnostics
for mismatch method in some other cases.

llvm-svn: 61336
2008-12-22 19:05:31 +00:00
Sebastian Redl 04253537dc Expr and Stmt must be destroyed with Destroy, not delete. Fixes PR/3245.
llvm-svn: 61335
2008-12-22 17:51:10 +00:00