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

7137 Коммитов

Автор SHA1 Сообщение Дата
Douglas Gregor 70316a065b 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
2008-12-26 15:00:45 +00:00
Anders Carlsson 4bcd44d3b3 Fix implementation of _mm_pause.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61441 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-26 02:22:10 +00:00
Anders Carlsson 4fd3e63cb0 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
2008-12-26 00:57:11 +00:00
Anders Carlsson 3cd860c3e0 Add two more builtins
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61439 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-26 00:55:49 +00:00
Anton Korobeynikov fceeec91fa 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
2008-12-26 00:52:17 +00:00
Anton Korobeynikov 2f402708e6 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
2008-12-26 00:52:02 +00:00
Anton Korobeynikov 7f7bb72fd0 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
2008-12-26 00:51:21 +00:00
Anders Carlsson 92d66868a1 Fix formatting
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61435 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-26 00:50:47 +00:00
Anders Carlsson f1bc66008e Add _mm_pause and _MM_SHUFFLE
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61434 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-26 00:49:43 +00:00
Anders Carlsson 4547075dbb More SSE2 intrinsics
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61433 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-26 00:45:50 +00:00
Anders Carlsson 0727df0c41 More SSE2 intrinsics
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61432 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-25 23:48:58 +00:00
Steve Naroff 86bc6cf05a Add parser support for __forceinline, __w64, __ptr64.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61431 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-25 14:41:26 +00:00
Steve Naroff 239f07384f 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
2008-12-25 14:16:32 +00:00
Zhongxing Xu 776caefc70 Add Fedora 10 GCC paths.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61429 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-25 09:28:01 +00:00
Anders Carlsson dfb0911b95 Make _mm_add_si64 inlined
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61428 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-25 07:07:08 +00:00
Steve Naroff f59e17ecf0 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
2008-12-24 20:59:21 +00:00
Sebastian Redl 7a89722438 Fix try statement deserialization.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61421 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-24 13:02:38 +00:00
Ted Kremenek 869fb4a8c5 Add a bunch of comments and FIXMEs.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61419 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-24 07:46:32 +00:00
Zhongxing Xu 130201669a 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
2008-12-24 07:29:24 +00:00
Zhongxing Xu 501c7252bd Add serialization support for TypeOfType.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61417 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-24 07:22:26 +00:00
Zhongxing Xu 8fbc5274c4 Add serialization support for TypeOfExpr.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61416 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-24 06:36:01 +00:00
Douglas Gregor c4b4e7b8f6 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
2008-12-24 02:52:09 +00:00
Anders Carlsson 07603aa9e5 Add integer arithmetic intrinsics
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61412 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-24 02:41:00 +00:00
Anders Carlsson 445afa04f5 Add store/set/load intrisics
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61411 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-24 02:11:54 +00:00
Anders Carlsson 37f2f00d71 Start implementing some SSE2 instructions
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61410 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-24 01:45:22 +00:00
Ted Kremenek 50dc1b3c85 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
2008-12-24 01:05:03 +00:00
Douglas Gregor 61366e9cd4 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
2008-12-24 00:01:03 +00:00
Anton Korobeynikov 7b0a52f982 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
2008-12-23 22:24:07 +00:00
Douglas Gregor 5cc3709b84 Fix misguided type selection
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61393 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-23 22:05:29 +00:00
Douglas Gregor fdfab6b5ee 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
2008-12-23 21:31:30 +00:00
Fariborz Jahanian 3e1b16c2e5 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
2008-12-23 21:30:15 +00:00
Douglas Gregor 6ed40e351a 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
2008-12-23 21:05:05 +00:00
Steve Naroff 46a98a7df0 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
2008-12-23 20:11:22 +00:00
Fariborz Jahanian a1c033e951 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
2008-12-23 19:56:47 +00:00
Ted Kremenek 6aa6ac4b39 Remove old PTH token-generation test harness.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61382 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-23 19:25:33 +00:00
Ted Kremenek 59d08cb672 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
2008-12-23 19:24:24 +00:00
Ted Kremenek 18d9afb815 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
2008-12-23 18:41:34 +00:00
Ted Kremenek 6b1c9708c8 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
2008-12-23 18:27:26 +00:00
Sebastian Redl 1f5432c227 Merge pr-3188.cpp into constructor.cpp.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61370 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-23 16:41:32 +00:00
Chris Lattner a3ab4b85f5 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
2008-12-23 04:57:30 +00:00
Ted Kremenek 8f174e173c 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
2008-12-23 02:52:12 +00:00
Ted Kremenek 866bdf7454 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
2008-12-23 02:30:15 +00:00
Ted Kremenek e5680f3cd6 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
2008-12-23 01:30:52 +00:00
Douglas Gregor 2a7e58dc24 Add some block-pointer conversions in C++
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61359 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-23 00:53:59 +00:00
Douglas Gregor 3fc749d899 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
2008-12-23 00:26:44 +00:00
Fariborz Jahanian 5b8c7d9fb6 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
2008-12-22 23:22:27 +00:00
Steve Naroff 1a93764089 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
2008-12-22 22:16:07 +00:00
Sebastian Redl 494bb06e34 Guard against the return of PR3188
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61348 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-22 21:43:13 +00:00
Sebastian Redl 8351da06ca 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
2008-12-22 21:35:02 +00:00
Douglas Gregor 27b09ac9f7 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
2008-12-22 20:51:52 +00:00