]> granicus.if.org Git - clang/log
clang
14 years agoRename CodeModificationHint to FixItHint, since we've been using the
Douglas Gregor [Wed, 31 Mar 2010 15:31:50 +0000 (15:31 +0000)]
Rename CodeModificationHint to FixItHint, since we've been using the
term "fix-it" everywhere and even *I* get tired of long names
sometimes. No functionality change.

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

14 years agoMinor include pruning.
Benjamin Kramer [Wed, 31 Mar 2010 15:04:05 +0000 (15:04 +0000)]
Minor include pruning.

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

14 years agoDefine "exploded graph" by reference to a paper.
Jeffrey Yasskin [Wed, 31 Mar 2010 05:26:20 +0000 (05:26 +0000)]
Define "exploded graph" by reference to a paper.

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

14 years agouse the new optimized debug info metadata accessors. In
Chris Lattner [Wed, 31 Mar 2010 03:36:01 +0000 (03:36 +0000)]
use the new optimized debug info metadata accessors.  In
addition to the inherent win, this eliminates the pointless
cost of going through the name -> mdkind stringmap that we
were paying.

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

14 years agoSupport __attribute__((unused)) on types. This suddenly started firing
John McCall [Wed, 31 Mar 2010 02:47:45 +0000 (02:47 +0000)]
Support __attribute__((unused)) on types.  This suddenly started firing
a lot for me on selfhosts, I dunno why.

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

14 years agoFix PR6327: restore invariants when there's a parse error in an initializer.
John McCall [Wed, 31 Mar 2010 02:13:20 +0000 (02:13 +0000)]
Fix PR6327:  restore invariants when there's a parse error in an initializer.

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

14 years agoRegularize support for naming conversion functions in using decls.
John McCall [Wed, 31 Mar 2010 01:36:47 +0000 (01:36 +0000)]
Regularize support for naming conversion functions in using decls.

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

14 years agoIRGen: Move the auxiliary data structures tracking AST -> LLVM mappings out of CodeGe...
Daniel Dunbar [Wed, 31 Mar 2010 01:09:11 +0000 (01:09 +0000)]
IRGen: Move the auxiliary data structures tracking AST -> LLVM mappings out of CodeGenTypes, to per-record CGRecordLayout structures.
 - I did a cursory check that this was perf neutral, FWIW.

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

14 years agoCGRecordLayoutBuilder: Switch unions to use same mechanism for tracking field and...
Daniel Dunbar [Wed, 31 Mar 2010 00:55:13 +0000 (00:55 +0000)]
CGRecordLayoutBuilder: Switch unions to use same mechanism for tracking field and bit-field info as structs.
 - Anders, please check.

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

14 years agoAdd a few asserts to be on the safe side.
Argyrios Kyrtzidis [Wed, 31 Mar 2010 00:38:09 +0000 (00:38 +0000)]
Add a few asserts to be on the safe side.

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

14 years agoDon't skip past the '}' if an expression has error and is not followed by ';'.
Argyrios Kyrtzidis [Wed, 31 Mar 2010 00:37:59 +0000 (00:37 +0000)]
Don't skip past the '}' if an expression has error and is not followed by ';'.

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

14 years agoDrastically simplify the computation of linkage for typeinfo by using
Douglas Gregor [Wed, 31 Mar 2010 00:15:35 +0000 (00:15 +0000)]
Drastically simplify the computation of linkage for typeinfo by using
the existing (and already well-tested) linkage computation for types,
with minor tweaks for dynamic classes and (pointers to) incomplete
types. Fixes PR6597.

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

14 years agoIRGen: Hide CGRecordLayoutBuilder class, because I can.
Daniel Dunbar [Wed, 31 Mar 2010 00:11:27 +0000 (00:11 +0000)]
IRGen: Hide CGRecordLayoutBuilder class, because I can.

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

14 years agoRemove silly temporary comment.
John McCall [Tue, 30 Mar 2010 23:58:36 +0000 (23:58 +0000)]
Remove silly temporary comment.

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

14 years agoIntroduce a new kind of derived-to-base cast which bypasses the need for
John McCall [Tue, 30 Mar 2010 23:58:03 +0000 (23:58 +0000)]
Introduce a new kind of derived-to-base cast which bypasses the need for
null checks, and make sure we elide null checks when accessing base class
members.

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

