]> granicus.if.org Git - clang/log
clang
15 years agoFix Decl::NextDeclInScope access issue
Douglas Gregor [Tue, 20 Jan 2009 04:04:17 +0000 (04:04 +0000)]
Fix Decl::NextDeclInScope access issue

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

15 years agoccc: Recognize that -M and -MM only run preprocessor.
Daniel Dunbar [Tue, 20 Jan 2009 01:53:54 +0000 (01:53 +0000)]
ccc: Recognize that -M and -MM only run preprocessor.
 - Clean up some placement of output args to match gcc more precisely
   (for testing).

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

15 years agoMake test independent of stdint.h
Daniel Dunbar [Tue, 20 Jan 2009 01:27:09 +0000 (01:27 +0000)]
Make test independent of stdint.h

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

15 years agoRemove ScopedDecl, collapsing all of its functionality into Decl, so
Douglas Gregor [Tue, 20 Jan 2009 01:17:11 +0000 (01:17 +0000)]
Remove ScopedDecl, collapsing all of its functionality into Decl, so
that every declaration lives inside a DeclContext.

Moved several things that don't have names but were ScopedDecls (and,
therefore, NamedDecls) to inherit from Decl rather than NamedDecl,
including ObjCImplementationDecl and LinkageSpecDecl. Now, we don't
store empty DeclarationNames for these things, nor do we try to insert
them into DeclContext's lookup structure.

The serialization tests are temporarily disabled. We'll re-enable them
once we've sorted out the remaining ownership/serialiazation issues
between DeclContexts and TranslationUnion, DeclGroups, etc.

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

15 years agoUpdate for new SourceLocation API.
Daniel Dunbar [Tue, 20 Jan 2009 01:06:30 +0000 (01:06 +0000)]
Update for new SourceLocation API.

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

15 years agoDead stores checker: Fix <rdar://problem/6506065> by being more selective when say...
Ted Kremenek [Tue, 20 Jan 2009 00:47:45 +0000 (00:47 +0000)]
Dead stores checker: Fix <rdar://problem/6506065> by being more selective when say that a store is dead even though the computed value is used in the enclosing expression.

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

15 years agoccc: Darwin/x86: Add direct cpp support.
Daniel Dunbar [Tue, 20 Jan 2009 00:47:24 +0000 (00:47 +0000)]
ccc: Darwin/x86: Add direct cpp support.
 - Add Darwin_X86_CC1Tool which is shared by Darwin/x86/Compile and
   Darwin/x86/Preprocess tools.

 - Minor bug fixes (CmpDriver exit code, -x cpp-output handling, some
   linker argument translation).

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

15 years agoPTH: Emitted tokens now consist of 12 bytes that are loaded used 3 32-bit loads....
Ted Kremenek [Mon, 19 Jan 2009 23:13:15 +0000 (23:13 +0000)]
PTH: Emitted tokens now consist of 12 bytes that are loaded used 3 32-bit loads.  This reduces user time but increases system time because of the slightly larger PTH file.  Although there is no performance win on Cocoa.h and -Eonly, overall this seems like a good step.

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

15 years agoMake sure all types are allocated with 8-byte alignment.
Steve Naroff [Mon, 19 Jan 2009 22:45:10 +0000 (22:45 +0000)]
Make sure all types are allocated with 8-byte alignment.
The QualType smart pointer assumes we have 3 flag bits available.

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

15 years agoConvert more expression actions to smart pointers.
Sebastian Redl [Mon, 19 Jan 2009 22:31:54 +0000 (22:31 +0000)]
Convert more expression actions to smart pointers.

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

15 years agoAdd missing test case for operator ! result type.
Sebastian Redl [Mon, 19 Jan 2009 21:37:51 +0000 (21:37 +0000)]
Add missing test case for operator ! result type.

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

15 years agoUpdate Xcode project.
Ted Kremenek [Mon, 19 Jan 2009 21:31:51 +0000 (21:31 +0000)]
Update Xcode project.

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

