]> granicus.if.org Git - clang/log
clang
17 years agorename -parse-ast-print to -ast-print
Chris Lattner [Thu, 11 Oct 2007 00:18:28 +0000 (00:18 +0000)]
rename -parse-ast-print to -ast-print
rename -parse-ast-dump to -ast-dump
remove -parse-ast, which is redundant with -fsyntax-only

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

17 years agoFix 80 col violations.
Chris Lattner [Wed, 10 Oct 2007 23:42:28 +0000 (23:42 +0000)]
Fix 80 col violations.

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

17 years agofix a bunch of regressions I introduced :(
Chris Lattner [Wed, 10 Oct 2007 23:31:03 +0000 (23:31 +0000)]
fix a bunch of regressions I introduced :(

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

17 years agoRefinements to Sema::GetObjcIdType()...
Steve Naroff [Wed, 10 Oct 2007 23:24:43 +0000 (23:24 +0000)]
Refinements to Sema::GetObjcIdType()...

- Cache the typedef, not the type (avoids importing AST/Type.h).
- Emit an error if "id" cannot be found.
- Comment the routine and add a FIXME to reconsider how we emulate GCC's new fangled behavior. This isn't a priority for now, since almost no code depends on having "id" built-in.
- Add a test.

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

17 years agoCommented out header with no section body. Will write this eventually.
Ted Kremenek [Wed, 10 Oct 2007 23:22:00 +0000 (23:22 +0000)]
Commented out header with no section body.  Will write this eventually.

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

17 years agoAdded some documentation on clang CFGs. It is very rough.
Ted Kremenek [Wed, 10 Oct 2007 23:01:43 +0000 (23:01 +0000)]
Added some documentation on clang CFGs.  It is very rough.

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

17 years ago- Make sure default return/argument types (for methods) default to "id".
Steve Naroff [Wed, 10 Oct 2007 21:53:07 +0000 (21:53 +0000)]
- Make sure default return/argument types (for methods) default to "id".
- Cache the "id" type in Sema...initialize ObjcIdType and TUScope (oops).
- Fix ActOnInstanceMessage to allow for "id" type receivers...still work to do (next).

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

17 years agoavoid accessing off the end of identifiers.
Chris Lattner [Wed, 10 Oct 2007 20:59:57 +0000 (20:59 +0000)]
avoid accessing off the end of identifiers.

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

17 years agoEmit a warning when the body of an if block is a NullStmt.
Anders Carlsson [Wed, 10 Oct 2007 20:50:11 +0000 (20:50 +0000)]
Emit a warning when the body of an if block is a NullStmt.

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

17 years agoclang -E should not print tokens from the predefines buffer.
Chris Lattner [Wed, 10 Oct 2007 20:45:16 +0000 (20:45 +0000)]
clang -E should not print tokens from the predefines buffer.

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

17 years agoUpdated VC++ build system.
Hartmut Kaiser [Wed, 10 Oct 2007 19:50:45 +0000 (19:50 +0000)]
Updated VC++ build system.

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

17 years agoAdded idea for a simple C++ checker.
Ted Kremenek [Wed, 10 Oct 2007 18:52:22 +0000 (18:52 +0000)]
Added idea for a simple C++ checker.

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

17 years agoadd an idea
Chris Lattner [Wed, 10 Oct 2007 18:08:07 +0000 (18:08 +0000)]
add an idea

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

17 years agoresolve a fixme, by moving __builtin_va_list to a more logical
Chris Lattner [Wed, 10 Oct 2007 17:48:53 +0000 (17:48 +0000)]
resolve a fixme, by moving __builtin_va_list to a more logical
place and making it correctly parameterized on the target.

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

17 years agoFix a latent bug in MinimalActions (created by a recent name change).
Steve Naroff [Wed, 10 Oct 2007 17:45:44 +0000 (17:45 +0000)]
Fix a latent bug in MinimalActions (created by a recent name change).

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

17 years agoRemove Scope argument from ObjC actions that either don't need it or can now use...
Steve Naroff [Wed, 10 Oct 2007 17:32:04 +0000 (17:32 +0000)]
Remove Scope argument from ObjC actions that either don't need it or can now use TUScope.
Also improve a recently added comment.

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

17 years agoAdd a dummy for the id typedef. Steve, plz fill this in. :)
Chris Lattner [Tue, 9 Oct 2007 22:58:09 +0000 (22:58 +0000)]
Add a dummy for the id typedef.  Steve, plz fill this in. :)

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

