]>
granicus.if.org Git - clang/log
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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