14 years agoSlightly relax test case. An upcoming LLVM commit will change the xor instruction.
Jakob Stoklund Olesen [Tue, 30 Mar 2010 23:57:49 +0000 (23:57 +0000)]
Slightly relax test case. An upcoming LLVM commit will change the xor instruction.

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

14 years agoFix test in -Asserts build.
Daniel Dunbar [Tue, 30 Mar 2010 23:50:00 +0000 (23:50 +0000)]
Fix test in -Asserts build.

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

14 years agoRecognize __attribute__((NSObject)) directly applied
Fariborz Jahanian [Tue, 30 Mar 2010 22:40:11 +0000 (22:40 +0000)]
Recognize __attribute__((NSObject)) directly applied
on retain properties. (radar 7809468).

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

14 years agoRevert Mon Ping's 99930 due to broken llvm-gcc buildbots.
Bob Wilson [Tue, 30 Mar 2010 22:28:46 +0000 (22:28 +0000)]
Revert Mon Ping's 99930 due to broken llvm-gcc buildbots.

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

14 years agoFormatting tweaks.
Daniel Dunbar [Tue, 30 Mar 2010 22:26:15 +0000 (22:26 +0000)]
Formatting tweaks.

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

14 years agoIRGen: Narrow getCGRecordLayout type.
Daniel Dunbar [Tue, 30 Mar 2010 22:26:12 +0000 (22:26 +0000)]
IRGen: Narrow getCGRecordLayout type.

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

14 years agoIRgen: Move CGRecordLayout to its own happy little file.
Daniel Dunbar [Tue, 30 Mar 2010 22:26:10 +0000 (22:26 +0000)]
IRgen: Move CGRecordLayout to its own happy little file.

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

14 years agoMinor formatting/FIXME cleanups.
Daniel Dunbar [Tue, 30 Mar 2010 22:26:07 +0000 (22:26 +0000)]
Minor formatting/FIXME cleanups.

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

14 years agoFix an oversight with access control for address-of-function.
John McCall [Tue, 30 Mar 2010 22:20:00 +0000 (22:20 +0000)]
Fix an oversight with access control for address-of-function.

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

14 years agoRemember the regparm attribute in FunctionType::ExtInfo.
Rafael Espindola [Tue, 30 Mar 2010 22:15:11 +0000 (22:15 +0000)]
Remember the regparm attribute in FunctionType::ExtInfo.
Fixes PR3782.

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

14 years agoWhen "delayed parsing" C++ default arguments, if there is an error, there may be...
Argyrios Kyrtzidis [Tue, 30 Mar 2010 22:14:32 +0000 (22:14 +0000)]
When "delayed parsing" C++ default arguments, if there is an error, there may be tokens left in the token stream
that will interfere (they will be parsed as if they are after the class' '}') and a crash will occur because
the CachedTokens that holds them will be deleted while the lexer is still using them.

Make sure that the tokens of default args are removed from the token stream.
Fixes PR6647.

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

14 years agoAdd a test for C++ [stmt.select]p3, which specifies that redeclaring a
Douglas Gregor [Tue, 30 Mar 2010 22:07:46 +0000 (22:07 +0000)]
Add a test for C++ [stmt.select]p3, which specifies that redeclaring a
name in the outermost block of a if/else that declares the same name
is ill-formed. Turns out that Clang and MSVC were right about PR6739;
GCC is too lax.

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

