Chris Lattner
c0c043903b
rename getTypeSigned() -> isTypeSigned() per daniel's review.
...
llvm-svn: 85076
2009-10-25 22:49:18 +00:00
Chris Lattner
c77f989687
Fix PR5298 - -Wmissing-noreturn shouldn't warn if the function is already
...
declared noreturn.
llvm-svn: 85075
2009-10-25 22:43:07 +00:00
Chandler Carruth
083524ae5c
Remove unused includes.
...
llvm-svn: 85074
2009-10-25 22:38:41 +00:00
Chris Lattner
b7df3c66c8
Implement rdar://6756623 - use of deprecated type in deprecated typedef should not warn
...
llvm-svn: 85073
2009-10-25 22:31:57 +00:00
Sebastian Redl
e24b16205f
Make sure we actually have a definition before asking if it is implicit. Fixes PR4674.
...
llvm-svn: 85072
2009-10-25 22:31:45 +00:00
Chris Lattner
ecf328e6dd
When parsing a top level struct declaration, make sure to
...
process decl attributes instead of dropping them on the floor.
This allows us to diagnose cases like the testcase. Also don't
diagnose deprecated stuff in ActOnTag: not all uses of tags
may be 'uses', and SemaType does this now.
llvm-svn: 85071
2009-10-25 22:21:57 +00:00
Chris Lattner
e40853aabd
move calls to DiagnoseUseOfDecl (which warns about deprecated/unavailable
...
types) out of Sema::getTypeName into ConvertDeclSpecToType. getTypeName
is sometimes used as a predicate in the parser, so it could cause redundant
diags to be emitted. This is also needed by two upcoming enhancements.
llvm-svn: 85070
2009-10-25 22:09:09 +00:00
Chris Lattner
de126cfa83
cleanups
...
llvm-svn: 85069
2009-10-25 22:05:13 +00:00
Sebastian Redl
d7b3d7dd79
Remove the Skip parameter from GetTypeForDeclarator and dependents. Take the opportunity to improve an error message and fix PR4498.
...
llvm-svn: 85068
2009-10-25 21:45:37 +00:00
Chris Lattner
588f19acc1
remove a nonsensical todo
...
llvm-svn: 85067
2009-10-25 21:19:07 +00:00
Daniel Dunbar
fb049eef8f
Tweak test, with -strict-whitespace $ won't match on Windows because the buffer
...
will have \r\n.
- Perhaps we should make FileCheck normalize line-endings, even in
strict-whitespace mode?
llvm-svn: 85066
2009-10-25 20:34:02 +00:00
Jim Grosbach
5bde1cbd93
of -> or
...
llvm-svn: 85065
2009-10-25 19:14:48 +00:00
Jim Grosbach
5a9788b979
80-column cleanup
...
llvm-svn: 85064
2009-10-25 18:55:46 +00:00
Chris Lattner
1138f04aa5
move the extwarn about using long long out of the entry of
...
GetTypeForDeclarator and into the code that handles long long
already.
llvm-svn: 85063
2009-10-25 18:25:04 +00:00
Chris Lattner
dae17dbbed
simplify interface to ConvertDeclSpecToType, check for inferred
...
block return types only when a TST isn't specified, not every time
through GetTypeForDeclarator.
llvm-svn: 85062
2009-10-25 18:21:37 +00:00
Chris Lattner
ebfde05f29
change ConvertDeclSpecToType to be a static function in SemaType.cpp
...
llvm-svn: 85061
2009-10-25 18:07:27 +00:00
Chris Lattner
1fb66f4323
change Sema::ActOnFriendTypeDecl to use GetTypeForDeclarator instead
...
of ConvertDeclSpecToType, which I'd like to keep private to SemaType.cpp.
We do this by cons'ing up a trivial Declarator for the type.
John, please review.
llvm-svn: 85060
2009-10-25 17:47:27 +00:00
Chris Lattner
22e8563175
various cleanups for SemaType.cpp
...
llvm-svn: 85059
2009-10-25 17:36:50 +00:00
Chris Lattner
a27dd59277
minor reorg: check both attributes before decl.
...
llvm-svn: 85058
2009-10-25 17:21:40 +00:00
Chris Lattner
17e15f18c5
simplify Sema::getTypeName a bit: if control gets out of the switch,
...
IIDecl cannot be null. There is no need to check for both C++ mode and
presence of CXXRecordDecl. ObjC interfaces can't have ScopeSpecs.
llvm-svn: 85057
2009-10-25 17:16:46 +00:00
Chris Lattner
5566290b34
In objc mode, every identifier in a cast expression was using doing a
...
type looking using getTypeName() and every property access was using
NextToken() to do lookahead to see if the identifier is followed by
a '.'. Rearrange this code to not need lookahead and only do the
type lookup if we have "identifier." in the token stream. Also
improve a diagnostic a bit.
llvm-svn: 85056
2009-10-25 17:04:48 +00:00
Sebastian Redl
1054faed32
Audit the code for places where it is assumed that every base specifier refers to a RecordType. Add assertions or conditions as appropriate. This fixes another crash in the Apache stdlib vector.
...
llvm-svn: 85055
2009-10-25 17:03:50 +00:00
Sebastian Redl
c45c03c9dd
Ignore dependent bases in ADL. Fixes PR5271.
...
llvm-svn: 85054
2009-10-25 09:35:33 +00:00
Sanjiv Gupta
b18a46806b
Reapply 85006 with a minor fix.
...
llvm-svn: 85052
2009-10-25 08:14:11 +00:00
Evan Cheng
69140ec4fa
Add a couple of ARM cross-rc coalescing tests.
...
llvm-svn: 85051
2009-10-25 08:01:41 +00:00
Evan Cheng
b9f3520660
Update tests.
...
llvm-svn: 85050
2009-10-25 07:53:48 +00:00
Evan Cheng
2e7dee5f23
Add ARM getMatchingSuperRegClass to handle S / D / Q cross regclass coalescing.
...
llvm-svn: 85049
2009-10-25 07:53:28 +00:00
Evan Cheng
5d1b849658
Don't forget subreg indices when folding load / store.
...
llvm-svn: 85048
2009-10-25 07:52:27 +00:00
Evan Cheng
4c799e65d7
Use isIdentityCopy. Fix a bozo bug (flipped condition) in InvalidateRegDef.
...
llvm-svn: 85047
2009-10-25 07:51:47 +00:00
Evan Cheng
5d2245b210
Code clean up.
...
llvm-svn: 85046
2009-10-25 07:49:57 +00:00
Evan Cheng
19348415c4
Do not delete identity insert_subreg even if dest is virtual. Let later passes delete them. This avoids register scavenger complain.
...
llvm-svn: 85045
2009-10-25 07:48:51 +00:00
Evan Cheng
1da682bb3c
Add isIdentityCopy to check for identity copy (or extract_subreg, etc.)
...
llvm-svn: 85044
2009-10-25 07:47:07 +00:00
Nick Lewycky
974e12b2d3
Remove includes of Support/Compiler.h that are no longer needed after the
...
VISIBILITY_HIDDEN removal.
llvm-svn: 85043
2009-10-25 06:57:41 +00:00
Nick Lewycky
02d5f77d26
Remove VISIBILITY_HIDDEN from class/struct found inside anonymous namespaces.
...
Chris claims we should never have visibility_hidden inside any .cpp file but
that's still not true even after this commit.
llvm-svn: 85042
2009-10-25 06:33:48 +00:00
Chris Lattner
13b8b56dd4
this is done.
...
llvm-svn: 85041
2009-10-25 06:17:51 +00:00
Chris Lattner
d8e8fb4d64
Teach FoldBitCast to be able to handle bitcasts from (e.g.) i128 -> <4 x float>.
...
This allows us to simplify this:
union vec2d {
double e[2];
double v __attribute__((vector_size(16)));
};
typedef union vec2d vec2d;
static vec2d a={{1,2}}, b={{3,4}};
vec2d foo () {
return (vec2d){ .v = a.v + b.v * (vec2d){{5,5}}.v };
}
down to:
define %0 @foo() nounwind ssp {
entry:
%mrv5 = insertvalue %0 undef, double 1.600000e+01, 0 ; <%0> [#uses=1]
%mrv6 = insertvalue %0 %mrv5, double 2.200000e+01, 1 ; <%0> [#uses=1]
ret %0 %mrv6
}
instead of:
define %0 @foo() nounwind ssp {
entry:
%mrv5 = insertvalue %0 undef, double extractelement (<2 x double> fadd (<2 x double> fmul (<2 x double> bitcast (<1 x i128> <i128 85174437667405312423031577302488055808> to <2 x double>), <2 x double> <double 3.000000e+00, double 4.000000e+00>), <2 x double> <double 1.000000e+00, double 2.000000e+00>), i32 0), 0 ; <%0> [#uses=1]
%mrv6 = insertvalue %0 %mrv5, double extractelement (<2 x double> fadd (<2 x double> fmul (<2 x double> bitcast (<1 x i128> <i128 85174437667405312423031577302488055808> to <2 x double>), <2 x double> <double 3.000000e+00, double 4.000000e+00>), <2 x double> <double 1.000000e+00, double 2.000000e+00>), i32 1), 1 ; <%0> [#uses=1]
ret %0 %mrv6
}
llvm-svn: 85040
2009-10-25 06:15:37 +00:00
Chris Lattner
9d051246eb
move FoldBitCast earlier in the file, and use it instead of
...
ConstantExpr::getBitCast in various places.
llvm-svn: 85039
2009-10-25 06:08:26 +00:00
Chris Lattner
c5fd5ad4aa
refactor FoldBitCast to reduce nesting and to always return a constantexpr
...
instead of returning null on failure. No functionality change.
llvm-svn: 85038
2009-10-25 06:02:57 +00:00
Nick Lewycky
54d7179a25
Remove ICmpInst::isSignedPredicate which was a reimplementation
...
CmpInst::isSigned.
llvm-svn: 85037
2009-10-25 05:20:17 +00:00
Nick Lewycky
7494b3b1d4
Sink isTrueWhenEqual from ICmpInst to CmpInst. Add a matching isFalseWhenEqual
...
which is equal to !isTrueWhenEqual for ints but not for floats.
llvm-svn: 85036
2009-10-25 03:50:03 +00:00
Daniel Dunbar
a4ea29e362
lit: Add --config-prefix option, to override default config file names.
...
llvm-svn: 85035
2009-10-25 03:30:55 +00:00
Nick Lewycky
efd3e907b4
Indent.
...
llvm-svn: 85034
2009-10-25 03:22:00 +00:00
Nate Begeman
e46ee9aaea
Add support for vector shifts, pretty straight forward.
...
llvm-svn: 85033
2009-10-25 02:26:48 +00:00
Nate Begeman
b8326be4d9
Fix a bug in calculating shufflevector indices when constructing vectors from other vectors.
...
If I can find it again, I will check in a testcase.
llvm-svn: 85032
2009-10-25 02:26:01 +00:00
Mikhail Glushenkov
964020b8ba
Regenerate.
...
llvm-svn: 85031
2009-10-25 01:44:24 +00:00
Mikhail Glushenkov
a51c491f03
Document OptionPreprocessor.
...
llvm-svn: 85030
2009-10-25 01:44:11 +00:00
Mikhail Glushenkov
9b291a0862
Add a test for OptionPreprocessor.
...
llvm-svn: 85029
2009-10-25 01:43:50 +00:00
Daniel Dunbar
768251875c
lit: Allow use of /dev/null in redirects on Windows (replace by a temporary
...
file).
llvm-svn: 85028
2009-10-25 01:37:26 +00:00
Jim Grosbach
5027d359e7
When the scavenger is looking for a good candidate location to restore from a
...
spill, it should avoid doing so inside the live range of a virtual register.
llvm-svn: 85026
2009-10-25 00:45:07 +00:00
Dan Gohman
7f2413f18b
Update these tests to match what Loop::print now prints.
...
llvm-svn: 85021
2009-10-24 23:52:07 +00:00