]> granicus.if.org Git - clang/log
clang
16 years agosink the call to TryAnnotateTypeOrScopeToken in
Chris Lattner [Sun, 4 Jan 2009 22:52:14 +0000 (22:52 +0000)]
sink the call to TryAnnotateTypeOrScopeToken in
ParseCastExpression into the switch.  This gets it out of the hot
path through ParseCastExpression for all the non-identifier and
non-:: tokens.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61643 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agouse early exits to reduce nesting.
Chris Lattner [Sun, 4 Jan 2009 22:32:19 +0000 (22:32 +0000)]
use early exits to reduce nesting.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61642 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agosimplify control flow by removing a goto.
Chris Lattner [Sun, 4 Jan 2009 22:28:21 +0000 (22:28 +0000)]
simplify control flow by removing a goto.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61641 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoeliminate lookahead when parsing ::new / ::delete.
Chris Lattner [Sun, 4 Jan 2009 21:25:24 +0000 (21:25 +0000)]
eliminate lookahead when parsing ::new / ::delete.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61638 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agominor simplifications.
Chris Lattner [Sun, 4 Jan 2009 21:14:15 +0000 (21:14 +0000)]
minor simplifications.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61637 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFix the bug that would cause Python to crash at startup.
Anders Carlsson [Sun, 4 Jan 2009 02:08:04 +0000 (02:08 +0000)]
Fix the bug that would cause Python to crash at startup.