17 years agoMake a significant change to invert the control flow handling
Chris Lattner [Tue, 9 Oct 2007 22:10:18 +0000 (22:10 +0000)]
Make a significant change to invert the control flow handling
predefined macros.  Previously, these were handled by the driver,
now they are handled by the preprocessor.

Some fallout of this:

1. Instead of preprocessing two buffers (the predefines, then the
   main source file)  we now start preprocessing the main source
   file and inject the predefines as a "psuedo #include" from the
   main source file.
2. #1 allows us to nuke the Lexer::IsMainFile flag and simplify
   Preprocessor::isInPrimaryFile.
3. The driver doesn't have to know about standard #defines, the
   preprocessor knows, which is nice for people wanting to define
   their own drivers.
4. This allows us to put normal tokens in the predefine buffer,
   for example a definition for __builtin_va_list that is
   target-specific, and a typedef for id in objc.

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

17 years agoMake sure methods with no return type default to "id".
Steve Naroff [Tue, 9 Oct 2007 22:01:59 +0000 (22:01 +0000)]
Make sure methods with no return type default to "id".

This fixes a crasher in Sema::MatchTwoMethodDeclarations(), identified by selector-overload.m (just added).

Added Action::ActOnTranslationUnitScope() and renamed Action::PopScope to ActOnPopScope.

Added a Translation Unit Scope instance variable to Sema (will be very useful to ObjC-related actions, since ObjC declarations are always file-scoped).

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

17 years agoRecognize while(1) and avoid extra blocks.
Devang Patel [Tue, 9 Oct 2007 20:51:27 +0000 (20:51 +0000)]
Recognize while(1) and avoid extra blocks.

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

17 years agonew test
Devang Patel [Tue, 9 Oct 2007 20:37:41 +0000 (20:37 +0000)]
new test

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

17 years agoavoid a noop virtual method call on the hot scope poping path.
Chris Lattner [Tue, 9 Oct 2007 20:37:18 +0000 (20:37 +0000)]
avoid a noop virtual method call on the hot scope poping path.

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

17 years agoRecognize "do {} while (0)" idiom and avoid extra basic blocks.
Devang Patel [Tue, 9 Oct 2007 20:33:39 +0000 (20:33 +0000)]
Recognize "do {} while (0)"  idiom and avoid extra basic blocks.

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

17 years agoUse LLVMFoldingBuilder
Devang Patel [Tue, 9 Oct 2007 19:49:58 +0000 (19:49 +0000)]
Use LLVMFoldingBuilder

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

17 years agoRemove comment about protocols and namespace no longer relevant.
Fariborz Jahanian [Tue, 9 Oct 2007 18:28:41 +0000 (18:28 +0000)]
Remove comment about protocols and namespace no longer relevant.

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

17 years agoMinor code clean up to make it more readable.
Fariborz Jahanian [Tue, 9 Oct 2007 18:22:59 +0000 (18:22 +0000)]
Minor code clean up to make it more readable.

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

17 years agoUpdate DeclKind enums to reflect ObjcProtocolDecl's inheritance change.
Chris Lattner [Tue, 9 Oct 2007 18:18:24 +0000 (18:18 +0000)]
Update DeclKind enums to reflect ObjcProtocolDecl's inheritance change.

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

17 years agoRemove addition of protocol names to declaration scopes, use a separate
Fariborz Jahanian [Tue, 9 Oct 2007 18:03:53 +0000 (18:03 +0000)]
Remove addition of protocol names to declaration scopes, use a separate
DenseMap to keep track of such declarations and derive ObjcProtocolDecl
directyly from NamedScope.

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

