]> granicus.if.org Git - clang/log
clang
16 years agoccc: Remove ValueArg::setValue, this is no longer used.
Daniel Dunbar [Tue, 6 Jan 2009 06:32:49 +0000 (06:32 +0000)]
ccc: Remove ValueArg::setValue, this is no longer used.

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

16 years agoccc: Track last actual argument instance for each option & change
Daniel Dunbar [Tue, 6 Jan 2009 06:12:13 +0000 (06:12 +0000)]
ccc: Track last actual argument instance for each option & change
driver to lookup this way instead of manually scanning arguments in
multiple places.

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

16 years agodocument annotation tokens.
Chris Lattner [Tue, 6 Jan 2009 06:02:08 +0000 (06:02 +0000)]
document annotation tokens.

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

16 years agoMake Token::setLength assert that the token is not an annotation token.
Chris Lattner [Tue, 6 Jan 2009 05:25:04 +0000 (05:25 +0000)]
Make Token::setLength assert that the token is not an annotation token.

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

16 years agoOops. Un-publicify SrcMgr::ContentCache::Buffer.
Douglas Gregor [Tue, 6 Jan 2009 05:11:04 +0000 (05:11 +0000)]
Oops. Un-publicify SrcMgr::ContentCache::Buffer.

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

16 years agoAdd QualifiedDeclRefExpr, which retains additional source-location
Douglas Gregor [Tue, 6 Jan 2009 05:10:23 +0000 (05:10 +0000)]
Add QualifiedDeclRefExpr, which retains additional source-location
information for declarations that were referenced via a qualified-id,
e.g., N::C::value. We keep track of the location of the start of the
nested-name-specifier. Note that the difference between
QualifiedDeclRefExpr and DeclRefExpr does have an effect on the
semantics of function calls in two ways:
  1) The use of a qualified-id instead of an unqualified-id suppresses
     argument-dependent lookup
  2) If the name refers to a virtual function, the qualified-id
  version will call the function determined statically while the
  unqualified-id version will call the function determined dynamically
  (by looking up the appropriate function in the vtable).

Neither of these features is implemented yet, but we do print out
qualified names for QualifiedDeclRefExprs as part of the AST printing.

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

16 years agorename tok::annot_qualtypename -> tok::annot_typename, which is both
Chris Lattner [Tue, 6 Jan 2009 05:06:21 +0000 (05:06 +0000)]
rename tok::annot_qualtypename -> tok::annot_typename, which is both
shorter and  more accurate.  The type name might not be qualified.

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

16 years agoadd TypeTraits.h to the Xcode project
Chris Lattner [Tue, 6 Jan 2009 05:04:13 +0000 (05:04 +0000)]
add TypeTraits.h to the Xcode project

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

16 years agouse getBuffer() to fix compile error. Ted, please review.
Chris Lattner [Tue, 6 Jan 2009 04:47:20 +0000 (04:47 +0000)]
use getBuffer() to fix compile error.  Ted, please review.

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

16 years agoccc: Use dummy InputOption and UnknownOption classes instead of
Daniel Dunbar [Tue, 6 Jan 2009 02:30:10 +0000 (02:30 +0000)]
ccc: Use dummy InputOption and UnknownOption classes instead of
InputArg and UnknownArg.
 - Every argument now always corresponds to some option, which
   simplifies other code.

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

16 years agoMisc changes to SourceManager::ContentCache:
Ted Kremenek [Tue, 6 Jan 2009 01:55:26 +0000 (01:55 +0000)]
Misc changes to SourceManager::ContentCache:
- 'Buffer' is now private and must be accessed via 'getBuffer()'.
   This paves the way for lazily mapping in source files on demand.
- Added 'getSize()' (which gets the size of the content without
   necessarily accessing the MemBuffer) and 'getSizeBytesMapped()'.
- Modifed SourceManager to use these new methods.  This reduces the
  number of places that actually access the MemBuffer object for a file
  to those that actually look at the character data.

These changes result in no performance change for -fsyntax-only on Cocoa.h.

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

16 years agoccc: Introduce ArgList for keeping input argv & parsed Args together.
Daniel Dunbar [Tue, 6 Jan 2009 01:35:44 +0000 (01:35 +0000)]
ccc: Introduce ArgList for keeping input argv & parsed Args together.

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

16 years agorename these tests to match the attribute.
Chris Lattner [Mon, 5 Jan 2009 23:10:19 +0000 (23:10 +0000)]
rename these tests to match the attribute.

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

