Commit Graph

67399 Commits

Author SHA1 Message Date
Daniel Dunbar db5d4521f5 Fix spacing.
llvm-svn: 81097
2009-09-06 00:00:13 +00:00
Anders Carlsson 8284d7caa3 Initialize default CXXConstructExpr arguments to 0. Fixes a crash when destroying the CXXConstructExpr.
llvm-svn: 81096
2009-09-05 22:51:06 +00:00
Nick Lewycky d592399beb Now that googletest can print ConstantRange, use EXPECT_EQ when testing for
equality. Prefer EXPECT_EQ(foo, Full) over EXPECT_TRUE(foo.isFullSet()) because
the former will print out the contents of the constant range that failed.

llvm-svn: 81094
2009-09-05 18:27:40 +00:00
Jeffrey Yasskin b797fdc365 Teach googletest to use raw_ostream instead of just std::ostream.
This can break when there are implicit conversions from types raw_ostream
understands but std::ostream doesn't, but it increases the number of cases that
Just Work.

llvm-svn: 81093
2009-09-05 18:16:17 +00:00
Ted Kremenek b5850f9c80 Fix buffer overflow reported in PR 4903.
llvm-svn: 81092
2009-09-05 17:59:01 +00:00
Daniel Dunbar 25900fc909 Quote another '%S' in a test.
llvm-svn: 81088
2009-09-05 12:38:44 +00:00
Daniel Dunbar faa0fa5c83 Rename %S metavar to %M (clang uses %S for the basename of the test file).
llvm-svn: 81087
2009-09-05 12:38:35 +00:00
Daniel Dunbar 5e606cb503 Temporary test files should use %t.
llvm-svn: 81086
2009-09-05 12:38:26 +00:00
Daniel Dunbar b9a562b7c4 Don't depend on arch specific global prefix.
llvm-svn: 81084
2009-09-05 11:53:06 +00:00
Daniel Dunbar b9ea94c990 Eliminate uses of %prcontext.
- I'd appreciate it if someone else eyeballs my changes to make sure I captured
   the intent of the test.

llvm-svn: 81083
2009-09-05 11:35:16 +00:00
Daniel Dunbar 6b3153bb53 opt: Add -S option to print output as LLVM assembly.
llvm-svn: 81082
2009-09-05 11:34:53 +00:00
Daniel Dunbar 77e2f2583b Eliminate some Tclisms.
llvm-svn: 81081
2009-09-05 11:34:46 +00:00
Mike Stump b82db12b35 Refine overrides and thunks for virtual bases. Cleanups. WIP.
llvm-svn: 81080
2009-09-05 11:28:33 +00:00
Benjamin Kramer 26db6481c5 Replace some instances of std::string with StringRefs.
llvm-svn: 81079
2009-09-05 09:49:39 +00:00
Mike Stump c9eb1727db Cleanup.
llvm-svn: 81078
2009-09-05 09:24:43 +00:00
Mike Stump 69bbd6ce84 Cleanups.
llvm-svn: 81077
2009-09-05 09:10:58 +00:00
Benjamin Kramer 8691eecb91 Delete unused #include.
llvm-svn: 81076
2009-09-05 08:50:14 +00:00
Mike Stump 6363021ab9 Cleanups.
llvm-svn: 81075
2009-09-05 08:47:24 +00:00
Mike Stump 3cdb051425 Cleanups.
llvm-svn: 81074
2009-09-05 08:45:02 +00:00
Mike Stump 5e3ac0249c Cleanups.
llvm-svn: 81073
2009-09-05 08:40:18 +00:00
Mike Stump ea8eea2c45 Cleanups.
llvm-svn: 81072
2009-09-05 08:37:03 +00:00
Mike Stump db14a73606 Cleanups.
llvm-svn: 81071
2009-09-05 08:07:32 +00:00
John McCall cc5e23ca8d Overhaul the mangler to use a visitor pattern, at least for types. We can safely
ignore non-canonical type classes, but apparently we need to know how to mangle
dependent names.

The missing cases are much more obvious now.

llvm-svn: 81070
2009-09-05 07:56:18 +00:00
Mike Stump 001ad31c9a Cleanups. WIP.
llvm-svn: 81069
2009-09-05 07:49:12 +00:00
Anders Carlsson 1b4ebfab2b Pass the ConstructLoc to BuildCXXConstructExpr.
llvm-svn: 81068
2009-09-05 07:40:38 +00:00
Mike Stump 453fe4285d Install thunks later to fixup overrides. Track space taken by vbase
offsets better for thunk refinements.  Cleanups.  WIP.

llvm-svn: 81067
2009-09-05 07:20:32 +00:00
Zhongxing Xu 1309a852d3 pass the correct predecessor node.
llvm-svn: 81066
2009-09-05 06:46:12 +00:00
John McCall b2e195a585 Start emitting ElaboratedTypes in C++ mode. Support the effort in various
ways:  remove elab types during desugaring, enhance pretty-printing to allow
tags to be suppressed without suppressing scopes, look through elab types
when associating a typedef name with an anonymous record type.

llvm-svn: 81065
2009-09-05 06:31:47 +00:00
Zhongxing Xu d7674a47f9 Do not call FlushReports() in GRBugReporter's dtor. We already call it in
ActionGRExprEngine().