14 years agoPropagate the "found declaration" (i.e. the using declaration instead of
John McCall [Tue, 30 Mar 2010 21:47:33 +0000 (21:47 +0000)]
Propagate the "found declaration" (i.e. the using declaration instead of
the underlying/instantiated decl) through a lot of API, including "intermediate"
MemberExprs required for (e.g.) template instantiation.  This is necessary
because of the access semantics of member accesses to using declarations:
only the base class *containing the using decl* need be accessible from the
naming class.

This allows us to complete an access-controlled selfhost, if there are no
recent regressions.

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

14 years agoFix this test on windows. When running on windows we print
Rafael Espindola [Tue, 30 Mar 2010 21:19:02 +0000 (21:19 +0000)]
Fix this test on windows. When running on windows we print
double 0.000000e+000
instead of
double 0.000000e+00

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

14 years agoAdded support for address spaces and added a isVolatile field to memcpy, memmove...
Mon P Wang [Tue, 30 Mar 2010 21:02:45 +0000 (21:02 +0000)]
Added support for address spaces and added a isVolatile field to memcpy, memmove, and memset

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

14 years agoImprove diagnostics when printing a template instantiation backtrace
Douglas Gregor [Tue, 30 Mar 2010 20:35:20 +0000 (20:35 +0000)]
Improve diagnostics when printing a template instantiation backtrace
involving substitution of deduced template arguments into a class
template partial specialization or function template, or when
substituting explicitly-specific template arguments into a function
template. We now print the actual deduced argument bindings so the
user can see what got deduced.

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

14 years agoRegionStore: specially handle loads from integer global variables declared 'const'.
Ted Kremenek [Tue, 30 Mar 2010 20:31:04 +0000 (20:31 +0000)]
RegionStore: specially handle loads from integer global variables declared 'const'.
Fixes a false positive reported in PR 6288.

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

14 years agoUse 'const Optional<SVal>&' to avoid an extra copy.
Ted Kremenek [Tue, 30 Mar 2010 20:30:52 +0000 (20:30 +0000)]
Use 'const Optional<SVal>&' to avoid an extra copy.

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

14 years agothe big refactoring bits of PR3782.
Rafael Espindola [Tue, 30 Mar 2010 20:24:48 +0000 (20:24 +0000)]
the big refactoring bits of PR3782.

This introduces FunctionType::ExtInfo to hold the calling convention and the
noreturn attribute. The next patch will extend it to include the regparm
attribute and fix the bug.

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

14 years agoIntroduce new AST statistics that keep track of the number of isa (or
Douglas Gregor [Tue, 30 Mar 2010 18:56:13 +0000 (18:56 +0000)]
Introduce new AST statistics that keep track of the number of isa (or
dyn_cast) invocations for C++ and Objective-C types, declarations,
expressions, and statements. The statistics will be printed when
-print-stats is provided to Clang -cc1, with results such as:

277073 clang - Number of checks for C++ declaration nodes
 13311 clang - Number of checks for C++ expression nodes
    18 clang - Number of checks for C++ statement nodes
174182 clang - Number of checks for C++ type nodes
 92300 clang - Number of checks for Objective-C declaration nodes
  9800 clang - Number of checks for Objective-C expression nodes
     7 clang - Number of checks for Objective-C statement nodes
 65733 clang - Number of checks for Objective-C type nodes

The statistics are only gathered when NDEBUG is not defined, since
they introduce potentially-expensive operations into very low-level
routines (isa).

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

14 years agoChange the analyzer to recognize (but ignore) assignments to isa. Fixes PR 6302.
Ted Kremenek [Tue, 30 Mar 2010 18:24:54 +0000 (18:24 +0000)]
Change the analyzer to recognize (but ignore) assignments to isa.  Fixes PR 6302.

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

14 years agoAdd Support for 'warn_unused_result" attribute on
Fariborz Jahanian [Tue, 30 Mar 2010 18:22:15 +0000 (18:22 +0000)]
Add Support for 'warn_unused_result" attribute on
objective-c methods. (radar 7418262).

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

14 years agoDon't produce a vtable if we are just instantiating a method and the
Rafael Espindola [Tue, 30 Mar 2010 18:07:27 +0000 (18:07 +0000)]
Don't produce a vtable if we are just instantiating a method and the
class has no key function.

Fix PR6738.

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

14 years agoFix FileEntry declaration.
Daniel Dunbar [Tue, 30 Mar 2010 17:57:47 +0000 (17:57 +0000)]
Fix FileEntry declaration.

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

14 years agoTeach Clang's -cc1 option -print-stats to print LLVM statistics.
Douglas Gregor [Tue, 30 Mar 2010 17:33:59 +0000 (17:33 +0000)]
Teach Clang's -cc1 option -print-stats to print LLVM statistics.

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

14 years agoFix a bug where we would incorrectly report an error about initializing two fields...
Anders Carlsson [Tue, 30 Mar 2010 16:19:37 +0000 (16:19 +0000)]
Fix a bug where we would incorrectly report an error about initializing two fields in an anonymous struct.

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

14 years agoReduce nesting.
Anders Carlsson [Tue, 30 Mar 2010 15:39:27 +0000 (15:39 +0000)]
Reduce nesting.

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

14 years agoReplace some constant-sized SmallVectors.
Benjamin Kramer [Tue, 30 Mar 2010 11:36:44 +0000 (11:36 +0000)]
Replace some constant-sized SmallVectors.

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

14 years agomake -ftime-report work even in -disable-free mode. Woo, finally.
Chris Lattner [Tue, 30 Mar 2010 05:39:52 +0000 (05:39 +0000)]
make -ftime-report work even in -disable-free mode.  Woo, finally.

rdar://7781603

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

14 years agoRemove the old vtable layout code.
Anders Carlsson [Tue, 30 Mar 2010 03:43:47 +0000 (03:43 +0000)]
Remove the old vtable layout code.

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

14 years agoRemove UseNewVTableCode checks.
Anders Carlsson [Tue, 30 Mar 2010 03:35:35 +0000 (03:35 +0000)]
Remove UseNewVTableCode checks.

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

14 years agoUse the new function in EmitClassAggrMemberwiseCopy, fixing the same assert as seen...
Anders Carlsson [Tue, 30 Mar 2010 03:30:08 +0000 (03:30 +0000)]
Use the new function in EmitClassAggrMemberwiseCopy, fixing the same assert as seen in PR6628 but for arrays this time.

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

14 years agoFactor emitting a call to a copy constructor out into a separate function.
Anders Carlsson [Tue, 30 Mar 2010 03:27:09 +0000 (03:27 +0000)]
Factor emitting a call to a copy constructor out into a separate function.

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

14 years agoIntroduce a CXXTemporariesCleanupScope RAII object and use it to cleanup the temporar...
Anders Carlsson [Tue, 30 Mar 2010 03:14:41 +0000 (03:14 +0000)]
Introduce a CXXTemporariesCleanupScope RAII object and use it to cleanup the temporaries code.

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

14 years agoHandle default arguments when calling copy constructors for bases or members when...
Anders Carlsson [Tue, 30 Mar 2010 02:57:48 +0000 (02:57 +0000)]
Handle default arguments when calling copy constructors for bases or members when synthesizing a copy constructor. Fixes PR6628.

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

14 years agoChange a test to FileCheck bitcode instead of assembler.
Anders Carlsson [Tue, 30 Mar 2010 02:53:30 +0000 (02:53 +0000)]
Change a test to FileCheck bitcode instead of assembler.

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

14 years agoFlip the switch and use the new vtable layout code for everything. I've verified...
Anders Carlsson [Tue, 30 Mar 2010 02:21:54 +0000 (02:21 +0000)]
Flip the switch and use the new vtable layout code for everything. I've verified that this passes a self-host but I'll let the bots self host as well before removing the now dead code.

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

14 years agoUpdate xcode project
Anders Carlsson [Tue, 30 Mar 2010 02:08:20 +0000 (02:08 +0000)]
Update xcode project

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

14 years agoCache results computed by CGDebugInfo::getOrCreateFile() in a DenseMap.
Ted Kremenek [Tue, 30 Mar 2010 00:27:51 +0000 (00:27 +0000)]
Cache results computed by CGDebugInfo::getOrCreateFile() in a DenseMap.
This reduces '-c -g' time on one file in 403.gcc by 12%.

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

14 years agoWhen copying a partial diagnostic into a DependentDiagnostic, allocate
Douglas Gregor [Mon, 29 Mar 2010 23:56:53 +0000 (23:56 +0000)]
When copying a partial diagnostic into a DependentDiagnostic, allocate
storage for that partial diagnostic via the ASTContext's
BumpPtrAllocator rather than using up slots in the ASTContext's
cache. Now that we do this, we don't have to worry about destroying
dependent diagnostics when destroying a DependentStoredDeclsMap.

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

14 years agoOptimize PartialDiagnostic's memory-allocation behavior by placing a
Douglas Gregor [Mon, 29 Mar 2010 23:34:08 +0000 (23:34 +0000)]
Optimize PartialDiagnostic's memory-allocation behavior by placing a
cache of PartialDiagnostic::Storage objects into an allocator within
the ASTContext. This eliminates a significant amount of malloc
traffic, for a 10% performance improvement in -fsyntax-only wall-clock
time with 403.gcc's combine.c.

Also, eliminate the RequireNonAbstractType hack I put in earlier,
which was but a symptom of this larger problem.

Fixes <rdar://problem/7806091>.

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

14 years agoprovide a simpler way to get to the headers
Gabor Greif [Mon, 29 Mar 2010 21:36:06 +0000 (21:36 +0000)]
provide a simpler way to get to the headers

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

14 years agoExit early from the simple form of Sema::RequireNonAbstractType(), for
Douglas Gregor [Mon, 29 Mar 2010 20:28:52 +0000 (20:28 +0000)]
Exit early from the simple form of Sema::RequireNonAbstractType(), for
a 2.47% speedup in 403.gcc.

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

14 years agoWhen collecting virtual bases it's very important to use the canonical type of the...
Anders Carlsson [Mon, 29 Mar 2010 19:49:09 +0000 (19:49 +0000)]
When collecting virtual bases it's very important to use the canonical type of the base class. Otherwise, we might add the same virtual base class twice if the virtual base is an instantiated template. Fixes PR6251.

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

14 years agoRemove FIXME comment.
Ted Kremenek [Mon, 29 Mar 2010 19:10:41 +0000 (19:10 +0000)]
Remove FIXME comment.

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

14 years agoChange 'TypeCache' from being an std::map to a llvm::DenseMap. This reduces codegen...
Ted Kremenek [Mon, 29 Mar 2010 18:29:57 +0000 (18:29 +0000)]
Change 'TypeCache' from being an std::map to a llvm::DenseMap.  This reduces codegen time
on one .i file from 403.gcc by 0.5%.

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

14 years agoadd support for -MQ flag to quote targets in dependency file,
Chris Lattner [Mon, 29 Mar 2010 17:55:58 +0000 (17:55 +0000)]
add support for -MQ flag to quote targets in dependency file,
PR6661, patch by Ori Avtalion!

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

14 years agoemit signed integer subtractions as 'sub nsw', patch by
Chris Lattner [Mon, 29 Mar 2010 17:28:16 +0000 (17:28 +0000)]
emit signed integer subtractions as 'sub nsw', patch by
Anton Yartsev!

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

14 years agoAnother vtable layout fix, making us match gcc better.
Anders Carlsson [Mon, 29 Mar 2010 15:08:41 +0000 (15:08 +0000)]
Another vtable layout fix, making us match gcc better.

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

14 years agoSupport __attribute__((packed)) (along with other attributes) at the
Douglas Gregor [Mon, 29 Mar 2010 14:42:08 +0000 (14:42 +0000)]
Support __attribute__((packed)) (along with other attributes) at the
end of a struct/class/union in C++, from Justin Bogner!

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

14 years agoHandle pure virtual member functions.
Anders Carlsson [Mon, 29 Mar 2010 05:40:50 +0000 (05:40 +0000)]
Handle pure virtual member functions.

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

14 years agoFix a nasty bug in the virtual base computation which would lead to us initializing...
Anders Carlsson [Mon, 29 Mar 2010 05:13:12 +0000 (05:13 +0000)]
Fix a nasty bug in the virtual base computation which would lead to us initializing virtual bases in the wrong order.

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

14 years agoBe a bit more consistent in using operator->
Rafael Espindola [Mon, 29 Mar 2010 03:39:46 +0000 (03:39 +0000)]
Be a bit more consistent in using operator->

This patch moves some methods from QualType to Type and changes the users to
use -> instead of .

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

14 years agoMore vtable work - it's not possible to use the new vtable code for everything by...
Anders Carlsson [Mon, 29 Mar 2010 03:38:52 +0000 (03:38 +0000)]
More vtable work - it's not possible to use the new vtable code for everything by setting a flag inside CGVtable.cpp. My plan is to run some tests and bootstrap and once that's done flip the bit.

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

14 years agoMore magic.
Anders Carlsson [Mon, 29 Mar 2010 03:26:49 +0000 (03:26 +0000)]
More magic.

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

14 years agoSprinkle some sed dust over check-ztt to make it work with newer clang asm output...
Anders Carlsson [Mon, 29 Mar 2010 03:21:40 +0000 (03:21 +0000)]
Sprinkle some sed dust over check-ztt to make it work with newer clang asm output. (I am not a sed expert so this might be terribly inefficient :)

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

14 years agoOnly add thunks for the most derived class. This fixes some link errors I was seeing...
Anders Carlsson [Mon, 29 Mar 2010 02:53:58 +0000 (02:53 +0000)]
Only add thunks for the most derived class. This fixes some link errors I was seeing in files generated by the vtable tester utility.

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

14 years agoFlip the switch to always get vtables from the VTT when necessary, I've verified...
Anders Carlsson [Mon, 29 Mar 2010 02:38:51 +0000 (02:38 +0000)]
Flip the switch to always get vtables from the VTT when necessary, I've verified that clang bootstraps with this.

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

14 years agoUse the newly added function in the VTT builder.
Anders Carlsson [Mon, 29 Mar 2010 02:14:35 +0000 (02:14 +0000)]
Use the newly added function in the VTT builder.

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

14 years agoCleanup, no functionality change.
Anders Carlsson [Mon, 29 Mar 2010 02:08:26 +0000 (02:08 +0000)]
Cleanup, no functionality change.

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

14 years agoAdd the thunks needed by this vtable.
Anders Carlsson [Mon, 29 Mar 2010 01:38:05 +0000 (01:38 +0000)]
Add the thunks needed by this vtable.

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

14 years agoMake sure to sort the vtable thunks by their vtable index :) With this we now pass...
Anders Carlsson [Mon, 29 Mar 2010 01:28:05 +0000 (01:28 +0000)]
Make sure to sort the vtable thunks by their vtable index :) With this we now pass the test from http://www.codesourcery.com/public/cxx-abi/abi-examples.html#vtable-ctor successfully.

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