16 years agoOptimize stringification a bit to avoid std::string thrashing and
Chris Lattner [Mon, 5 Jan 2009 23:04:18 +0000 (23:04 +0000)]
Optimize stringification a bit to avoid std::string thrashing and
avoid the version of Preprocessor::getSpelling that returns an
std::string.

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

16 years agoRemainder is only valid on integer vector operands.
Daniel Dunbar [Mon, 5 Jan 2009 22:55:36 +0000 (22:55 +0000)]
Remainder is only valid on integer vector operands.

Improve ext vector test case.

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

16 years agoBack out code for handling VectorType's in getFloatingRank.
Daniel Dunbar [Mon, 5 Jan 2009 22:44:35 +0000 (22:44 +0000)]
Back out code for handling VectorType's in getFloatingRank.

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

16 years agoUse CheckVectorOperands when % is applied to a vector type.
Daniel Dunbar [Mon, 5 Jan 2009 22:42:10 +0000 (22:42 +0000)]
Use CheckVectorOperands when % is applied to a vector type.

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

16 years agoImplement getFloatingRank() for extended vectors.
Daniel Dunbar [Mon, 5 Jan 2009 22:14:37 +0000 (22:14 +0000)]
Implement getFloatingRank() for extended vectors.
 - I'm not sure this is appropriate, but it seems reasonable to be
   able to call getFloatingRank on anything which isFloatingType().

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

16 years agoSilence a GCC warning
Sebastian Redl [Mon, 5 Jan 2009 20:53:53 +0000 (20:53 +0000)]
Silence a GCC warning

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

16 years agoPODness and Type Traits
Sebastian Redl [Mon, 5 Jan 2009 20:52:13 +0000 (20:52 +0000)]
PODness and Type Traits

Make C++ classes track the POD property (C++ [class]p4)
Track the existence of a copy assignment operator.
Implicitly declare the copy assignment operator if none is provided.
Implement most of the parsing job for the G++ type traits extension.
Fully implement the low-hanging fruit of the type traits:
__is_pod: Whether a type is a POD.
__is_class: Whether a type is a (non-union) class.
__is_union: Whether a type is a union.
__is_enum: Whether a type is an enum.
__is_polymorphic: Whether a type is polymorphic (C++ [class.virtual]p1).

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

16 years agoAdd prototype ccc rewrite.
Daniel Dunbar [Mon, 5 Jan 2009 19:53:30 +0000 (19:53 +0000)]
Add prototype ccc rewrite.
 - Entry point is tools/ccc/xcc until we are a functional replacement
   for ccc.

This is highly experimental (FIXME/LOC ratio of 3.4%), quite crufty,
and barely usable (and then only on my specific Darwin). However, many
of the right ideas are present, and it already fixes a number of
things gcc gets wrong.

The major missing component is argument translation for tools
(translating driver arguments into cc1/ld/as/etc. arguments). This is
a large part of the driver functionality and will probably double the
LOC, but my hope is that the current architecture is relatively
stable.

Documentation & motivation to follow soon...

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

16 years agoAdd forgotten test case for linkage specifications
Douglas Gregor [Mon, 5 Jan 2009 19:50:09 +0000 (19:50 +0000)]
Add forgotten test case for linkage specifications

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

16 years agoIntroduce support for "transparent" DeclContexts, which are
Douglas Gregor [Mon, 5 Jan 2009 19:45:36 +0000 (19:45 +0000)]
Introduce support for "transparent" DeclContexts, which are
DeclContexts whose members are visible from enclosing DeclContexts up
to (and including) the innermost enclosing non-transparent
DeclContexts. Transparent DeclContexts unify the mechanism to be used
for various language features, including C enumerations, anonymous
unions, C++0x inline namespaces, and C++ linkage
specifications. Please refer to the documentation in the Clang
internals manual for more information.

Only enumerations and linkage specifications currently use transparent
DeclContexts.

Still to do: use transparent DeclContexts to implement anonymous
unions and GCC's anonymous structs extension, and, later, the C++0x
features. We also need to tighten up the DeclContext/ScopedDecl link
to ensure that every ScopedDecl is in a single DeclContext, which
will ensure that we can then enforce ownership and reduce the memory
footprint of DeclContext.

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

16 years agosimplify Preprocessor::getSpelling now that identifiers carry around
Chris Lattner [Mon, 5 Jan 2009 19:44:41 +0000 (19:44 +0000)]
simplify Preprocessor::getSpelling now that identifiers carry around
their length.

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