17 years agoconvert driver over to use Token::is/isNot APIs. fwew, all done.
Chris Lattner [Tue, 9 Oct 2007 18:03:42 +0000 (18:03 +0000)]
convert driver over to use Token::is/isNot APIs.  fwew, all done.

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

17 years agoSwitch lexer/pp over to new Token::is/isNot api
Chris Lattner [Tue, 9 Oct 2007 18:02:16 +0000 (18:02 +0000)]
Switch lexer/pp over to new Token::is/isNot api

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

17 years agoswtich to Token::is/isNot
Chris Lattner [Tue, 9 Oct 2007 17:51:17 +0000 (17:51 +0000)]
swtich to Token::is/isNot

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

17 years agoswitch more code to use Token::is/isNot where possible.
Chris Lattner [Tue, 9 Oct 2007 17:41:39 +0000 (17:41 +0000)]
switch more code to use Token::is/isNot where possible.

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

17 years agoswitch some more of the parser over to using Token::is and isNot
Chris Lattner [Tue, 9 Oct 2007 17:33:22 +0000 (17:33 +0000)]
switch some more of the parser over to using Token::is and isNot

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

17 years agoAdd two new Token helper functions, "is" and "isNot". This allows us to write
Chris Lattner [Tue, 9 Oct 2007 17:23:58 +0000 (17:23 +0000)]
Add two new Token helper functions, "is" and "isNot".  This allows us to write
stuff like this:

       // If we don't have a comma, it is either the end of the list (a ';') or
       // an error, bail out.
       if (Tok.isNot(tok::comma))
         break;
instead of:
       // If we don't have a comma, it is either the end of the list (a ';') or
       // an error, bail out.
       if (Tok.getKind() != tok::comma)
         break;

There is obviously no functionality change, but the code reads a bit better and is
more terse.

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

17 years agoAdded better comment about protocol list for class ObjcQualifiedInterfaceType.
Fariborz Jahanian [Tue, 9 Oct 2007 17:14:13 +0000 (17:14 +0000)]
Added better comment about protocol list for class ObjcQualifiedInterfaceType.

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

17 years agorename some "Parse" actions to "ActOn". Move code around in
Chris Lattner [Tue, 9 Oct 2007 17:14:05 +0000 (17:14 +0000)]
rename some "Parse" actions to "ActOn".  Move code around in
ParseFunctionDefinition so that ActOnFunctionDefBody is always
called if ActOnStartOfFunctionDef is called.  This fixes a crash
reported by Nuno Lopes.

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

17 years agoUse const& for RHS.
Devang Patel [Tue, 9 Oct 2007 17:10:59 +0000 (17:10 +0000)]
Use const& for RHS.
Use copy for LHS, because it is incremented using ++ operator.

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

17 years agoFix comment. Describe what it is, instead of how it is used.
Devang Patel [Tue, 9 Oct 2007 17:08:50 +0000 (17:08 +0000)]
Fix comment. Describe what it is, instead of how it is used.

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

17 years agoPrevent memory leak by not creating a category object when there is a
Fariborz Jahanian [Tue, 9 Oct 2007 17:05:22 +0000 (17:05 +0000)]
Prevent memory leak by not creating a category object when there is a
fatal error of category's undefined interface.

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