14 years agoFix another thinko, so that flags don't depend on previous bases.
Anders Carlsson [Mon, 29 Mar 2010 01:16:41 +0000 (01:16 +0000)]
Fix another thinko, so that flags don't depend on previous bases.

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

14 years agoWhen generating base ctors/dtors, we need to lookup virtual bases using the vtable.
Anders Carlsson [Mon, 29 Mar 2010 01:14:25 +0000 (01:14 +0000)]
When generating base ctors/dtors, we need to lookup virtual bases using the vtable.

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

14 years agoFix thinko.
Anders Carlsson [Mon, 29 Mar 2010 01:12:13 +0000 (01:12 +0000)]
Fix thinko.

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

14 years agoUse construction vtables when needed. This is currently guarded by -fdump-vtable...
Anders Carlsson [Mon, 29 Mar 2010 01:08:49 +0000 (01:08 +0000)]
Use construction vtables when needed. This is currently guarded by -fdump-vtable-layouts since it doesn't work 100% yet :)

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

14 years agoTwo bug fixes, we weren't updating the thunk index when creating the vtable initializ...
Anders Carlsson [Mon, 29 Mar 2010 01:04:16 +0000 (01:04 +0000)]
Two bug fixes, we weren't updating the thunk index when creating the vtable initializer and we weren't storing the secondary virtual pointer indices.

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