15 years agoAllocate Types using ASTContext's 'Allocator' object.
Ted Kremenek [Mon, 19 Jan 2009 21:31:22 +0000 (21:31 +0000)]
Allocate Types using ASTContext's 'Allocator' object.

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

15 years agoType of property and its ivar is more restrictive
Fariborz Jahanian [Mon, 19 Jan 2009 20:13:47 +0000 (20:13 +0000)]
Type of property and its ivar is more restrictive
that rules for assignment.

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

15 years agoMakefile isn't executable.
Daniel Dunbar [Mon, 19 Jan 2009 19:59:59 +0000 (19:59 +0000)]
Makefile isn't executable.

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

15 years agoCentralize error reporting of improper uses of incomplete types in the
Douglas Gregor [Mon, 19 Jan 2009 19:26:10 +0000 (19:26 +0000)]
Centralize error reporting of improper uses of incomplete types in the
new DiagnoseIncompleteType. It provides additional information about
struct/class/union/enum types when possible, either by pointing to the
forward declaration of that type or by pointing to the definition (if
we're in the process of defining that type).
Fixes <rdar://problem/6500531>.

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

15 years agoccc: Add missing file.
Daniel Dunbar [Mon, 19 Jan 2009 19:20:01 +0000 (19:20 +0000)]
ccc: Add missing file.

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

15 years agoccc: Add installation of ccc; based on patch from Mike Stump.
Daniel Dunbar [Mon, 19 Jan 2009 18:50:49 +0000 (18:50 +0000)]
ccc: Add installation of ccc; based on patch from Mike Stump.
 - This doesn't follow normal installation procedure of python
   code, but no sense trying too hard since ccc will be moved to
   C++.

 - Entry point is now tools/ccc.

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

15 years agoPatch to allow @dynamic synthesis of property in a category,
Fariborz Jahanian [Mon, 19 Jan 2009 18:16:19 +0000 (18:16 +0000)]
Patch to allow @dynamic synthesis of property in a category,
with @synthesize being illegal.

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

15 years agorearrange SourceManager methods to group them by kind. Remove the
Chris Lattner [Mon, 19 Jan 2009 08:02:45 +0000 (08:02 +0000)]
rearrange SourceManager methods to group them by kind.  Remove the
SourceManager::getFileCharacteristic(FileID) method: we need a
full location to know if it is a system header etc in the future.

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

15 years agodo not use SourceManager::getFileCharacteristic(FileID), it is not
Chris Lattner [Mon, 19 Jan 2009 08:01:53 +0000 (08:01 +0000)]
do not use SourceManager::getFileCharacteristic(FileID), it is not
safe because a #line can change the file characteristic on a per-loc
basis.

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

15 years agodo not use SourceManager::getFileCharacteristic(FileID), it is not
Chris Lattner [Mon, 19 Jan 2009 07:59:15 +0000 (07:59 +0000)]
do not use SourceManager::getFileCharacteristic(FileID), it is not
safe because a #line can change the file characteristic on a per-loc
basis.

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

15 years agoRename SourceManager::getCanonicalFileID -> getFileID. There is
Chris Lattner [Mon, 19 Jan 2009 07:46:45 +0000 (07:46 +0000)]
Rename SourceManager::getCanonicalFileID -> getFileID.  There is
no longer such thing as a non-canonical FileID.

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

15 years agoRun destructors of MacroInfo objects to free memory they allocate. This addresses...
Ted Kremenek [Mon, 19 Jan 2009 07:45:44 +0000 (07:45 +0000)]
Run destructors of MacroInfo objects to free memory they allocate.  This addresses <rdar://problem/6506035>.

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

15 years agoremove the public SourceManager::getContentCacheForLoc method.
Chris Lattner [Mon, 19 Jan 2009 07:40:40 +0000 (07:40 +0000)]
remove the public SourceManager::getContentCacheForLoc method.

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

15 years agoremove the SourceManager:: and FullSourceLoc::getFileEntryForLoc methods.
Chris Lattner [Mon, 19 Jan 2009 07:36:42 +0000 (07:36 +0000)]
remove the SourceManager:: and FullSourceLoc::getFileEntryForLoc methods.

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

15 years agoSourceManager::getBufferData(SourceLocation) is dead, delete it.
Chris Lattner [Mon, 19 Jan 2009 07:32:13 +0000 (07:32 +0000)]
SourceManager::getBufferData(SourceLocation) is dead, delete it.

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

15 years agosome minor cleanups to SourceManager, and eliminate the
Chris Lattner [Mon, 19 Jan 2009 07:30:29 +0000 (07:30 +0000)]
some minor cleanups to SourceManager, and eliminate the
SourceManager::getBuffer(SourceLocation) method.

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

15 years agoprivatize getChunkID/getMacroID, and move operator< out of the class.
Chris Lattner [Mon, 19 Jan 2009 07:00:35 +0000 (07:00 +0000)]
privatize getChunkID/getMacroID, and move operator< out of the class.

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

15 years agoMake some enums in SourceLocation private, remove a useless assertion from ScratchBuffer.
Chris Lattner [Mon, 19 Jan 2009 06:57:37 +0000 (06:57 +0000)]
Make some enums in SourceLocation private, remove a useless assertion from ScratchBuffer.

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

15 years agomake a bunch of more SourceLocation methods private.
Chris Lattner [Mon, 19 Jan 2009 06:55:08 +0000 (06:55 +0000)]
make a bunch of more SourceLocation methods private.

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

15 years agoMake SourceLocation::getFileLoc private to reduce the API exposure of
Chris Lattner [Mon, 19 Jan 2009 06:46:35 +0000 (06:46 +0000)]
Make SourceLocation::getFileLoc private to reduce the API exposure of
SourceLocation.  This requires making some cleanups to token pasting
and _Pragma expansion.

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

15 years agoFix a typo
Douglas Gregor [Mon, 19 Jan 2009 05:29:50 +0000 (05:29 +0000)]
Fix a typo

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

15 years agoConvert more expression actions to smart pointers.
Sebastian Redl [Mon, 19 Jan 2009 00:08:26 +0000 (00:08 +0000)]
Convert more expression actions to smart pointers.
Fix type of logical negation for C++.

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

15 years agoccc: Bug fix, pch generation should not try to output on pipe and -E
Daniel Dunbar [Sun, 18 Jan 2009 21:35:24 +0000 (21:35 +0000)]
ccc: Bug fix, pch generation should not try to output on pipe and -E
should. This needs cleanup.

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

15 years agofix rdar://6505352 - Bogus warning with -WUndef, a case
Chris Lattner [Sun, 18 Jan 2009 21:18:58 +0000 (21:18 +0000)]
fix rdar://6505352 - Bogus warning with -WUndef, a case
Anders noticed.

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

15 years agofix deallocation of FunctionDecl::ParamInfo
Nuno Lopes [Sun, 18 Jan 2009 19:57:27 +0000 (19:57 +0000)]
fix deallocation of FunctionDecl::ParamInfo

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

15 years agoConvert a few expression actions to smart pointers.
Sebastian Redl [Sun, 18 Jan 2009 18:53:16 +0000 (18:53 +0000)]
Convert a few expression actions to smart pointers.
These actions are extremely widely used (identifier expressions and literals); still no performance regression.

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

15 years agoRename move_convert to move_arg and move_res. The new names are less misleading ...
Sebastian Redl [Sun, 18 Jan 2009 18:03:53 +0000 (18:03 +0000)]
Rename move_convert to move_arg and move_res. The new names are less misleading (and shorter).

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

15 years agoConvert ObjC statement actions to smart pointers.
Sebastian Redl [Sun, 18 Jan 2009 17:43:11 +0000 (17:43 +0000)]
Convert ObjC statement actions to smart pointers.

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

15 years agoConvert asm statement action to smart pointers.
Sebastian Redl [Sun, 18 Jan 2009 16:53:17 +0000 (16:53 +0000)]
Convert asm statement action to smart pointers.

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

15 years agoConvert more statement actions to smart pointers.
Sebastian Redl [Sun, 18 Jan 2009 13:19:59 +0000 (13:19 +0000)]
Convert more statement actions to smart pointers.

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

15 years agoSwitch MinimalAction from new/delete'ing its TypeNameInfo to
Chris Lattner [Sun, 18 Jan 2009 09:39:41 +0000 (09:39 +0000)]
Switch MinimalAction from new/delete'ing its TypeNameInfo to
allocating them from a recycling bump pointer allocator.  This
reduces malloc/free traffic of parse-noop (but no other mode),
which makes sharking -parse-noop more meaningful.

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

15 years agoVector codegen improvements
Nate Begeman [Sun, 18 Jan 2009 06:42:49 +0000 (06:42 +0000)]
Vector codegen improvements

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

15 years agoSupport evaluation of vector constant expressions, and codegen of same.
Nate Begeman [Sun, 18 Jan 2009 03:20:47 +0000 (03:20 +0000)]
Support evaluation of vector constant expressions, and codegen of same.

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

15 years agorearrange GetIdentifierInfo so that the fast path can be partially inlined into PTHLe...
Chris Lattner [Sun, 18 Jan 2009 02:57:21 +0000 (02:57 +0000)]
rearrange GetIdentifierInfo so that the fast path can be partially inlined into PTHLexer::Lex.  This speeds up the user time of PTH -Eonly by another 2ms (4.4%)

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

15 years agoFix a tyop
Anders Carlsson [Sun, 18 Jan 2009 02:54:30 +0000 (02:54 +0000)]
Fix a tyop

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

15 years agoMake CCC_ECHO output to stderr
Anders Carlsson [Sun, 18 Jan 2009 02:54:17 +0000 (02:54 +0000)]
Make CCC_ECHO output to stderr

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

15 years agoAvoid malloc thrashing on the std::vector for ConditionalStack. Because
Chris Lattner [Sun, 18 Jan 2009 02:52:26 +0000 (02:52 +0000)]
Avoid malloc thrashing on the std::vector for ConditionalStack.  Because
there is one of these per header, this almost always gets alloc/free'd for
each #ifdef.

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

15 years agorename some variables, only set a tokens identifierinfo if non-null.
Chris Lattner [Sun, 18 Jan 2009 02:34:01 +0000 (02:34 +0000)]
rename some variables, only set a tokens identifierinfo if non-null.

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

15 years agoEliminate tabs
Nate Begeman [Sun, 18 Jan 2009 02:27:45 +0000 (02:27 +0000)]
Eliminate tabs

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

15 years agoFix a runtime error I saw
Anders Carlsson [Sun, 18 Jan 2009 02:19:54 +0000 (02:19 +0000)]
Fix a runtime error I saw

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

15 years agoOn i386 and x86-64, just do unaligned loads
Chris Lattner [Sun, 18 Jan 2009 02:19:16 +0000 (02:19 +0000)]
On i386 and x86-64, just do unaligned loads
instead of assembling from bytes.  This speeds up -Eonly PTH reading
of cocoa.h by about 2ms, which is 4.2%.

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

15 years agoHandle the 'X' constraint. Fixes <rdar://problem/6504897>.
Anders Carlsson [Sun, 18 Jan 2009 02:12:04 +0000 (02:12 +0000)]
Handle the 'X' constraint. Fixes <rdar://problem/6504897>.

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

15 years agoswitch PTHLexer to use Read32 and friends instead of lots of inlined
Chris Lattner [Sun, 18 Jan 2009 02:10:31 +0000 (02:10 +0000)]
switch PTHLexer to use Read32 and friends instead of lots of inlined
copies.  I verified that this causes no performance change in PTH.

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

15 years agoCG support for inline asm constraints with symbolic names. Fixes PR3345
Anders Carlsson [Sun, 18 Jan 2009 02:06:20 +0000 (02:06 +0000)]
CG support for inline asm constraints with symbolic names. Fixes PR3345

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

15 years agoA couple more vector component access fixes.
Nate Begeman [Sun, 18 Jan 2009 02:01:21 +0000 (02:01 +0000)]
A couple more vector component access fixes.

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

15 years agoswitch PTH lexer from using "const char*"s to "const unsigned char*"s
Chris Lattner [Sun, 18 Jan 2009 01:57:14 +0000 (01:57 +0000)]
switch PTH lexer from using "const char*"s to "const unsigned char*"s
internally.  This is just a cleanup that reduces the need to cast to
unsigned char before assembling a larger integer.

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

15 years agoAdd sema support for symbolic names in inline asm statements.
Anders Carlsson [Sun, 18 Jan 2009 01:56:57 +0000 (01:56 +0000)]
Add sema support for symbolic names in inline asm statements.

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

15 years agoUpdate support for vector component access on ExtVectors.
Nate Begeman [Sun, 18 Jan 2009 01:47:54 +0000 (01:47 +0000)]
Update support for vector component access on ExtVectors.

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

15 years agoFit in 80 cols
Nate Begeman [Sun, 18 Jan 2009 01:08:03 +0000 (01:08 +0000)]
Fit in 80 cols

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

15 years agoAdd support for vectors to APValue. Vector constant evaluator and tests coming.
Nate Begeman [Sun, 18 Jan 2009 01:01:34 +0000 (01:01 +0000)]
Add support for vectors to APValue.  Vector constant evaluator and tests coming.

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

15 years agoRemove outdated diagnostic. Tests are coming.
Nate Begeman [Sun, 18 Jan 2009 00:45:31 +0000 (00:45 +0000)]
Remove outdated diagnostic.  Tests are coming.

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

15 years agoSet tab width to 2 characters for all files in lib/Basic
Anders Carlsson [Sun, 18 Jan 2009 00:18:31 +0000 (00:18 +0000)]
Set tab width to 2 characters for all files in lib/Basic

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

15 years agoAllow targets to override IntMaxTWidth
Nate Begeman [Sat, 17 Jan 2009 23:56:13 +0000 (23:56 +0000)]
Allow targets to override IntMaxTWidth

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

15 years agoChange TargetInfo::validateInputConstraint to take begin/end name iterators instead...
Anders Carlsson [Sat, 17 Jan 2009 23:36:15 +0000 (23:36 +0000)]
Change TargetInfo::validateInputConstraint to take begin/end name iterators instead of the number of outputs. No functionality change.

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

15 years agoDiagnose that property name cannot be a bitfield
Fariborz Jahanian [Sat, 17 Jan 2009 23:21:10 +0000 (23:21 +0000)]
Diagnose that property name cannot be a bitfield

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

15 years agoDiagnose when method parameter is an object.
Fariborz Jahanian [Sat, 17 Jan 2009 21:57:49 +0000 (21:57 +0000)]
Diagnose when method parameter is an object.

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

15 years agoPatch to re-implement ivar-list meta-data generation to fix
Fariborz Jahanian [Sat, 17 Jan 2009 19:36:33 +0000 (19:36 +0000)]
Patch to re-implement ivar-list meta-data generation to fix
cases of unnamed ivar bitfields.

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

15 years agoRename SourceLocation::getFileID to getChunkID, because it returns
Chris Lattner [Sat, 17 Jan 2009 08:45:21 +0000 (08:45 +0000)]
Rename SourceLocation::getFileID to getChunkID, because it returns
the chunk ID not the file ID.  This exposes problems in
TextDiagnosticPrinter where it should have been using the canonical
file ID but wasn't.  Fix these along the way.

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

15 years agosimplify some lookups.
Chris Lattner [Sat, 17 Jan 2009 08:30:10 +0000 (08:30 +0000)]
simplify some lookups.

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

15 years agoChange the Lexer ctor used to lex _Pragma directives into a static factory
Chris Lattner [Sat, 17 Jan 2009 08:27:52 +0000 (08:27 +0000)]
Change the Lexer ctor used to lex _Pragma directives into a static factory
method.  This lets us clean up the interface and make it more obvious that
this method is *really really* _Pragma specific.

Note that _Pragma handling uglifies the Lexer in the critical path.  It would
be very interesting to consider making _Pragma remapping be a new special
lexer class of its own.

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

15 years agosimplify PTHManager::CreateLexer
Chris Lattner [Sat, 17 Jan 2009 08:06:50 +0000 (08:06 +0000)]
simplify PTHManager::CreateLexer

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

15 years agoChange the Lexer ctor used in the non _Pragma case to take a FileID instead
Chris Lattner [Sat, 17 Jan 2009 08:03:42 +0000 (08:03 +0000)]
Change the Lexer ctor used in the non _Pragma case to take a FileID instead
of a SourceLocation.  This should speed it up and definitely simplifies it.

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

15 years agoin Preprocessor::AdvanceToTokenCharacter, don't actually bother
Chris Lattner [Sat, 17 Jan 2009 07:57:25 +0000 (07:57 +0000)]
in Preprocessor::AdvanceToTokenCharacter, don't actually bother
creating a whole lexer when we just want one static method.

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

15 years agoMore simplifications to the lexer ctors.
Chris Lattner [Sat, 17 Jan 2009 07:56:59 +0000 (07:56 +0000)]
More simplifications to the lexer ctors.

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

15 years agomake the verbose raw-lexer ctor fully explicit instead of having
Chris Lattner [Sat, 17 Jan 2009 07:42:27 +0000 (07:42 +0000)]
make the verbose raw-lexer ctor fully explicit instead of having
embedded magic.

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

15 years agouse simplified Lexer ctor.
Chris Lattner [Sat, 17 Jan 2009 07:41:36 +0000 (07:41 +0000)]
use simplified Lexer ctor.

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

15 years agoadd a simplified lexer ctor that sets up the lexer to raw-lex an
Chris Lattner [Sat, 17 Jan 2009 07:35:14 +0000 (07:35 +0000)]
add a simplified lexer ctor that sets up the lexer to raw-lex an
entire file.

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

15 years agorefactor some common initialization code out of the two lexer ctors.
Chris Lattner [Sat, 17 Jan 2009 06:55:17 +0000 (06:55 +0000)]
refactor some common initialization code out of the two lexer ctors.

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

15 years agoUpdate checker build.
Ted Kremenek [Sat, 17 Jan 2009 06:41:35 +0000 (06:41 +0000)]
Update checker build.

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

15 years agosuck the call to "getSpellingLoc" that all clients do into
Chris Lattner [Sat, 17 Jan 2009 06:29:33 +0000 (06:29 +0000)]
suck the call to "getSpellingLoc" that all clients do into
the implementation of PTHManager::getSpelling.

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

15 years agothis massive patch introduces a simple new abstraction: it makes
Chris Lattner [Sat, 17 Jan 2009 06:22:33 +0000 (06:22 +0000)]
this massive patch introduces a simple new abstraction: it makes
"FileID" a concept that is now enforced by the compiler's type checker
instead of yet-another-random-unsigned floating around.

This is an important distinction from the "FileID" currently tracked by
SourceLocation.  *That* FileID may refer to the start of a file or to a
chunk within it.  The new FileID *only* refers to the file (and its
#include stack and eventually #line data), it cannot refer to a chunk.

FileID is a completely opaque datatype to all clients, only SourceManager
is allowed to poke and prod it.

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

15 years agomake "ContentCache::Buffer" mutable to avoid a const_cast.
Chris Lattner [Sat, 17 Jan 2009 03:54:16 +0000 (03:54 +0000)]
make "ContentCache::Buffer" mutable to avoid a const_cast.

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

15 years agono need to check this: content cache is already 1-1 map with fileentries.
Chris Lattner [Sat, 17 Jan 2009 03:49:48 +0000 (03:49 +0000)]
no need to check this: content cache is already 1-1 map with fileentries.

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

15 years agoInstead of iterating over FileID's, have PTH generation iterate over the
Chris Lattner [Sat, 17 Jan 2009 03:48:08 +0000 (03:48 +0000)]
Instead of iterating over FileID's, have PTH generation iterate over the
content cache directly.  Content cache has a 1-1 mapping with fileentries,
whereas multiple FileIDs can be the same FileEntry.

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

15 years agoremove an irrelevant idea
Chris Lattner [Sat, 17 Jan 2009 03:46:44 +0000 (03:46 +0000)]
remove an irrelevant idea

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

15 years agoWarn about typedefs of enums without any declarator name. Fixes rdar://problem/6503878
Douglas Gregor [Sat, 17 Jan 2009 02:55:50 +0000 (02:55 +0000)]
Warn about typedefs of enums without any declarator name. Fixes rdar://problem/6503878

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

15 years agoccc: Support running piped jobs (-pipe now works).
Daniel Dunbar [Sat, 17 Jan 2009 02:02:35 +0000 (02:02 +0000)]
ccc: Support running piped jobs (-pipe now works).

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

15 years agoFix analyzer crash found when scanning Wine sources where the analyzer used old logic...
Ted Kremenek [Sat, 17 Jan 2009 01:54:16 +0000 (01:54 +0000)]
Fix analyzer crash found when scanning Wine sources where the analyzer used old logic to determine the value of a switch 'case' label.

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

15 years agoPODify LookupResult, for a measly 1% speedup on Cocoa.h.
Douglas Gregor [Sat, 17 Jan 2009 01:13:24 +0000 (01:13 +0000)]
PODify LookupResult, for a measly 1% speedup on Cocoa.h.

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

15 years agoAdd -fnext-runtime to Objective-C properties testcase
Douglas Gregor [Sat, 17 Jan 2009 00:53:59 +0000 (00:53 +0000)]
Add -fnext-runtime to Objective-C properties testcase

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

15 years agoccc: Don't be pedantically compatible with -Z options, these are the
Daniel Dunbar [Sat, 17 Jan 2009 00:53:19 +0000 (00:53 +0000)]
ccc: Don't be pedantically compatible with -Z options, these are the
result of an internal implementation detail of gcc.

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

15 years agoReturn success indicator from CmpDriver.
Daniel Dunbar [Sat, 17 Jan 2009 00:50:45 +0000 (00:50 +0000)]
Return success indicator from CmpDriver.

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

15 years agoadd support for usage of cast to union thing with static vars
Nuno Lopes [Sat, 17 Jan 2009 00:48:48 +0000 (00:48 +0000)]
add support for usage of cast to union thing with static vars

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

15 years agoTeach DeclContext how to find the primary declaration for any TagDecl
Douglas Gregor [Sat, 17 Jan 2009 00:42:38 +0000 (00:42 +0000)]
Teach DeclContext how to find the primary declaration for any TagDecl
even when we are still defining the TagDecl. This is required so that
qualified name lookup of a class name within its definition works (see
the new bits in test/SemaCXX/qualified-id-lookup.cpp).

As part of this, move the nested redefinition checking code into
ActOnTag. This gives us diagnostics earlier (when we try to perform
the nested redefinition, rather than when we try to complete the 2nd
definition) and removes some code duplication.

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

15 years agoCatch a foreach parse error.
Fariborz Jahanian [Sat, 17 Jan 2009 00:00:40 +0000 (00:00 +0000)]
Catch a foreach parse error.

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

15 years agoConvert some more statement actions to smart pointers.
Sebastian Redl [Fri, 16 Jan 2009 23:28:06 +0000 (23:28 +0000)]
Convert some more statement actions to smart pointers.
Fix a type error; parser wanted to pass the third part of a for-statement as a statement; should be expression.

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

15 years agoUpdated checker build.
Ted Kremenek [Fri, 16 Jan 2009 23:26:38 +0000 (23:26 +0000)]
Updated checker build.

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

15 years agoccc: Clean up (user level) error handling.
Daniel Dunbar [Fri, 16 Jan 2009 23:12:12 +0000 (23:12 +0000)]
ccc: Clean up (user level) error handling.
 - ccc now checks for existence of input files (more annoying to test,
   but matches gcc).
 - Fix some test cases.

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