]> granicus.if.org Git - clang/log
clang
15 years agoAdd a bit to IdentifierInfo that acts as a simple predicate which
Chris Lattner [Wed, 21 Jan 2009 07:43:11 +0000 (07:43 +0000)]
Add a bit to IdentifierInfo that acts as a simple predicate which
tells us whether Preprocessor::HandleIdentifier needs to be called.
Because this method is only rarely needed, this saves a call and a
bunch of random checks.  This drops the time in HandleIdentifier
from 3.52ms to .98ms on cocoa.h on my machine.

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

15 years agosilence a couple unused variable 'result' warnings.
Chris Lattner [Wed, 21 Jan 2009 07:35:26 +0000 (07:35 +0000)]
silence a couple unused variable 'result' warnings.

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

15 years agoDon't crash on empty PTH files. This fixes <rdar://problem/6512714>.
Ted Kremenek [Wed, 21 Jan 2009 07:34:28 +0000 (07:34 +0000)]
Don't crash on empty PTH files.  This fixes <rdar://problem/6512714>.

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

15 years agoreally we only need on Read24!
Chris Lattner [Wed, 21 Jan 2009 07:28:57 +0000 (07:28 +0000)]
really we only need on Read24!

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

15 years agorevert my previous patch, it assumed endianness.
Chris Lattner [Wed, 21 Jan 2009 07:21:56 +0000 (07:21 +0000)]
revert my previous patch, it assumed endianness.

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

15 years agoThis test now passes using -analyzer-store-region.
Ted Kremenek [Wed, 21 Jan 2009 07:13:46 +0000 (07:13 +0000)]
This test now passes using -analyzer-store-region.

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

15 years agoThis test now passes using -analyzer-store-region.
Ted Kremenek [Wed, 21 Jan 2009 07:10:01 +0000 (07:10 +0000)]
This test now passes using -analyzer-store-region.

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

15 years agominor cleanups: now that tokens are 4-byte aligned in a PTH
Chris Lattner [Wed, 21 Jan 2009 07:06:08 +0000 (07:06 +0000)]
minor cleanups: now that tokens are 4-byte aligned in a PTH
file, just load them directly as ints.

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

15 years agoGet RegionStore to work with the retain/release checker and its test cases.
Ted Kremenek [Wed, 21 Jan 2009 06:57:53 +0000 (06:57 +0000)]
Get RegionStore to work with the retain/release checker and its test cases.

Because the RegionStore can reason about values beyond the reasoning power of BasicStore, this patch splits some of the test cases for the retain/release checker to have versions that are handled by RegionStore (more warnings) and BasicStore (less warnings).

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

15 years agoFix an inline asm sema bug that I introduced.
Anders Carlsson [Wed, 21 Jan 2009 06:27:20 +0000 (06:27 +0000)]
Fix an inline asm sema bug that I introduced.

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

15 years agoDon't look up decls with no name (such as parameters and unnamed tagged types),
Chris Lattner [Wed, 21 Jan 2009 02:38:50 +0000 (02:38 +0000)]
Don't look up decls with no name (such as parameters and unnamed tagged types),
this removes 4266 calls to LookupDecl.

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

15 years agoccc: Implement file & path searching.
Daniel Dunbar [Wed, 21 Jan 2009 02:03:52 +0000 (02:03 +0000)]
ccc: Implement file & path searching.
 - Toolchain is responsible for providing list of prefixes to search.

 - Implement -print-file-name=xxx and -print-prog-name=xxx driver options.

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

15 years agoFix more bugs I discovered
Anders Carlsson [Wed, 21 Jan 2009 01:49:39 +0000 (01:49 +0000)]
Fix more bugs I discovered

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

15 years agoUpdated checker build.
Ted Kremenek [Wed, 21 Jan 2009 01:41:30 +0000 (01:41 +0000)]
Updated checker build.

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

15 years agoccc: Add --analyze test case.
Daniel Dunbar [Wed, 21 Jan 2009 01:22:37 +0000 (01:22 +0000)]
ccc: Add --analyze test case.

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

15 years agoccc: Add --analyze driver mode (for running static analyzer).
Daniel Dunbar [Wed, 21 Jan 2009 01:07:49 +0000 (01:07 +0000)]
ccc: Add --analyze driver mode (for running static analyzer).

 - For now forces generation of plist files, need to think about the
   right interface.

 - Changed -fsyntax-only mode to be its own phase (more consistent).

 - Add -WA, for passing options verbatim to analyzer.

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

15 years agoStatic Analyzer: When generating plists for errors reports, generate one plist file...
Ted Kremenek [Wed, 21 Jan 2009 00:42:24 +0000 (00:42 +0000)]
Static Analyzer: When generating plists for errors reports, generate one plist file per translation unit that contains all of the diagnostics.

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

15 years agoCommented objective-c's metadata types. Minor clean up.
Fariborz Jahanian [Wed, 21 Jan 2009 00:39:53 +0000 (00:39 +0000)]
Commented objective-c's metadata types. Minor clean up.
No change in functionality.

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