17 years agoRemove 2 protocol related actions from MinimalActions (protocols shouldn't be recogni...
Steve Naroff [Mon, 8 Oct 2007 23:10:47 +0000 (23:10 +0000)]
Remove 2 protocol related actions from MinimalActions (protocols shouldn't be recognized as types).

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

17 years agoAdded a new class for Interfaces qualified by protocol list.
Fariborz Jahanian [Mon, 8 Oct 2007 23:06:41 +0000 (23:06 +0000)]
Added a new class for Interfaces qualified by protocol list.
Protocols are now sorted and made unique in the list.
Enhanced pretty printer for @interface (So, I can see the protocol list).

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

17 years agoRemoved unused instance variable from FieldDecl.
Steve Naroff [Mon, 8 Oct 2007 21:56:47 +0000 (21:56 +0000)]
Removed unused instance variable from FieldDecl.

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

17 years agoRename FileVariable -> FileVar for consistency with its class name,
Chris Lattner [Mon, 8 Oct 2007 21:37:32 +0000 (21:37 +0000)]
Rename FileVariable -> FileVar for consistency with its class name,
likewise block and param.  Reorder the layout of the Decl kind enum
so that the inheritance tree is reflected in the ordering.  This allows
trivial range comparisons to determine whether something is an instance
of some abstract class, making classof faster.

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

17 years agoadd a comment.
Chris Lattner [Mon, 8 Oct 2007 21:36:22 +0000 (21:36 +0000)]
add a comment.

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

17 years agoMove identifierTable.h to the right folder.
Chris Lattner [Mon, 8 Oct 2007 21:35:59 +0000 (21:35 +0000)]
Move identifierTable.h to the right folder.

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

17 years agoConvert Selector Maps/Sets to use stronger typing (now that we have DenseMapInfo...
Steve Naroff [Mon, 8 Oct 2007 21:05:34 +0000 (21:05 +0000)]
Convert Selector Maps/Sets to use stronger typing (now that we have DenseMapInfo in IdentifierTable.h).

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

17 years agoCode gen case statement ranges.
Devang Patel [Mon, 8 Oct 2007 20:57:48 +0000 (20:57 +0000)]
Code gen case statement ranges.

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

17 years agoSeveral small patches to do pretty printing for objective-c top-level decls
Fariborz Jahanian [Mon, 8 Oct 2007 18:53:38 +0000 (18:53 +0000)]
Several small patches to do pretty printing for objective-c top-level decls
(minimal printing), Derive ObjcClassDecl from Decl. Ted may want to
take note of the change I made to CFGRecStmtDeclVisitor.h

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

17 years agoRemoved unnecessary base class from some of objective-c classes:
Fariborz Jahanian [Mon, 8 Oct 2007 17:35:11 +0000 (17:35 +0000)]
Removed unnecessary base class from some of objective-c classes:
ObjcProtocolDecl is now derived from ScopedDecl. ObjcForwardProtocolDecl from Decl.
ObjcImplementationDecl fom NamedDecl.

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

17 years agoReturn NULL on invalid protocol.
Fariborz Jahanian [Mon, 8 Oct 2007 16:07:03 +0000 (16:07 +0000)]
Return NULL on invalid protocol.

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

17 years agoremove unneeded #include
Chris Lattner [Sun, 7 Oct 2007 08:59:27 +0000 (08:59 +0000)]
remove unneeded #include

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

17 years agomove IdentifierTable.h from liblex to libbasic.
Chris Lattner [Sun, 7 Oct 2007 08:58:51 +0000 (08:58 +0000)]
move IdentifierTable.h from liblex to libbasic.

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

17 years agoimplement the Token class in the Lexer.cpp file instead of IdentifierInfo.cpp
Chris Lattner [Sun, 7 Oct 2007 08:47:24 +0000 (08:47 +0000)]
implement the Token class in the Lexer.cpp file instead of IdentifierInfo.cpp

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

17 years agoimprove layering:
Chris Lattner [Sun, 7 Oct 2007 08:44:20 +0000 (08:44 +0000)]
improve layering:
Now instead of IdentifierInfo knowing anything about MacroInfo,
only the preprocessor knows.  This makes MacroInfo truly private
to the Lex library (and its direct clients) instead of being
accessed in the Basic library.

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

17 years agochange calls to getMacroInfo into hasMacroDefinition() where possible.
Chris Lattner [Sun, 7 Oct 2007 08:04:56 +0000 (08:04 +0000)]
change calls to getMacroInfo into hasMacroDefinition() where possible.

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

17 years agoadd a hasMacroDefinition() method to IdentifierInfo, strength reduce a
Chris Lattner [Sun, 7 Oct 2007 07:57:27 +0000 (07:57 +0000)]
add a hasMacroDefinition() method to IdentifierInfo, strength reduce a
call to getMacroInfo to call it.

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

17 years agoupdate comment.
Chris Lattner [Sun, 7 Oct 2007 07:54:23 +0000 (07:54 +0000)]
update comment.

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

17 years agoRemove the PPID bitfield from IdentifierInfo, shrinking it by a word
Chris Lattner [Sun, 7 Oct 2007 07:52:34 +0000 (07:52 +0000)]
Remove the PPID bitfield from IdentifierInfo, shrinking it by a word
(because all bitfields now fit in 32 bits).  This shrinks the identifier
table for carbon.h from 1634428 to 1451424 bytes (12%) and has no impact
on compile time.

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

17 years agoFirst step to fixing a long lived layering violation: this
Chris Lattner [Sun, 7 Oct 2007 07:09:52 +0000 (07:09 +0000)]
First step to fixing a long lived layering violation: this
moves the MacroInfo pointer to a side hash table (which currently
lives in IdentifierTable.cpp).  This removes a pointer from
Identifier info, but doesn't shrink it, as it requires a new bit
be added.  This strange approach with the 'hasmacro' bit is needed
to not lose preprocessor performance.

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

17 years agoThe identifier shouldn't be added to the scope, the decl should.
Chris Lattner [Sun, 7 Oct 2007 07:05:08 +0000 (07:05 +0000)]
The identifier shouldn't be added to the scope, the decl should.
This fixes strange assertions that just started triggering.

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

17 years agoclassof isn't right. This is causing assertion failures somehow now.
Chris Lattner [Sun, 7 Oct 2007 07:04:41 +0000 (07:04 +0000)]
classof isn't right.  This is causing assertion failures somehow now.

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

17 years agoShrink the builtinID down by 3 bits, allowing all the bitfields to
Chris Lattner [Sun, 7 Oct 2007 06:29:32 +0000 (06:29 +0000)]
Shrink the builtinID down by 3 bits, allowing all the bitfields to
fit in 32-bits, shrinking IdentifierInfo by a word.

This shrinks the total size of the identifier pool from
1817264 to 1634428 bytes (11%) on carbon.h.

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

17 years agoRename ASTStreamers.* -> ASTConsumers.*
Chris Lattner [Sun, 7 Oct 2007 06:04:32 +0000 (06:04 +0000)]
Rename ASTStreamers.* -> ASTConsumers.*

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

17 years agosimplify the interfaces to create selectors: getSelector can take any
Chris Lattner [Sun, 7 Oct 2007 02:00:24 +0000 (02:00 +0000)]
simplify the interfaces to create selectors: getSelector can take any
number of arguments now and does the right thing, but the nullary/unary
accessors are preserved as convenience functions.  This allows us to
slightly simplify clients.

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

17 years agosimplify some Selector interfaces.
Chris Lattner [Sun, 7 Oct 2007 01:33:16 +0000 (01:33 +0000)]
simplify some Selector interfaces.

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

17 years agomove ImplementationClassInfo out of ASTContext into Sema.
Chris Lattner [Sun, 7 Oct 2007 01:13:46 +0000 (01:13 +0000)]
move ImplementationClassInfo out of ASTContext into Sema.

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

17 years agoadd comments.
Chris Lattner [Sat, 6 Oct 2007 23:30:21 +0000 (23:30 +0000)]
add comments.

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

17 years agoswitch ObjcCategoryImplDecl over to being a NamedDecl, remove dead ctor argument.
Chris Lattner [Sat, 6 Oct 2007 23:12:31 +0000 (23:12 +0000)]
switch ObjcCategoryImplDecl over to being a NamedDecl, remove dead ctor argument.

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

17 years agointroduce a new NamedDecl class, switch a couple of things over to using it.
Chris Lattner [Sat, 6 Oct 2007 22:53:46 +0000 (22:53 +0000)]
introduce a new NamedDecl class, switch a couple of things over to using it.
NamedDecl is a Decl that has an IdentifierInfo (for example, ScopedDecl),
but not ObjcMethodDecl.

Simplify some code in ActOnAddMethodsToObjcDecl, by doing the cast from
DeclTy to Decl at the start of the method.

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

17 years agoEvery decl has a SourceLocation, move the location info into the Decl class instead...
Chris Lattner [Sat, 6 Oct 2007 22:16:01 +0000 (22:16 +0000)]
Every decl has a SourceLocation, move the location info into the Decl class instead of being in subclasses.

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

17 years agofuture notes & minor changes
Kevin [Sat, 6 Oct 2007 21:28:47 +0000 (21:28 +0000)]
future notes & minor changes

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

17 years agosimplify the interface to create ObjcClassDecl's.
Chris Lattner [Sat, 6 Oct 2007 20:08:36 +0000 (20:08 +0000)]
simplify the interface to create ObjcClassDecl's.

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

17 years agosimplify the interface for creating ObjcForwardProtocolDecl
Chris Lattner [Sat, 6 Oct 2007 20:05:59 +0000 (20:05 +0000)]
simplify the interface for creating ObjcForwardProtocolDecl

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

17 years agoadd a missing ;
Chris Lattner [Sat, 6 Oct 2007 19:08:22 +0000 (19:08 +0000)]
add a missing ;

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

17 years agostub out some printing of objc decls.
Chris Lattner [Sat, 6 Oct 2007 18:52:10 +0000 (18:52 +0000)]
stub out some printing of objc decls.

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

17 years agospeed up clang startup another 28% by avoiding std::vector<std::string>
Chris Lattner [Sat, 6 Oct 2007 06:57:34 +0000 (06:57 +0000)]
speed up clang startup another 28% by avoiding std::vector<std::string>
for holding builtin target-specific macros.

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

17 years agospeed up clang startup time by about 23% by avoiding lots of
Chris Lattner [Sat, 6 Oct 2007 06:29:41 +0000 (06:29 +0000)]
speed up clang startup time by about 23% by avoiding lots of
stringmap operations when there are no secondary targets.

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

17 years agofix grammaro
Chris Lattner [Sat, 6 Oct 2007 05:48:57 +0000 (05:48 +0000)]
fix grammaro

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

17 years agoedits
Chris Lattner [Sat, 6 Oct 2007 05:42:47 +0000 (05:42 +0000)]
edits

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

17 years agofix accidental commit
Chris Lattner [Sat, 6 Oct 2007 05:38:32 +0000 (05:38 +0000)]
fix accidental commit

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

17 years agoedits
Chris Lattner [Sat, 6 Oct 2007 05:30:19 +0000 (05:30 +0000)]
edits

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

17 years agovarious minor edits, e.g. & -> &amp;
Chris Lattner [Sat, 6 Oct 2007 05:23:00 +0000 (05:23 +0000)]
various minor edits, e.g. & -> &amp;

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

17 years agoNew directory.
Kevin [Sat, 6 Oct 2007 05:15:30 +0000 (05:15 +0000)]
New directory.

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

17 years agoadd a warning.
Chris Lattner [Sat, 6 Oct 2007 05:13:47 +0000 (05:13 +0000)]
add a warning.

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

17 years agominor edits
Chris Lattner [Sat, 6 Oct 2007 05:09:04 +0000 (05:09 +0000)]
minor edits

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

17 years agoFix spacing issues.
Bill Wendling [Sat, 6 Oct 2007 01:56:01 +0000 (01:56 +0000)]
Fix spacing issues.

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

17 years agoJust say "No" to non-ASCII things.
Bill Wendling [Sat, 6 Oct 2007 01:53:09 +0000 (01:53 +0000)]
Just say "No" to non-ASCII things.

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

17 years agoRemove non-ASCII '
Bill Wendling [Sat, 6 Oct 2007 01:44:57 +0000 (01:44 +0000)]
Remove non-ASCII '

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

17 years ago1. May fix encoding issues: server uses UTF; HTML file assumes Western (ISO 8859-1).
Kevin [Sat, 6 Oct 2007 01:28:23 +0000 (01:28 +0000)]
1. May fix encoding issues: server uses UTF; HTML file assumes Western (ISO 8859-1).
2. Added strict doctype.

Closing out tags like <br/> and <meta.../> may still be a problem (necessary for XHTML, but wrong for HTML)....

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

17 years agoModifications to XCode project:
Ted Kremenek [Fri, 5 Oct 2007 23:32:54 +0000 (23:32 +0000)]
Modifications to XCode project:
- Added include/Analysis/ExprDeclBitVector.h
- Added include/Analysis/ProgramEdge.h
- Removed include/Analysis/Visitors/DataflowStmtVisitor.h

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

17 years agoRemoved DataflowStmtVisitor. It is no longer used, and is obsoleted
Ted Kremenek [Fri, 5 Oct 2007 23:27:24 +0000 (23:27 +0000)]
Removed DataflowStmtVisitor.  It is no longer used, and is obsoleted
by newer visitor interfaces.

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

17 years agoA message on the main page about bulding clang.
Kevin [Fri, 5 Oct 2007 21:44:03 +0000 (21:44 +0000)]
A message on the main page about bulding clang.

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

17 years agonew site -- the rest of it
Kevin [Fri, 5 Oct 2007 21:18:52 +0000 (21:18 +0000)]
new site -- the rest of it

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

17 years agonew site
Kevin [Fri, 5 Oct 2007 21:17:52 +0000 (21:17 +0000)]
new site

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

17 years agoThis is the first patch toward supporting protocol conforming
Fariborz Jahanian [Fri, 5 Oct 2007 21:01:53 +0000 (21:01 +0000)]
This is the first patch toward supporting protocol conforming
objective-c types. It also removes use of Scope* parameter in
getObjCProtocolDecl.

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

17 years agoSupport case statement ranges.
Devang Patel [Fri, 5 Oct 2007 20:54:07 +0000 (20:54 +0000)]
Support case statement ranges.

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

17 years agoPer request... about to make changes to the website.
Kevin [Fri, 5 Oct 2007 20:31:57 +0000 (20:31 +0000)]
Per request... about to make changes to the website.

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

17 years agoImplement DenseMapInfo for Selector, allowing use of DenseMap/DenseSet of
Chris Lattner [Fri, 5 Oct 2007 20:15:24 +0000 (20:15 +0000)]
Implement DenseMapInfo for Selector, allowing use of DenseMap/DenseSet of
Selector's instead of requiring void* to be used.  I converted one use of
DenseSet<void*> over to use DenseSet<Selector> but the others should change
as well.

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

17 years agoLayering refinements for selectors (suggested by Chris). Specifics...
Steve Naroff [Fri, 5 Oct 2007 18:42:47 +0000 (18:42 +0000)]
Layering refinements for selectors (suggested by Chris). Specifics...

- Add SelectorTable, which enables us to remove MultiKeywordSelector from the public header.
- Remove FoldingSet from IdentifierInfo.h and Preprocessor.h.
- Remove Parser::ObjcGetUnarySelector and Parser::ObjcGetKeywordSelector, they are subsumed by SelectorTable.
- Add MultiKeywordSelector to IdentifierInfo.cpp.
- Move a bunch of selector related methods from ParseObjC.cpp to IdentifierInfo.cpp.
- Added some comments.

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

17 years agoPatch for 1) Checking for duplicate methods decls in intterface and category.
Fariborz Jahanian [Fri, 5 Oct 2007 18:00:57 +0000 (18:00 +0000)]
Patch for 1) Checking for duplicate methods decls in intterface and category.
2) Use of the new DenseSet<t> abstractions instead of DenseMap<t,char>.

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