llvm-svn: 81064
2009-09-05 06:06:49 +00:00
Anders Carlsson dc6d2c3cda Report errors for member functions correctly.
llvm-svn: 81063
2009-09-05 05:38:54 +00:00
Anders Carlsson 657bad441e Use a separate diagnostic for default function argument expressions.
llvm-svn: 81062
2009-09-05 05:14:19 +00:00
Zhongxing Xu 88f07cd49c Refactor builtin function evaluation code into its own function.
llvm-svn: 81061
2009-09-05 05:00:57 +00:00
Bob Wilson 7f20002993 Stabilize the order of live intervals in the priority_queue used by the
linear scan reg alloc.  This fixes a problem I ran into where extracting
a function from a larger file caused the generated code to change (masking
the problem I was trying to debug) because the allocator behaved differently.

This changes the results for two X86 regression checks.  stack-color-with-reg
is improved, with one less instruction, but pr3495 is worse, with one more
copy.  As far as I can tell, these tests were just getting lucky or unlucky,
so I've changed the expected results.

llvm-svn: 81060
2009-09-05 01:19:16 +00:00
Daniel Dunbar dc7f7b7ac3 Add missing include.
llvm-svn: 81059
2009-09-05 00:48:32 +00:00
Devang Patel f03667e20e Detect VLAs.
Do not use DenseMap operator[] because it inserts new entry if lookup fails. Use find() to check an entry in a DenseMap first.

llvm-svn: 81058
2009-09-05 00:34:14 +00:00
John McCall fcc33b074b Basic support for representing elaborated type specifiers
directly in the AST.  The current thinking is to create these
only in C++ mode for efficiency.  But for now, they're not being
created at all; patch to follow.

This will let us do things like verify that tags match during
template instantation, as well as signal that an elaborated type
specifier was used for clients that actually care.

Optimally, the TypeLoc hierarchy should be adjusted to carry tag
location information as well.

llvm-svn: 81057
2009-09-05 00:15:47 +00:00
Devang Patel f5d5360065 Ignore malformed global variable debug info.
llvm-svn: 81055
2009-09-04 23:59:07 +00:00
Douglas Gregor 34ec2ef159 Improve the AST representation and semantic analysis for extern
templates. We now distinguish between an explicit instantiation
declaration and an explicit instantiation definition, and know not to
instantiate explicit instantiation declarations. Unfortunately, there
is some remaining confusion w.r.t. instantiation of out-of-line member
function definitions that causes trouble here.
 

llvm-svn: 81053
2009-09-04 22:48:11 +00:00
Benjamin Kramer 21d15aa591 Prune #includes.
llvm-svn: 81052
2009-09-04 22:45:23 +00:00
Benjamin Kramer 865f7deab5 Remove an unneeded call to c_str().
llvm-svn: 81051
2009-09-04 22:44:03 +00:00
Kevin Enderby 9c0f7fc746 Added AsmToken enum constants to MCAsmLexer.h for '[', ']', '{', and '}' in
preparation of supporting other targets. Then changed the lexer to parse these
as tokens.

llvm-svn: 81050
2009-09-04 22:40:31 +00:00
Kevin Enderby f92f9909c4 Added the AsmToken::Hash enum constant to MCAsmLexer.h in preparation of
supporting other targets.  Changed the code to pass MCAsmInfo to the parser
and the lexer.  Then changed the lexer to use CommentString from MCAsmInfo
instead of a literal '#' character.

llvm-svn: 81046
2009-09-04 21:45:34 +00:00
Devang Patel a33c5a922d While replacing an MDNode elment, properly update MDNode's operand list.
MDNode's operand list does not include all elements.

llvm-svn: 81045
2009-09-04 21:32:05 +00:00
Andreas Neustifter b7d704dac3 Prevent warnings on compilers for which its not clear that assert won't return.
llvm-svn: 81044
2009-09-04 21:22:04 +00:00
Lang Hames 7af06f63bf Removed yet another std::ostream reference.
llvm-svn: 81042
2009-09-04 21:03:07 +00:00
Lang Hames bba76db033 Removed some junk and a std::ostream operator that was hanging around.
llvm-svn: 81041
2009-09-04 20:54:51 +00:00
Lang Hames 3fffe62177 Replaces uses of unsigned for indexes in LiveInterval and VNInfo with
a new class, MachineInstrIndex, which hides arithmetic details from
most clients. This is a step towards allowing the register allocator
to update/insert code during allocation.

llvm-svn: 81040
2009-09-04 20:41:11 +00:00
Dale Johannesen d14b67e931 Test for llvm-gcc commit 81037.
llvm-svn: 81038
2009-09-04 20:19:09 +00:00
Douglas Gregor d94105a1c2 Don't generate any code for an explicit call to a trivial destructor.
Now that parsing, semantic analysis, and (I think) code generation of
pseudo-destructor expressions and explicit destructor calls works,
update the example-dynarray.cpp test to destroy the objects it
allocates and update the test to actually compile + link.
The code seems correct, but the Clang-compiled version dies with a
malloc error. Time to debug!

llvm-svn: 81025
2009-09-04 19:04:08 +00:00
Mike Stump 35337557af Cleanup.
llvm-svn: 81024
2009-09-04 18:54:10 +00:00