When emitting the static variables we need to make sure that the order is preserved.
Fix this by making StaticDecls a std::list which has O(1) random removal.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61621 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoRename AddReadAttrs to FunctionAttrs. This is related to Duncan's patch r61525.
Bill Wendling [Wed, 31 Dec 2008 19:51:31 +0000 (19:51 +0000)]
Rename AddReadAttrs to FunctionAttrs. This is related to Duncan's patch r61525.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61534 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoPerform default function/array conversion for input arguments to inline asm statement...
Anders Carlsson [Wed, 31 Dec 2008 07:27:38 +0000 (07:27 +0000)]
Perform default function/array conversion for input arguments to inline asm statements if the input expr can be a memory operand

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61515 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoParser support for C++ using directives, from Piotr Rak
Douglas Gregor [Tue, 30 Dec 2008 03:27:21 +0000 (03:27 +0000)]
Parser support for C++ using directives, from Piotr Rak

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61486 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoRemove hasKind(). Use existing getKind().
Fariborz Jahanian [Mon, 29 Dec 2008 19:57:17 +0000 (19:57 +0000)]
Remove hasKind(). Use existing getKind().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61476 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFill in C++ status table for statements.
Sebastian Redl [Sun, 28 Dec 2008 17:18:13 +0000 (17:18 +0000)]
Fill in C++ status table for statements.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61457 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoConvert a two more statement actions to smart pointers.
Sebastian Redl [Sun, 28 Dec 2008 16:13:43 +0000 (16:13 +0000)]
Convert a two more statement actions to smart pointers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61456 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFix a grep error that caused CodeGenObjC/encode-test.m to fail.
Sebastian Redl [Sun, 28 Dec 2008 15:48:05 +0000 (15:48 +0000)]
Fix a grep error that caused CodeGenObjC/encode-test.m to fail.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61455 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoDiagnose declarations that don't declare anything, and fix PR3020.
Sebastian Redl [Sun, 28 Dec 2008 15:28:59 +0000 (15:28 +0000)]
Diagnose declarations that don't declare anything, and fix PR3020.
Examples:
int;
typedef int;

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61454 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFix filename typo.
Sebastian Redl [Sun, 28 Dec 2008 14:19:27 +0000 (14:19 +0000)]
Fix filename typo.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61453 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoadd RUN line
Nuno Lopes [Sat, 27 Dec 2008 23:47:34 +0000 (23:47 +0000)]
add RUN line

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61452 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdd a MS specific intrinsic.
Anders Carlsson [Sat, 27 Dec 2008 04:26:15 +0000 (04:26 +0000)]
Add a MS specific intrinsic.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61446 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoEli noticed that I had forgotten some #defines. Add them.
Anders Carlsson [Fri, 26 Dec 2008 22:49:10 +0000 (22:49 +0000)]
Eli noticed that I had forgotten some #defines. Add them.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61445 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdd float.h header. Eli, please review :)
Anders Carlsson [Fri, 26 Dec 2008 17:10:18 +0000 (17:10 +0000)]
Add float.h header. Eli, please review :)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61444 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdd __builtin_flt_rounds
Anders Carlsson [Fri, 26 Dec 2008 16:43:35 +0000 (16:43 +0000)]
Add __builtin_flt_rounds

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61443 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdd support for out-of-line definitions of conversion functions and member operators
Douglas Gregor [Fri, 26 Dec 2008 15:00:45 +0000 (15:00 +0000)]
Add support for out-of-line definitions of conversion functions and member operators

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61442 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFix implementation of _mm_pause.
Anders Carlsson [Fri, 26 Dec 2008 02:22:10 +0000 (02:22 +0000)]
Fix implementation of _mm_pause.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61441 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoOK, all tests pass. Let's start using the SSE2 header
Anders Carlsson [Fri, 26 Dec 2008 00:57:11 +0000 (00:57 +0000)]
OK, all tests pass. Let's start using the SSE2 header

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61440 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdd two more builtins
Anders Carlsson [Fri, 26 Dec 2008 00:55:49 +0000 (00:55 +0000)]
Add two more builtins

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61439 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoComplete the test after adding handling of merged attributes on decls.
Anton Korobeynikov [Fri, 26 Dec 2008 00:52:17 +0000 (00:52 +0000)]
Complete the test after adding handling of merged attributes on decls.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61438 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdd full dllimport / dllexport support: both sema checks and codegen.
Anton Korobeynikov [Fri, 26 Dec 2008 00:52:02 +0000 (00:52 +0000)]
Add full dllimport / dllexport support: both sema checks and codegen.
Patch by Ilya Okonsky

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61437 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoTestcase for stdcall/fastcall sema checks.
Anton Korobeynikov [Fri, 26 Dec 2008 00:51:21 +0000 (00:51 +0000)]
Testcase for stdcall/fastcall sema checks.
Patch by Ilya Okonsky!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61436 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFix formatting
Anders Carlsson [Fri, 26 Dec 2008 00:50:47 +0000 (00:50 +0000)]
Fix formatting

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61435 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdd _mm_pause and _MM_SHUFFLE
Anders Carlsson [Fri, 26 Dec 2008 00:49:43 +0000 (00:49 +0000)]
Add _mm_pause and _MM_SHUFFLE

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61434 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoMore SSE2 intrinsics
Anders Carlsson [Fri, 26 Dec 2008 00:45:50 +0000 (00:45 +0000)]
More SSE2 intrinsics

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61433 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoMore SSE2 intrinsics
Anders Carlsson [Thu, 25 Dec 2008 23:48:58 +0000 (23:48 +0000)]
More SSE2 intrinsics

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61432 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdd parser support for __forceinline, __w64, __ptr64.
Steve Naroff [Thu, 25 Dec 2008 14:41:26 +0000 (14:41 +0000)]
Add parser support for __forceinline, __w64, __ptr64.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61431 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdd parser support for __cdecl, __stdcall, and __fastcall.
Steve Naroff [Thu, 25 Dec 2008 14:16:32 +0000 (14:16 +0000)]
Add parser support for __cdecl, __stdcall, and __fastcall.
Change preprocessor implementation of _cdecl to reference __cdecl.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61430 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdd Fedora 10 GCC paths.
Zhongxing Xu [Thu, 25 Dec 2008 09:28:01 +0000 (09:28 +0000)]
Add Fedora 10 GCC paths.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61429 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoMake _mm_add_si64 inlined
Anders Carlsson [Thu, 25 Dec 2008 07:07:08 +0000 (07:07 +0000)]
Make _mm_add_si64 inlined

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61428 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdd explicit "fuzzy" parse support for Microsoft declspec.
Steve Naroff [Wed, 24 Dec 2008 20:59:21 +0000 (20:59 +0000)]
Add explicit "fuzzy" parse support for Microsoft declspec.
Remove previous __declspec macro that would effectively erase the construct prior to parsing.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61422 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFix try statement deserialization.
Sebastian Redl [Wed, 24 Dec 2008 13:02:38 +0000 (13:02 +0000)]
Fix try statement deserialization.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61421 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdd a bunch of comments and FIXMEs.
Ted Kremenek [Wed, 24 Dec 2008 07:46:32 +0000 (07:46 +0000)]
Add a bunch of comments and FIXMEs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61419 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoset region default value if there are not enough init values for array and struct.
Zhongxing Xu [Wed, 24 Dec 2008 07:29:24 +0000 (07:29 +0000)]
set region default value if there are not enough init values for array and struct.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61418 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdd serialization support for TypeOfType.
Zhongxing Xu [Wed, 24 Dec 2008 07:22:26 +0000 (07:22 +0000)]
Add serialization support for TypeOfType.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61417 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdd serialization support for TypeOfExpr.
Zhongxing Xu [Wed, 24 Dec 2008 06:36:01 +0000 (06:36 +0000)]
Add serialization support for TypeOfExpr.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61416 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoKeep track of template arguments when we parse them. Right now, we don't actually...
Douglas Gregor [Wed, 24 Dec 2008 02:52:09 +0000 (02:52 +0000)]
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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61413 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdd integer arithmetic intrinsics
Anders Carlsson [Wed, 24 Dec 2008 02:41:00 +0000 (02:41 +0000)]
Add integer arithmetic intrinsics

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61412 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdd store/set/load intrisics
Anders Carlsson [Wed, 24 Dec 2008 02:11:54 +0000 (02:11 +0000)]
Add store/set/load intrisics

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61411 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoStart implementing some SSE2 instructions
Anders Carlsson [Wed, 24 Dec 2008 01:45:22 +0000 (01:45 +0000)]
Start implementing some SSE2 instructions

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61410 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoComment and fixup GDM entries for RegionStore to use unique 'tag classes' to identify...
Ted Kremenek [Wed, 24 Dec 2008 01:05:03 +0000 (01:05 +0000)]
Comment and fixup GDM entries for RegionStore to use unique 'tag classes' to identify GDM entries.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61409 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoCorrect the order in which we cope with end-of-class-definition
Douglas Gregor [Wed, 24 Dec 2008 00:01:03 +0000 (00:01 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61406 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoSema for fastcall/stdcall stuff. Tests will follow.
Anton Korobeynikov [Tue, 23 Dec 2008 22:24:07 +0000 (22:24 +0000)]
Sema for fastcall/stdcall stuff. Tests will follow.
Patch by Ilya Okonsky!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61394 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFix misguided type selection
Douglas Gregor [Tue, 23 Dec 2008 22:05:29 +0000 (22:05 +0000)]
Fix misguided type selection

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61393 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoWhen determining whether a class type has a const copy constructor, be
Douglas Gregor [Tue, 23 Dec 2008 21:31:30 +0000 (21:31 +0000)]
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>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61388 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoLast patch, for now, to privde ObjC's encoding of types.
Fariborz Jahanian [Tue, 23 Dec 2008 21:30:15 +0000 (21:30 +0000)]
Last patch, for now, to privde ObjC's encoding of types.
We now pass all gcc's encoding compatibility tests.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61387 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoDon't push OverloadedFunctionDecls onto the chain of declarations
Douglas Gregor [Tue, 23 Dec 2008 21:05:05 +0000 (21:05 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61386 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFix <rdar://problem/6465284> clang ObjC rewriter: objc_super messed up again.
Steve Naroff [Tue, 23 Dec 2008 20:11:22 +0000 (20:11 +0000)]
Fix <rdar://problem/6465284> clang ObjC rewriter: objc_super messed up again.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61384 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoLot more encoding work. We are closing the gap to
Fariborz Jahanian [Tue, 23 Dec 2008 19:56:47 +0000 (19:56 +0000)]
Lot more encoding work. We are closing the gap to
gcc compatibilty in all aspects of encoding now.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61383 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoRemove old PTH token-generation test harness.
Ted Kremenek [Tue, 23 Dec 2008 19:25:33 +0000 (19:25 +0000)]
Remove old PTH token-generation test harness.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61382 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoPTH: Remove some methods and simplify some conditions in PTHLexer::Lex(). No big...
Ted Kremenek [Tue, 23 Dec 2008 19:24:24 +0000 (19:24 +0000)]
PTH: Remove some methods and simplify some conditions in PTHLexer::Lex().  No big functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61381 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoPTH: Use 3 bytes instead of 4 bytes to encode the persistent ID for a token.
Ted Kremenek [Tue, 23 Dec 2008 18:41:34 +0000 (18:41 +0000)]
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%.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61377 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoCosmetics: rename a variable and tighten spacing. No functionality change.
Ted Kremenek [Tue, 23 Dec 2008 18:27:26 +0000 (18:27 +0000)]
Cosmetics: rename a variable and tighten spacing.  No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61375 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoMerge pr-3188.cpp into constructor.cpp.
Sebastian Redl [Tue, 23 Dec 2008 16:41:32 +0000 (16:41 +0000)]
Merge pr-3188.cpp into constructor.cpp.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61370 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdd a setter for CVR qualifiers, patch by Lukasz Janyst!
Chris Lattner [Tue, 23 Dec 2008 04:57:30 +0000 (04:57 +0000)]
Add a setter for CVR qualifiers, patch by Lukasz Janyst!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61367 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoPTH:
Ted Kremenek [Tue, 23 Dec 2008 02:52:12 +0000 (02:52 +0000)]
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%.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61364 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoPTH:
Ted Kremenek [Tue, 23 Dec 2008 02:30:15 +0000 (02:30 +0000)]
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).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61363 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoPTH:
Ted Kremenek [Tue, 23 Dec 2008 01:30:52 +0000 (01:30 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61360 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdd some block-pointer conversions in C++
Douglas Gregor [Tue, 23 Dec 2008 00:53:59 +0000 (00:53 +0000)]
Add some block-pointer conversions in C++

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61359 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoDon't explicitly represent OverloadedFunctionDecls within
Douglas Gregor [Tue, 23 Dec 2008 00:26:44 +0000 (00:26 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61357 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoMore encoding support; in this case, encoding of
Fariborz Jahanian [Mon, 22 Dec 2008 23:22:27 +0000 (23:22 +0000)]
More encoding support; in this case, encoding of
outer-most const of pointer types.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61355 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFix <rdar://problem/6463613> clang ObjC rewriter: assertion failure rewriting @selector?.
Steve Naroff [Mon, 22 Dec 2008 22:16:07 +0000 (22:16 +0000)]
Fix <rdar://problem/6463613> clang ObjC rewriter: assertion failure rewriting @selector?.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61351 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoGuard against the return of PR3188
Sebastian Redl [Mon, 22 Dec 2008 21:43:13 +0000 (21:43 +0000)]
Guard against the return of PR3188

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61348 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFull AST support and better Sema support for C++ try-catch.
Sebastian Redl [Mon, 22 Dec 2008 21:35:02 +0000 (21:35 +0000)]
Full AST support and better Sema support for C++ try-catch.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61346 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoSupport conversion from a null pointer constant o any Objective-C object pointer...
Douglas Gregor [Mon, 22 Dec 2008 20:51:52 +0000 (20:51 +0000)]
Support conversion from a null pointer constant o any Objective-C object pointer type. Fixes rdar://problem/6463298

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61340 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFixed a bug showed up the meta-data for protocol
Fariborz Jahanian [Mon, 22 Dec 2008 20:41:58 +0000 (20:41 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61339 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoPartial AST and Sema support for C++ try-catch.
Sebastian Redl [Mon, 22 Dec 2008 19:15:10 +0000 (19:15 +0000)]
Partial AST and Sema support for C++ try-catch.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61337 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoPatch to remove bogus warning in case of @dynamic
Fariborz Jahanian [Mon, 22 Dec 2008 19:05:31 +0000 (19:05 +0000)]
Patch to remove bogus warning in case of @dynamic
property in a category and to issue diagnostics
for mismatch method in some other cases.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61336 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoExpr and Stmt must be destroyed with Destroy, not delete. Fixes PR/3245.
Sebastian Redl [Mon, 22 Dec 2008 17:51:10 +0000 (17:51 +0000)]
Expr and Stmt must be destroyed with Destroy, not delete. Fixes PR/3245.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61335 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFix test failures noticed by Fariborz.
Anders Carlsson [Mon, 22 Dec 2008 17:42:23 +0000 (17:42 +0000)]
Fix test failures noticed by Fariborz.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61334 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFix initialization order.
Zhongxing Xu [Mon, 22 Dec 2008 08:30:52 +0000 (08:30 +0000)]
Fix initialization order.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61333 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFlip the switch and start using the new xmmintrin.h
Anders Carlsson [Mon, 22 Dec 2008 07:36:02 +0000 (07:36 +0000)]
Flip the switch and start using the new xmmintrin.h

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61332 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoComment out _mm_insert_pi16 for now
Anders Carlsson [Mon, 22 Dec 2008 07:34:23 +0000 (07:34 +0000)]
Comment out _mm_insert_pi16 for now

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61331 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoImplement the last intrinsics, _mm_insert_pi16 is the last remaining one now.
Anders Carlsson [Mon, 22 Dec 2008 07:08:03 +0000 (07:08 +0000)]
Implement the last intrinsics, _mm_insert_pi16 is the last remaining one now.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61330 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdd support for calls to overloaded member functions. Things to note:
Douglas Gregor [Mon, 22 Dec 2008 05:46:06 +0000 (05:46 +0000)]
Add support for calls to overloaded member functions. Things to note:
  - Overloading has to cope with having both static and non-static
    member functions in the overload set.
  - The call may or may not have an implicit object argument,
    depending on the syntax (x.f() vs. f()) and the context (static
    vs. non-static member function).
  - We now generate MemberExprs for implicit member access expression.
  - We now cope with mutable whenever we're building MemberExprs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61329 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdd macros
Anders Carlsson [Mon, 22 Dec 2008 05:42:03 +0000 (05:42 +0000)]
Add macros

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61328 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdd misc intrinsics
Anders Carlsson [Mon, 22 Dec 2008 05:20:34 +0000 (05:20 +0000)]
Add misc intrinsics

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61327 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdd control register intrinsics
Anders Carlsson [Mon, 22 Dec 2008 05:00:07 +0000 (05:00 +0000)]
Add control register intrinsics

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61326 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdd integer intrinsics
Anders Carlsson [Mon, 22 Dec 2008 04:55:36 +0000 (04:55 +0000)]
Add integer intrinsics

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61325 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoGenerate code for __builtin_ia32_pshufw
Anders Carlsson [Mon, 22 Dec 2008 04:54:32 +0000 (04:54 +0000)]
Generate code for __builtin_ia32_pshufw

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61324 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdd cacheability intrinsics
Anders Carlsson [Mon, 22 Dec 2008 03:50:21 +0000 (03:50 +0000)]
Add cacheability intrinsics

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61323 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdd store intrinsics
Anders Carlsson [Mon, 22 Dec 2008 03:16:40 +0000 (03:16 +0000)]
Add store intrinsics

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61322 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdd set intrinsics
Anders Carlsson [Mon, 22 Dec 2008 02:51:35 +0000 (02:51 +0000)]
Add set intrinsics

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61321 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdd load intrinsics
Anders Carlsson [Mon, 22 Dec 2008 02:43:30 +0000 (02:43 +0000)]
Add load intrinsics

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61320 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdd an option to make 'RemoveDeadBindings' a configurable behavior. This enables
Zhongxing Xu [Mon, 22 Dec 2008 01:52:37 +0000 (01:52 +0000)]
Add an option to make 'RemoveDeadBindings' a configurable behavior. This enables
us to measure the effect of this optimization.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61319 91177308-0d34-0410-b5e6-96231b3b80d8

16 years ago_mm_cvtsi64_ss is 64-bit only, so wrap it in #ifdef __x86_64__
Anders Carlsson [Mon, 22 Dec 2008 01:26:50 +0000 (01:26 +0000)]
_mm_cvtsi64_ss is 64-bit only, so wrap it in #ifdef __x86_64__

Add composite conversion intrinsics - will implement them shortly.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61318 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdd a couple of conversion intrinsics
Anders Carlsson [Mon, 22 Dec 2008 00:48:30 +0000 (00:48 +0000)]
Add a couple of conversion intrinsics

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61317 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdd comparison intrinsics.
Anders Carlsson [Mon, 22 Dec 2008 00:28:39 +0000 (00:28 +0000)]
Add comparison intrinsics.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61316 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoCheck in an in-progress version of xmmintrin.h that I had lying around.
Anders Carlsson [Mon, 22 Dec 2008 00:01:20 +0000 (00:01 +0000)]
Check in an in-progress version of xmmintrin.h that I had lying around.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61315 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdd codegen support for __null
Anders Carlsson [Sun, 21 Dec 2008 22:39:40 +0000 (22:39 +0000)]
Add codegen support for __null

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61314 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFix a comment.
Sebastian Redl [Sun, 21 Dec 2008 19:24:58 +0000 (19:24 +0000)]
Fix a comment.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61313 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoParser support for C++ try-catch.
Sebastian Redl [Sun, 21 Dec 2008 16:41:36 +0000 (16:41 +0000)]
Parser support for C++ try-catch.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61312 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoCorrect comments.
Zhongxing Xu [Sun, 21 Dec 2008 13:00:52 +0000 (13:00 +0000)]
Correct comments.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61311 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoTest case makes a platform assumption, so force triple.
Sebastian Redl [Sun, 21 Dec 2008 12:17:24 +0000 (12:17 +0000)]
Test case makes a platform assumption, so force triple.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61310 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoConvert a few Stmt actions to smart pointers.
Sebastian Redl [Sun, 21 Dec 2008 12:04:03 +0000 (12:04 +0000)]
Convert a few Stmt actions to smart pointers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61309 91177308-0d34-0410-b5e6-96231b3b80d8