16 years agoFix an uninitialized-variable warning
Douglas Gregor [Mon, 5 Jan 2009 17:18:30 +0000 (17:18 +0000)]
Fix an uninitialized-variable warning

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

16 years agoremove optimization to avoid looking ahead for cases like ::foo. This
Chris Lattner [Mon, 5 Jan 2009 03:55:46 +0000 (03:55 +0000)]
remove optimization to avoid looking ahead for cases like ::foo.  This
isn't worth the complexity and the code already does a ton of lookahead.

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

16 years agosimplify some code.
Chris Lattner [Mon, 5 Jan 2009 02:07:19 +0000 (02:07 +0000)]
simplify some code.

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

16 years agoRearrange some code in TryAnnotateTypeOrScopeToken to make it
Chris Lattner [Mon, 5 Jan 2009 01:49:50 +0000 (01:49 +0000)]
Rearrange some code in TryAnnotateTypeOrScopeToken to make it
early exit for C and avoid template lookup for C.

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

16 years agoFix a bug where we'd try to look beyond the current cached tokens when
Chris Lattner [Mon, 5 Jan 2009 01:42:04 +0000 (01:42 +0000)]
Fix a bug where we'd try to look beyond the current cached tokens when
not in backtracking mode.  This was just using the wrong predicate.

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

16 years agoPass '-undefined- to the linker
Anders Carlsson [Mon, 5 Jan 2009 01:24:39 +0000 (01:24 +0000)]
Pass '-undefined- to the linker

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

16 years agoTryAnnotateTypeOrScopeToken and TryAnnotateCXXScopeToken can
Chris Lattner [Mon, 5 Jan 2009 01:24:05 +0000 (01:24 +0000)]
TryAnnotateTypeOrScopeToken and TryAnnotateCXXScopeToken can
only be called when they might be needed now, so make them assert
that their current token is :: or identifier.

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

16 years agoGenerate debug info for VLA types
Anders Carlsson [Mon, 5 Jan 2009 01:23:29 +0000 (01:23 +0000)]
Generate debug info for VLA types

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

16 years agoadd a testcase
Chris Lattner [Mon, 5 Jan 2009 00:59:08 +0000 (00:59 +0000)]
add a testcase

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

16 years agoParseCXXSimpleTypeSpecifier can only be called on things that are
Chris Lattner [Mon, 5 Jan 2009 00:13:00 +0000 (00:13 +0000)]
ParseCXXSimpleTypeSpecifier can only be called on things that are
verified to be simple type specifiers, so there is no need for it
to call TryAnnotateTypeOrScopeToken.

Make MaybeParseCXXScopeSpecifier reject ::new and ::delete with a
hard error now that it may never be transitively called in a
context where these are legal.  This allows me to start
disentangling things more.

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

16 years agosink a call to TryAnnotateCXXScopeToken down into the
Chris Lattner [Mon, 5 Jan 2009 00:07:25 +0000 (00:07 +0000)]
sink a call to TryAnnotateCXXScopeToken down into the
applicable cases in ParseDeclarationSpecifiers.

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

16 years agoSimplify some control flow and remove a call to TryAnnotateCXXScopeToken
Chris Lattner [Sun, 4 Jan 2009 23:51:17 +0000 (23:51 +0000)]
Simplify some control flow and remove a call to TryAnnotateCXXScopeToken
that isn't doing what is desired. It was annotating the current token
not the 'next' token.  This code should be fixed.

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

16 years agocode simplification
Chris Lattner [Sun, 4 Jan 2009 23:46:59 +0000 (23:46 +0000)]
code simplification

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

16 years agosink calls to TryAnnotateTypeOrScopeToken down into the only cases that they
Chris Lattner [Sun, 4 Jan 2009 23:41:41 +0000 (23:41 +0000)]
sink calls to TryAnnotateTypeOrScopeToken down into the only cases that they
can interact with.

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

16 years agopush the call in isCXXDeclarationSpecifier to TryAnnotateTypeOrScopeToken
Chris Lattner [Sun, 4 Jan 2009 23:33:56 +0000 (23:33 +0000)]
push the call in isCXXDeclarationSpecifier to TryAnnotateTypeOrScopeToken
down into the two cases that it can possibly affect.  This avoids calls
to it that obviously can't do anything.

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

16 years agomy previous patch caused sema to drop the global qualifier, make
Chris Lattner [Sun, 4 Jan 2009 23:23:14 +0000 (23:23 +0000)]
my previous patch caused sema to drop the global qualifier, make
sure to pass it down.  This makes the code a bit gross, I will clean
it up in subsequent commits.

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

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