]>
granicus.if.org Git - clang/log
Chris Lattner [Mon, 28 Jun 2010 17:12:37 +0000 (17:12 +0000)]
Fix UnitTests/2004-02-02-NegativeZero.c, which regressed when
I broke negate of FP values.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107019
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 28 Jun 2010 17:11:58 +0000 (17:11 +0000)]
fix a silly fixme.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107018
91177308 -0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Mon, 28 Jun 2010 15:56:07 +0000 (15:56 +0000)]
llvm::errs() is non-buffered, so it doesn't need to be flushed.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107012
91177308 -0d34-0410-b5e6-
96231b3b80d8
Craig Silverstein [Mon, 28 Jun 2010 15:37:14 +0000 (15:37 +0000)]
Add support for traversing initializer lists (in constructors), which
we ignoring before. To give access to the names on the initializer,
which aren't a type or an expr or a decl, I've introduced a new
TraverseInitializer. By default, it just traverses on the expr that
the name is being initialized to.
Reviewed by chandlerc. Tested via clang's 'make test'.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107008
91177308 -0d34-0410-b5e6-
96231b3b80d8
Sebastian Redl [Mon, 28 Jun 2010 15:09:07 +0000 (15:09 +0000)]
Introduce Expr::Classify and Expr::ClassifyModifiable, which determine the classification of an expression under the C++0x taxology (value category). Reimplement isLvalue and isModifiableLvalue using these functions. No regressions in the test suite from this, and my rough performance check doesn't show any regressions either.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107007
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Mon, 28 Jun 2010 09:32:03 +0000 (09:32 +0000)]
Support CXXPseudoDestructorExpr for PCH.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106999
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Mon, 28 Jun 2010 09:31:56 +0000 (09:31 +0000)]
Support DependentScopeDeclRefExpr for PCH.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106998
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Mon, 28 Jun 2010 09:31:48 +0000 (09:31 +0000)]
Refactor PCH reading/writing of template arguments passed to expressions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106997
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Mon, 28 Jun 2010 09:31:42 +0000 (09:31 +0000)]
Fix PCH emitting/reading for template arguments that contain expressions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106996
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Mon, 28 Jun 2010 09:31:34 +0000 (09:31 +0000)]
Fix various bugs in recent commits for C++ PCH.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106995
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Mon, 28 Jun 2010 08:39:25 +0000 (08:39 +0000)]
Partial fix for PR7267 based on comments by John McCall on an earlier patch.
This is more targeted, as it simply provides toggle actions for the parser to
turn access checking on and off. We then use these to suppress access checking
only while we parse the template-id (included scope specifier) of an explicit
instantiation and explicit specialization of a class template. The
specialization behavior is an extension, as it seems likely a defect that the
standard did not exempt them as it does explicit instantiations.
This allows the very common practice of specializing trait classes to work for
private, internal types. This doesn't address instantiating or specializing
function templates, although those apparently already partially work.
The naming and style for the Action layer isn't my favorite, comments and
suggestions would be appreciated there.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106993
91177308 -0d34-0410-b5e6-
96231b3b80d8
Jordy Rose [Mon, 28 Jun 2010 08:26:15 +0000 (08:26 +0000)]
Pointer comparisons (and pointer-pointer subtraction). Basically filling in SimpleSValuator::EvalBinOpLL().
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106992
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Mon, 28 Jun 2010 00:30:51 +0000 (00:30 +0000)]
Suppress diagnosing access violations while looking up deallocation functions
much as we already do for allocation function lookup. Explicitly check access
for the function we actually select in one case that was previously missing,
but being caught behind the blanket diagnostics for all overload candidates.
This fixs PR7436.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106986
91177308 -0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Sun, 27 Jun 2010 18:29:21 +0000 (18:29 +0000)]
Use softfp for linux gnueabi, keep the warning for everything else.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106984
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sun, 27 Jun 2010 17:52:15 +0000 (17:52 +0000)]
Correctly destroy reference temporaries with global storage. Remove ErrorUnsupported call when binding a global reference to a non-lvalue. Fixes PR7326.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106983
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sun, 27 Jun 2010 17:23:46 +0000 (17:23 +0000)]
Add a CreateReferenceTemporary that will do the right thing for variables with global storage.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106982
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sun, 27 Jun 2010 16:56:04 +0000 (16:56 +0000)]
Simplify CodeGenFunction::EmitReferenceBindingToExpr as a first step towards fixing PR7326.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106981
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sun, 27 Jun 2010 15:24:55 +0000 (15:24 +0000)]
Reduce indentation.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106980
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 27 Jun 2010 07:40:06 +0000 (07:40 +0000)]
misc tidying
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106978
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 27 Jun 2010 07:15:29 +0000 (07:15 +0000)]
finally get around to doing a significant cleanup to irgen:
have CGF create and make accessible standard int32,int64 and
intptr types. This fixes a ton of 80 column violations
introduced by LLVMContextification and cleans up stuff a lot.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106977
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 27 Jun 2010 06:32:58 +0000 (06:32 +0000)]
tidy up OrderGlobalInits
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106976
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 27 Jun 2010 06:26:04 +0000 (06:26 +0000)]
If coercing something from int or pointer type to int or pointer type
(potentially after unwrapping it from a struct) do it without going through
memory. We now compile:
struct DeclGroup {
unsigned NumDecls;
};
int foo(DeclGroup D) {
return D.NumDecls;
}
into:
%struct.DeclGroup = type { i32 }
define i32 @_Z3foo9DeclGroup(i64) nounwind ssp noredzone {
entry:
%D = alloca %struct.DeclGroup, align 4 ; <%struct.DeclGroup*> [#uses=2]
%coerce.dive = getelementptr %struct.DeclGroup* %D, i32 0, i32 0 ; <i32*> [#uses=1]
%coerce.val.ii = trunc i64 %0 to i32 ; <i32> [#uses=1]
store i32 %coerce.val.ii, i32* %coerce.dive
%tmp = getelementptr inbounds %struct.DeclGroup* %D, i32 0, i32 0 ; <i32*> [#uses=1]
%tmp1 = load i32* %tmp ; <i32> [#uses=1]
ret i32 %tmp1
}
instead of:
%struct.DeclGroup = type { i32 }
define i32 @_Z3foo9DeclGroup(i64) nounwind ssp noredzone {
entry:
%D = alloca %struct.DeclGroup, align 4 ; <%struct.DeclGroup*> [#uses=2]
%tmp = alloca i64 ; <i64*> [#uses=2]
%coerce.dive = getelementptr %struct.DeclGroup* %D, i32 0, i32 0 ; <i32*> [#uses=1]
store i64 %0, i64* %tmp
%1 = bitcast i64* %tmp to i32* ; <i32*> [#uses=1]
%2 = load i32* %1, align 1 ; <i32> [#uses=1]
store i32 %2, i32* %coerce.dive
%tmp1 = getelementptr inbounds %struct.DeclGroup* %D, i32 0, i32 0 ; <i32*> [#uses=1]
%tmp2 = load i32* %tmp1 ; <i32> [#uses=1]
ret i32 %tmp2
}
... which is quite a bit less terrifying.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106975
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 27 Jun 2010 06:04:18 +0000 (06:04 +0000)]
Same patch as the previous on the store side. Before we compiled this:
struct DeclGroup {
unsigned NumDecls;
};
int foo(DeclGroup D) {
return D.NumDecls;
}
to:
%struct.DeclGroup = type { i32 }
define i32 @_Z3foo9DeclGroup(i64) nounwind ssp noredzone {
entry:
%D = alloca %struct.DeclGroup, align 4 ; <%struct.DeclGroup*> [#uses=2]
%tmp = alloca i64 ; <i64*> [#uses=2]
store i64 %0, i64* %tmp
%1 = bitcast i64* %tmp to %struct.DeclGroup* ; <%struct.DeclGroup*> [#uses=1]
%2 = load %struct.DeclGroup* %1, align 1 ; <%struct.DeclGroup> [#uses=1]
store %struct.DeclGroup %2, %struct.DeclGroup* %D
%tmp1 = getelementptr inbounds %struct.DeclGroup* %D, i32 0, i32 0 ; <i32*> [#uses=1]
%tmp2 = load i32* %tmp1 ; <i32> [#uses=1]
ret i32 %tmp2
}
which caused fast isel bailouts due to the FCA load/store of %2. Now
we generate this just blissful code:
%struct.DeclGroup = type { i32 }
define i32 @_Z3foo9DeclGroup(i64) nounwind ssp noredzone {
entry:
%D = alloca %struct.DeclGroup, align 4 ; <%struct.DeclGroup*> [#uses=2]
%tmp = alloca i64 ; <i64*> [#uses=2]
%coerce.dive = getelementptr %struct.DeclGroup* %D, i32 0, i32 0 ; <i32*> [#uses=1]
store i64 %0, i64* %tmp
%1 = bitcast i64* %tmp to i32* ; <i32*> [#uses=1]
%2 = load i32* %1, align 1 ; <i32> [#uses=1]
store i32 %2, i32* %coerce.dive
%tmp1 = getelementptr inbounds %struct.DeclGroup* %D, i32 0, i32 0 ; <i32*> [#uses=1]
%tmp2 = load i32* %tmp1 ; <i32> [#uses=1]
ret i32 %tmp2
}
This avoids fastisel bailing out and is groundwork for future patch.
This reduces bailouts on CGStmt.ll to 911 from 935.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106974
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 27 Jun 2010 05:56:15 +0000 (05:56 +0000)]
improve CreateCoercedLoad a bit to generate slightly less awful
IR when handling X86-64 by-value struct stuff. For example, we
use to compile this:
struct DeclGroup {
unsigned NumDecls;
};
int foo(DeclGroup D);
void bar(DeclGroup *D) {
foo(*D);
}
into:
define void @_Z3barP9DeclGroup(%struct.DeclGroup* %D) ssp nounwind {
entry:
%D.addr = alloca %struct.DeclGroup*, align 8 ; <%struct.DeclGroup**> [#uses=2]
%agg.tmp = alloca %struct.DeclGroup, align 4 ; <%struct.DeclGroup*> [#uses=2]
%tmp3 = alloca i64 ; <i64*> [#uses=2]
store %struct.DeclGroup* %D, %struct.DeclGroup** %D.addr
%tmp = load %struct.DeclGroup** %D.addr ; <%struct.DeclGroup*> [#uses=1]
%tmp1 = bitcast %struct.DeclGroup* %agg.tmp to i8* ; <i8*> [#uses=1]
%tmp2 = bitcast %struct.DeclGroup* %tmp to i8* ; <i8*> [#uses=1]
call void @llvm.memcpy.p0i8.p0i8.i64(i8* %tmp1, i8* %tmp2, i64 4, i32 4, i1 false)
%0 = bitcast i64* %tmp3 to %struct.DeclGroup* ; <%struct.DeclGroup*> [#uses=1]
%1 = load %struct.DeclGroup* %agg.tmp ; <%struct.DeclGroup> [#uses=1]
store %struct.DeclGroup %1, %struct.DeclGroup* %0, align 1
%2 = load i64* %tmp3 ; <i64> [#uses=1]
call void @_Z3foo9DeclGroup(i64 %2)
ret void
}
which would cause fastisel to bail out due to the first class aggregate load %1. With
this patch we now compile it into the (still awful):
define void @_Z3barP9DeclGroup(%struct.DeclGroup* %D) nounwind ssp noredzone {
entry:
%D.addr = alloca %struct.DeclGroup*, align 8 ; <%struct.DeclGroup**> [#uses=2]
%agg.tmp = alloca %struct.DeclGroup, align 4 ; <%struct.DeclGroup*> [#uses=2]
%tmp3 = alloca i64 ; <i64*> [#uses=2]
store %struct.DeclGroup* %D, %struct.DeclGroup** %D.addr
%tmp = load %struct.DeclGroup** %D.addr ; <%struct.DeclGroup*> [#uses=1]
%tmp1 = bitcast %struct.DeclGroup* %agg.tmp to i8* ; <i8*> [#uses=1]
%tmp2 = bitcast %struct.DeclGroup* %tmp to i8* ; <i8*> [#uses=1]
call void @llvm.memcpy.p0i8.p0i8.i64(i8* %tmp1, i8* %tmp2, i64 4, i32 4, i1 false)
%coerce.dive = getelementptr %struct.DeclGroup* %agg.tmp, i32 0, i32 0 ; <i32*> [#uses=1]
%0 = bitcast i64* %tmp3 to i32* ; <i32*> [#uses=1]
%1 = load i32* %coerce.dive ; <i32> [#uses=1]
store i32 %1, i32* %0, align 1
%2 = load i64* %tmp3 ; <i64> [#uses=1]
%call = call i32 @_Z3foo9DeclGroup(i64 %2) noredzone ; <i32> [#uses=0]
ret void
}
which doesn't bail out. On CGStmt.ll, this reduces fastisel bail outs from 958 to 935,
and is the precursor of better things to come.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106973
91177308 -0d34-0410-b5e6-
96231b3b80d8
Jordy Rose [Sun, 27 Jun 2010 01:20:56 +0000 (01:20 +0000)]
Implicitly compare symbolic expressions to zero when they're being used as constraints. Part of PR7491.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106972
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 27 Jun 2010 01:08:03 +0000 (01:08 +0000)]
merge two tests.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106971
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 27 Jun 2010 01:06:27 +0000 (01:06 +0000)]
Change IR generation for return (in the simple case) to avoid doing silly
load/store nonsense in the epilog. For example, for:
int foo(int X) {
int A[100];
return A[X];
}
we used to generate:
%arrayidx = getelementptr inbounds [100 x i32]* %A, i32 0, i64 %idxprom ; <i32*> [#uses=1]
%tmp1 = load i32* %arrayidx ; <i32> [#uses=1]
store i32 %tmp1, i32* %retval
%0 = load i32* %retval ; <i32> [#uses=1]
ret i32 %0
}
which codegen'd to this code:
_foo: ## @foo
## BB#0: ## %entry
subq $408, %rsp ## imm = 0x198
movl %edi, 400(%rsp)
movl 400(%rsp), %edi
movslq %edi, %rax
movl (%rsp,%rax,4), %edi
movl %edi, 404(%rsp)
movl 404(%rsp), %eax
addq $408, %rsp ## imm = 0x198
ret
Now we generate:
%arrayidx = getelementptr inbounds [100 x i32]* %A, i32 0, i64 %idxprom ; <i32*> [#uses=1]
%tmp1 = load i32* %arrayidx ; <i32> [#uses=1]
ret i32 %tmp1
}
and:
_foo: ## @foo
## BB#0: ## %entry
subq $408, %rsp ## imm = 0x198
movl %edi, 404(%rsp)
movl 404(%rsp), %edi
movslq %edi, %rax
movl (%rsp,%rax,4), %eax
addq $408, %rsp ## imm = 0x198
ret
This actually does matter, cutting out 2000 lines of IR from CGStmt.ll
for example.
Another interesting effect is that altivec.h functions which are dead
now get dce'd by the inliner. Hence all the changes to
builtins-ppc-altivec.c to ensure the calls aren't dead.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106970
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 26 Jun 2010 23:13:19 +0000 (23:13 +0000)]
reduce indentation
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106967
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 26 Jun 2010 23:03:20 +0000 (23:03 +0000)]
Implement rdar://
7530813 - collapse multiple GEP instructions in IRgen
This avoids generating two gep's for common array operations. Before
we would generate something like:
%tmp = load i32* %X.addr ; <i32> [#uses=1]
%arraydecay = getelementptr inbounds [100 x i32]* %A, i32 0, i32 0 ; <i32*> [#uses=1]
%arrayidx = getelementptr inbounds i32* %arraydecay, i32 %tmp ; <i32*> [#uses=1]
%tmp1 = load i32* %arrayidx ; <i32> [#uses=1]
Now we generate:
%tmp = load i32* %X.addr ; <i32> [#uses=1]
%arrayidx = getelementptr inbounds [100 x i32]* %A, i32 0, i32 %tmp ; <i32*> [#uses=1]
%tmp1 = load i32* %arrayidx ; <i32> [#uses=1]
Less IR is better at -O0.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106966
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Sat, 26 Jun 2010 22:40:52 +0000 (22:40 +0000)]
Allow '__extension__' to be analyzed in a lvalue context.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106964
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 26 Jun 2010 22:40:46 +0000 (22:40 +0000)]
minor cleanup: don't emit the base of an array subscript until after
we're done diddling around with the index stuff. Use a cheaper type
comparison.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106963
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 26 Jun 2010 22:18:28 +0000 (22:18 +0000)]
fix inc/dec to honor -fwrapv and -ftrapv, implementing PR7426.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106962
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 26 Jun 2010 22:09:34 +0000 (22:09 +0000)]
move scalar inc/dec codegen into ScalarExprEmitter instead
of being in CGF. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106961
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 26 Jun 2010 21:52:32 +0000 (21:52 +0000)]
use more efficient type comparison predicates.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106958
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 26 Jun 2010 21:48:21 +0000 (21:48 +0000)]
Fix unary minus to trap on overflow with -ftrapv, refactoring binop
code so we can use it from VisitUnaryMinus.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106957
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 26 Jun 2010 21:25:03 +0000 (21:25 +0000)]
Implement support for -fwrapv, rdar://
7221421
As part of this, pull together trapv handling into the same enum.
This also add support for NSW multiplies.
This also makes PCH disagreement on overflow behavior silent, since it
really doesn't matter except for warnings and codegen (no macros get
defined etc).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106956
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 26 Jun 2010 20:27:24 +0000 (20:27 +0000)]
implement rdar://
7432000 - signed negate should codegen as NSW.
While I'm in there, adjust pointer to member adjustments as well.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106955
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 26 Jun 2010 17:11:39 +0000 (17:11 +0000)]
Implement support for #pragma message, patch by Michael Spencer!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106950
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sat, 26 Jun 2010 16:35:32 +0000 (16:35 +0000)]
Change EmitReferenceBindingToExpr to take a decl instead of a boolean.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106949
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sat, 26 Jun 2010 16:09:40 +0000 (16:09 +0000)]
Add function for mangling reference temporaries.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106948
91177308 -0d34-0410-b5e6-
96231b3b80d8
Charles Davis [Sat, 26 Jun 2010 03:50:05 +0000 (03:50 +0000)]
Mangle pointer and (lvalue) reference types in the Microsoft C++ Mangler.
Also, fix mangling of throw specs. Turns out MSVC totally ignores throw
specs when mangling names.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106937
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sat, 26 Jun 2010 00:31:14 +0000 (00:31 +0000)]
Remove cruft that I didn't intend to commit.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106932
91177308 -0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Sat, 26 Jun 2010 00:03:23 +0000 (00:03 +0000)]
Add a missing dependency to try to fix a buildbot failure.
It complained with:
llvm[5]: Building Clang arm_neon.h.inc with tblgen
cp: cannot create regular file `/build/buildbot-llvm/clang-x86_64-linux-selfhost-rel/llvm.obj.2/Release/lib/clang/2.0/include/arm_neon.h': No such file or directory
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106922
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 25 Jun 2010 23:51:38 +0000 (23:51 +0000)]
Relax assertion since non-pod C++ classes are not aggregates, but still can appear in this context.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106919
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 25 Jun 2010 23:51:34 +0000 (23:51 +0000)]
Add support for CXXRecordDecl in CFGRecStmtDeclVisitor.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106918
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Fri, 25 Jun 2010 23:34:47 +0000 (23:34 +0000)]
clang: Derive version name from LLVM unless specified explicitly. This means
clang is now clang 2.8.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106914
91177308 -0d34-0410-b5e6-
96231b3b80d8
Jordy Rose [Fri, 25 Jun 2010 23:23:04 +0000 (23:23 +0000)]
When a constant size array is casted to another type, its length should be scaled as well.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106911
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 25 Jun 2010 22:48:52 +0000 (22:48 +0000)]
Add dead stores C++ test case that was previously asserting due to an
invalid source range for CXXNewExpr.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106904
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 25 Jun 2010 22:48:49 +0000 (22:48 +0000)]
Use TypeSourceInfo to help determine the SourceRange of a CXXNewExpr. This fixes several
cases where we generated an invalid SourceRange for this expression. Thanks to John McCall
for helping me figure this out.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106903
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Fri, 25 Jun 2010 22:32:31 +0000 (22:32 +0000)]
Try making BuildBot happy again.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106898
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Fri, 25 Jun 2010 21:08:10 +0000 (21:08 +0000)]
Test case for pr7490.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106887
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 25 Jun 2010 20:59:31 +0000 (20:59 +0000)]
Add "checker caching" to GRExprEngine::CheckerVisit to progressively build
a winowed list of checkers that actually do something for a given StmtClass.
As the number of checkers grows, this may potentially significantly reduce
the number of checkers called at any one time. My own measurements show that
for the ~20 registered Checker objects, only ~5 of them respond at any one time
to a give statement. While this isn't a net performance win right now (there
is a minor slowdown on sqlite.3) this improvement does greatly improve debugging
when stepping through the checkers used to evaluate a given statement.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106884
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 25 Jun 2010 20:59:24 +0000 (20:59 +0000)]
Fix -analyze-display-progress (once again), this time with an additional regression test.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106883
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Fri, 25 Jun 2010 20:01:13 +0000 (20:01 +0000)]
Minor change to my last patch to fix PR7490.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106875
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Fri, 25 Jun 2010 19:04:52 +0000 (19:04 +0000)]
Translate numbers properly.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106873
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Fri, 25 Jun 2010 18:26:07 +0000 (18:26 +0000)]
IRGen for trivial initialization of dynamiccaly allocated
array of other done c++ objects. Fixes PR7490.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106869
91177308 -0d34-0410-b5e6-
96231b3b80d8
Tom Care [Fri, 25 Jun 2010 18:22:31 +0000 (18:22 +0000)]
Change RegionStoreManager::Retrieve to infer the type of a symbolic region from the context when it is not already available.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106868
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Fri, 25 Jun 2010 17:33:49 +0000 (17:33 +0000)]
build: Get CLANG_VERSION from Version.inc instead of depending on VER file directly.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106864
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Fri, 25 Jun 2010 17:33:46 +0000 (17:33 +0000)]
build: Add a generated Version.inc file instead of duplicating information.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106863
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Fri, 25 Jun 2010 16:25:09 +0000 (16:25 +0000)]
Support NonTypeTemplateParmDecl for PCH.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106860
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Fri, 25 Jun 2010 16:25:02 +0000 (16:25 +0000)]
Make PCHWriter::FlushStmts() robust. If we added null Stmts, reading them back got messed up.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106859
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Fri, 25 Jun 2010 16:24:58 +0000 (16:24 +0000)]
Support DependentTemplateSpecializationType and ElaboratedType for PCH.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106858
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Fri, 25 Jun 2010 16:24:51 +0000 (16:24 +0000)]
Add forgotten breaks in case statements.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106857
91177308 -0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Fri, 25 Jun 2010 12:48:07 +0000 (12:48 +0000)]
A bug I've introduced in STDIN handling surfaced a few broken tests, fix them.
Lexer/hexfloat.cpp is now XFAIL'd, I'd appreciate if someone could look into it.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106840
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Fri, 25 Jun 2010 09:03:34 +0000 (09:03 +0000)]
Support UnresolvedLookupExpr for PCH.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106832
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Fri, 25 Jun 2010 09:03:26 +0000 (09:03 +0000)]
Support UnresolvedMemberExpr for PCH.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106831
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Fri, 25 Jun 2010 09:03:12 +0000 (09:03 +0000)]
Print source location when we encounter unhandled statement during PCH writing.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106830
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 25 Jun 2010 05:00:29 +0000 (05:00 +0000)]
I don't know when I committed this, but it's probably a "bad thing".
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106821
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Fri, 25 Jun 2010 03:22:07 +0000 (03:22 +0000)]
Implement dependent alignment attribute support. This is a bit gross given the
current attribute system, but it is enough to handle class templates which
specify parts of their alignment in terms of their template parameters.
This also replaces the attributes test in SemaTemplate with one that actually
tests working attributes instead of broken ones. I plan to add more tests here
for non-dependent attributes in a subsequent patch.
Thanks to John for walking me through some of this. =D
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106818
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Fri, 25 Jun 2010 00:05:45 +0000 (00:05 +0000)]
Add comment for my last patch.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106813
91177308 -0d34-0410-b5e6-
96231b3b80d8
John Thompson [Fri, 25 Jun 2010 00:02:05 +0000 (00:02 +0000)]
Fixed another double-char in PPC-specific asm constraints.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106812
91177308 -0d34-0410-b5e6-
96231b3b80d8
John Thompson [Thu, 24 Jun 2010 22:44:13 +0000 (22:44 +0000)]
Added PPC-specific asm constraints, PS3 configuration changes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106806
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Thu, 24 Jun 2010 20:41:41 +0000 (20:41 +0000)]
Remove HAS_TLS define.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106786
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Thu, 24 Jun 2010 18:50:41 +0000 (18:50 +0000)]
Fixes a regression when redeclaration of a global satic
is an extern local to a function. Radar
8125274 .
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106773
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Thu, 24 Jun 2010 16:40:16 +0000 (16:40 +0000)]
Renamed selactor-expr-lvalue.mm to selector-expr-lvalue.mm.
Thanks Daniel D.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106758
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 24 Jun 2010 16:26:12 +0000 (16:26 +0000)]
Return null pointer instead of 'false' (fixes clang warning).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106755
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Thu, 24 Jun 2010 13:36:41 +0000 (13:36 +0000)]
Add check for illegal whence argument of fseek.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106742
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Thu, 24 Jun 2010 13:09:02 +0000 (13:09 +0000)]
Should return stateNotNull.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106741
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Thu, 24 Jun 2010 12:52:28 +0000 (12:52 +0000)]
Let StreamChecker::CheckNullStream() return a GRState after successful check.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106738
91177308 -0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Thu, 24 Jun 2010 11:06:12 +0000 (11:06 +0000)]
Don't depend on system headers in clang -cc1 tests.
The constant was copied from clang's limits.h.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106732
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Thu, 24 Jun 2010 08:57:31 +0000 (08:57 +0000)]
Support a couple more C++ Exprs for PCH.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106727
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Thu, 24 Jun 2010 08:57:09 +0000 (08:57 +0000)]
Fix broken de/serialization for a couple of C++ Exprs.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106726
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Thu, 24 Jun 2010 02:02:00 +0000 (02:02 +0000)]
More clang support for darwin tls. Add a __has_feature macro and
target specific preprocessor define as well.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106715
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Thu, 24 Jun 2010 00:08:06 +0000 (00:08 +0000)]
Patch to correctly mangle block helper functions
when block literal is declared inside a ctor/dtor.
Fixes radr
8096995 .
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106700
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 23 Jun 2010 22:08:00 +0000 (22:08 +0000)]
Add 'VisitEndAnalysis' callback to Checker class. This callback is called by GRExprEngine
when the worklist algorithm has terminated. This allows some checkers to do a post-analysis
phase after all paths have been analyzed.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106689
91177308 -0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Wed, 23 Jun 2010 19:34:52 +0000 (19:34 +0000)]
Add parentheses suggested by gcc.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106668
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 23 Jun 2010 18:31:33 +0000 (18:31 +0000)]
Revert "Tweak tests to hopefully fix include of limits.h on win32.", tweak fails on linux.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106661
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 23 Jun 2010 18:15:13 +0000 (18:15 +0000)]
Driver: Add make variable to allow disabling default integrated assembler, till
all the kinks are worked out.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106641
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 23 Jun 2010 18:10:30 +0000 (18:10 +0000)]
Add USR tests for ObjC class extensions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106640
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 23 Jun 2010 18:06:20 +0000 (18:06 +0000)]
Tweak tests to hopefully fix include of limits.h on win32.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106639
91177308 -0d34-0410-b5e6-
96231b3b80d8
Sebastian Redl [Wed, 23 Jun 2010 15:57:03 +0000 (15:57 +0000)]
Add isArrayType() to CanProxy's forwarders.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106629
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Wed, 23 Jun 2010 13:48:30 +0000 (13:48 +0000)]
Support C++ class template specializations and partial specializations for PCH.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106625
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Wed, 23 Jun 2010 13:48:23 +0000 (13:48 +0000)]
Modify ClassTemplateSpecializationDecl and ClassTemplatePartialSpecializationDecl to allow PCH read/write.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106624
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 23 Jun 2010 06:00:24 +0000 (06:00 +0000)]
improve altivec vector bool/pixel support, patch by Anton Yartsev
with several tweaks by me.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106619
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 23 Jun 2010 05:21:28 +0000 (05:21 +0000)]
polish the -finstrument-functions implementation, patch by Nelson Elhage!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106618
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Wed, 23 Jun 2010 02:12:00 +0000 (02:12 +0000)]
add comments.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106617
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Wed, 23 Jun 2010 02:06:56 +0000 (02:06 +0000)]
add comments.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106616
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 22 Jun 2010 23:58:31 +0000 (23:58 +0000)]
Correctly construct an ElementRegion for alloca() + pointer arithmetic. Fixes analyzer
crash reported in PR 7450.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106609
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 22 Jun 2010 23:47:37 +0000 (23:47 +0000)]
String literals enclosed in parentheses are still string
literals. Fixes PR7488.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106607
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 22 Jun 2010 23:43:22 +0000 (23:43 +0000)]
Make c++ and C++ valid extensions for C++ source files, from Seth Cantrell!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106602
91177308 -0d34-0410-b5e6-
96231b3b80d8