15 years agoConvert expressions over to Sebastian's spiffy ASTContext::new() operator.
Steve Naroff [Wed, 21 Jan 2009 00:14:39 +0000 (00:14 +0000)]
Convert expressions over to Sebastian's spiffy ASTContext::new() operator.
No functionality change.

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

15 years agoccc: Unbreak -pipe handling broken in previous refactoring.
Daniel Dunbar [Wed, 21 Jan 2009 00:05:15 +0000 (00:05 +0000)]
ccc: Unbreak -pipe handling broken in previous refactoring.

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

15 years agoFix: <rdar://problem/6510344> [pth] PTH slows down regular lexer considerably (when...
Ted Kremenek [Tue, 20 Jan 2009 23:28:34 +0000 (23:28 +0000)]
Fix: <rdar://problem/6510344> [pth] PTH slows down regular lexer considerably (when it has substantial work)

Changes to IdentifierTable:
- High-level summary: StringMap never owns IdentifierInfos.  It just
references them.
- The string map now has StringMapEntry<IdentifierInfo*> instead of
  StringMapEntry<IdentifierInfo>.  The IdentifierInfo object is
  allocated using the same bump pointer allocator as used by the
  StringMap.

Changes to IdentifierInfo:
- Added an extra pointer to point to the
  StringMapEntry<IdentifierInfo*> in the string map.  This pointer
  will be null if the IdentifierInfo* is *only* used by the PTHLexer
  (that is it isn't in the StringMap).

Algorithmic changes:
- Non-PTH case:
   IdentifierInfo::get() will always consult the StringMap first to
   see if we have an IdentifierInfo object.  If that StringMapEntry
   references a null pointer, we allocate a new one from the BumpPtrAllocator
   and update the reference in the StringMapEntry.
- PTH case:
   We do the same lookup as with the non-PTH case, but if we don't get
   a hit in the StringMap we do a secondary lookup in the PTHManager for
   the IdentifierInfo.  If we don't find an IdentifierInfo we create a
   new one as in the non-PTH case.  If we do find and IdentifierInfo
   in the PTHManager, we update the StringMapEntry to refer to it so
   that the IdentifierInfo will be found on the next StringMap lookup.
   This way we only do a binary search in the PTH file at most once
   for a given IdentifierInfo.  This greatly speeds things up for source
   files containing a non-trivial amount of code.

Performance impact:
   While these changes do add some extra indirection in
   IdentifierTable to access an IdentifierInfo*, I saw speedups even
   in the non-PTH case as well.

   Non-PTH: For -fsyntax-only on Cocoa.h, we see a 6% speedup.
   PTH (with Cocoa.h in token cache): 11% speedup.

   I also did an experiment where we did -fsyntax-only on a source file
   including a large header and Cocoa.h, but the token cache did not
   contain the larger header.  For this file, we were seeing a performance
   *regression* when using PTH of 3% over non-PTH.  Now we are seeing
   a performance improvement of 9%!

Tests:
   The serialization tests are now failing.  I looked at this extensively,
   and I my belief is that this change is unmasking a bug rather than
   introducing a new one.  I have disabled the serialization tests for now.

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

15 years agoAdd -analyze action to run static analyzer, instead of inferring from
Daniel Dunbar [Tue, 20 Jan 2009 23:17:32 +0000 (23:17 +0000)]
Add -analyze action to run static analyzer, instead of inferring from
individual checker options.

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

15 years agoProvide a placement new taking an ASTContext argument.
Sebastian Redl [Tue, 20 Jan 2009 22:23:13 +0000 (22:23 +0000)]
Provide a placement new taking an ASTContext argument.
This allows more concise syntax when allocating an object using the ASTContext's allocator.
Convert a few allocations to this operator to for test purposes.

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

15 years agoFix ccclib building when building in a separate build tree.
Mike Stump [Tue, 20 Jan 2009 21:54:36 +0000 (21:54 +0000)]
Fix ccclib building when building in a separate build tree.

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

15 years agoFix some errors I noticed
Anders Carlsson [Tue, 20 Jan 2009 21:51:44 +0000 (21:51 +0000)]
Fix some errors I noticed

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

15 years agoccc: Allow downstream tools to be aware of final output name.
Daniel Dunbar [Tue, 20 Jan 2009 21:29:14 +0000 (21:29 +0000)]
ccc: Allow downstream tools to be aware of final output name.
 - This is a hack to allow the Darwin linker to get -final_output when
   doing universal builds; the mechanism should be generalized.

 - Handle multiple redundant -arch arguments correctly.

 - Forward -arch_multiple and -final_output to gcc when necessary.

 - Simplified implementation of derived gcc tools.

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

15 years agoFix make test when configuring for a seperate build directory.
Mike Stump [Tue, 20 Jan 2009 21:10:41 +0000 (21:10 +0000)]
Fix make test when configuring for a seperate build directory.

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

15 years agoFix a crash Anders' was seeing due to free'ing an invalid pointer
Chris Lattner [Tue, 20 Jan 2009 21:06:38 +0000 (21:06 +0000)]
Fix a crash Anders' was seeing due to free'ing an invalid pointer
caused by my previous commit.

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

15 years agoConvert more exprs to use ASTContext's Allocator.
Steve Naroff [Tue, 20 Jan 2009 21:06:31 +0000 (21:06 +0000)]
Convert more exprs to use ASTContext's Allocator.

When using a BumpPtrAllocator, this reduces malloc overhead from 2.2->1.9% (for Cocoa.h).

At this point, malloc() has dropped the fourth most expensive routine (behind Preprocessor::HandleIdentifier()).

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

15 years agoUse the ASTContext's allocator for FunctionTypeNoProto and TypeOfExpr
Douglas Gregor [Tue, 20 Jan 2009 21:02:13 +0000 (21:02 +0000)]
Use the ASTContext's allocator for FunctionTypeNoProto and TypeOfExpr

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

15 years agoImprovements to Sema of asm statements. Fixes <rdar://problem/6156893>
Anders Carlsson [Tue, 20 Jan 2009 20:49:22 +0000 (20:49 +0000)]
Improvements to Sema of asm statements. Fixes <rdar://problem/6156893>

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

15 years agoDetailed documentation for encoding of properties and a test
Fariborz Jahanian [Tue, 20 Jan 2009 20:04:12 +0000 (20:04 +0000)]
Detailed documentation for encoding of properties and a test
case.

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

15 years agoAllocate expresssions through ASTContext (still more work to do).
Steve Naroff [Tue, 20 Jan 2009 19:53:53 +0000 (19:53 +0000)]
Allocate expresssions through ASTContext (still more work to do).
Add debug hook to DeclContext.

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

15 years agoImproving on encoding of objective-c's property types. More to come.
Fariborz Jahanian [Tue, 20 Jan 2009 19:14:18 +0000 (19:14 +0000)]
Improving on encoding of objective-c's property types. More to come.

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

15 years agoOptimize Declarator to avoid malloc/free traffic for the argument list of a
Chris Lattner [Tue, 20 Jan 2009 19:11:22 +0000 (19:11 +0000)]
Optimize Declarator to avoid malloc/free traffic for the argument list of a
function DeclaratorChunk in common cases.  This uses a fixed array in
Declarator when it is small enough for the first function declarator chunk
in a declarator.

This eliminates all malloc/free traffic from DeclaratorChunk::getFunction
when running on Cocoa.h except for five functions: signal/bsd_signal/sigset,
which have multiple Function DeclChunk's, and
CFUUIDCreateWithBytes/CFUUIDGetConstantUUIDWithBytes, which take more than
16 arguments.

This patch was pair programmed with Steve.

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

15 years agoPixel font sizes are evil.
Eli Friedman [Tue, 20 Jan 2009 17:56:18 +0000 (17:56 +0000)]
Pixel font sizes are evil.

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

15 years agoSlight cleanup, and fix for va_arg on architectures where va_list is a
Eli Friedman [Tue, 20 Jan 2009 17:46:04 +0000 (17:46 +0000)]
Slight cleanup, and fix for va_arg on architectures where va_list is a
struct.

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

15 years agoDo codegen correctly for va_start/end/copy on architectures where
Eli Friedman [Tue, 20 Jan 2009 17:25:25 +0000 (17:25 +0000)]
Do codegen correctly for va_start/end/copy on architectures where
va_list is a struct, like x86-64.

If anyone has a better idea for how to do the check in the if
statements, suggestions are welcome.

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

15 years agoRename DeclContext::insert to DeclContext::makeDeclVisibleInContext and document...
Douglas Gregor [Tue, 20 Jan 2009 16:54:50 +0000 (16:54 +0000)]
Rename DeclContext::insert to DeclContext::makeDeclVisibleInContext and document both it and DeclContext::addDecl properly

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

15 years agoFix for PR3350: add special-casing for "references" to va_lists in
Eli Friedman [Tue, 20 Jan 2009 07:46:22 +0000 (07:46 +0000)]
Fix for PR3350: add special-casing for "references" to va_lists in
builtins.

Also, a minor tweak to va_copy for consistency.

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

15 years agoccc: Darwin/x86: Teach compile tool how to build .pch files. xcc is
Daniel Dunbar [Tue, 20 Jan 2009 05:51:52 +0000 (05:51 +0000)]
ccc: Darwin/x86: Teach compile tool how to build .pch files. xcc is
now fully independent of the gcc driver when targetting Darwin/x86.

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

15 years agoccc: PCH generation doesn't strip the path when generating a derived
Daniel Dunbar [Tue, 20 Jan 2009 05:49:32 +0000 (05:49 +0000)]
ccc: PCH generation doesn't strip the path when generating a derived
filename from the input path.

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

15 years agoRemove the TopLevelDecls from TranslationUnit, since all of those decls are owned...
Douglas Gregor [Tue, 20 Jan 2009 04:25:11 +0000 (04:25 +0000)]
Remove the TopLevelDecls from TranslationUnit, since all of those decls are owned by the ASTContext's TranslationUnitDecl. There are definitely some leaking Decls now that I'll tackle tomorrow

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

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