14 years agoMake default arguments to getFunctionNoProtoType an all or nothing option (as they...
Rafael Espindola [Sun, 28 Mar 2010 22:48:23 +0000 (22:48 +0000)]
Make default arguments to getFunctionNoProtoType an all or nothing option (as they already are in practise).

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

14 years agoDrop default arguments no one is using.
Rafael Espindola [Sun, 28 Mar 2010 22:19:17 +0000 (22:19 +0000)]
Drop default arguments no one is using.

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

14 years agoReapply r99775 with a fix for a silly bug - we were setting the vtable pointer for...
Anders Carlsson [Sun, 28 Mar 2010 21:07:49 +0000 (21:07 +0000)]
Reapply r99775 with a fix for a silly bug - we were setting the vtable pointer for all bases, even those without a vtable pointer :)

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

14 years agoLooks like I broke self-host again :(.
Anders Carlsson [Sun, 28 Mar 2010 20:55:21 +0000 (20:55 +0000)]
Looks like I broke self-host again :(.

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

14 years agoMore improvements to setting the vtable pointer. We now no longer set the vtable...
Anders Carlsson [Sun, 28 Mar 2010 20:34:31 +0000 (20:34 +0000)]
More improvements to setting the vtable pointer. We now no longer set the vtable pointer for non-virtual primary bases. We also do a pre-order traversal of the class hierarchy; this is necessary in order to get the right vbase offset offsets in base ctors/dtors.

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

14 years agoFactor vtable pointer setting code out into a separate function.
Anders Carlsson [Sun, 28 Mar 2010 19:40:00 +0000 (19:40 +0000)]
Factor vtable pointer setting code out into a separate function.

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

14 years agoAfter performing template argument deduction for a function template,
Douglas Gregor [Sun, 28 Mar 2010 02:42:43 +0000 (02:42 +0000)]
After performing template argument deduction for a function template,
check deduced non-type template arguments and template template
arguments against the template parameters for which they were deduced,
performing conversions as appropriate so that deduced template
arguments get the same treatment as explicitly-specified template
arguments. This is the bulk of PR6723.

Also keep track of whether deduction of a non-type template argument
came from an array bound (vs. anywhere else). With this information,
we enforce C++ [temp.deduct.type]p17, which requires exact type
matches when deduction deduces a non-type template argument from
something that is not an array bound.

Finally, when in a SFINAE context, translate the "zero sized
arrays are an extension" extension diagnostic into a hard error (for
better standard conformance), which was a minor part of PR6723.

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

14 years agoChecker: random include cleanup.
Benjamin Kramer [Sat, 27 Mar 2010 21:19:47 +0000 (21:19 +0000)]
Checker: random include cleanup.

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

14 years agoFurther improvement to point to category
Fariborz Jahanian [Sat, 27 Mar 2010 21:10:05 +0000 (21:10 +0000)]
Further improvement to point to category
whose protocolls methods needs implementation.

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

14 years agoGive thunks the same linkage as their original methods.
Anders Carlsson [Sat, 27 Mar 2010 20:50:27 +0000 (20:50 +0000)]
Give thunks the same linkage as their original methods.

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

14 years agoImprove diagnostics on incomplete implementation
Fariborz Jahanian [Sat, 27 Mar 2010 19:02:17 +0000 (19:02 +0000)]
Improve diagnostics on incomplete implementation
of objc classes; including which methods
need be implemented and where they come from.
WIP.

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

14 years agoRemove VS information for analyzer until we have more real support.
Ted Kremenek [Sat, 27 Mar 2010 16:56:20 +0000 (16:56 +0000)]
Remove VS information for analyzer until we have more real support.

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

14 years agos/Clangify2010.py/clangify2010.py
Kovarththanan Rajaratnam [Sat, 27 Mar 2010 08:21:15 +0000 (08:21 +0000)]
s/Clangify2010.py/clangify2010.py

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

14 years agoAccumulate all functions and classes that the effective context is
John McCall [Sat, 27 Mar 2010 06:55:49 +0000 (06:55 +0000)]
Accumulate all functions and classes that the effective context is
nested within, and suddenly local classes start working.  Wouldn't be
necessary if I hadn't used local classes in Clang in the first place.
Or, well, wouldn't be necessary yet. :)

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

14 years agoImplement method friends in class templates and fix a few related problems.
John McCall [Sat, 27 Mar 2010 05:57:59 +0000 (05:57 +0000)]
Implement method friends in class templates and fix a few related problems.

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

14 years agoTest for the previous commit.
Rafael Espindola [Sat, 27 Mar 2010 02:52:40 +0000 (02:52 +0000)]
Test for the previous commit.

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

14 years agoWhen given the magic class __cxxabiv1::__fundamental_type_info, produce
Rafael Espindola [Sat, 27 Mar 2010 02:52:14 +0000 (02:52 +0000)]
When given the magic class __cxxabiv1::__fundamental_type_info, produce
the typeinfo for the fundamental types.

Fixes PR6685.

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

14 years agoAdd initial draft of web page on 'clangifty2010.py' script for analyzing VS projects.
Ted Kremenek [Sat, 27 Mar 2010 01:06:58 +0000 (01:06 +0000)]
Add initial draft of web page on 'clangifty2010.py' script for analyzing VS projects.

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