Commit Graph

67358 Commits

Author SHA1 Message Date
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
Daniel Dunbar 037f389f4d Merge libgcc spec changes for darwin::Link::ConstructJob.
llvm-svn: 81022
2009-09-04 18:35:47 +00:00
Daniel Dunbar 2b5f6817e0 Tweak darwin::Link::AddLinkArgs.
llvm-svn: 81021
2009-09-04 18:35:41 +00:00
Daniel Dunbar 91dbfd6666 Implement darwin::Link::AddDarwinArch for ARM.
llvm-svn: 81020
2009-09-04 18:35:31 +00:00
Daniel Dunbar 84e727fb72 Darwin: Pass -iphoneos-version-min to ld when building for ARM.
llvm-svn: 81019
2009-09-04 18:35:21 +00:00
Daniel Dunbar 56b534d2d6 Also compare stdout and stderr lines.
llvm-svn: 81018
2009-09-04 18:35:09 +00:00
Daniel Dunbar 5ed07fe794 Add -ccc-install-dir option for faking installation path.
llvm-svn: 81017
2009-09-04 18:35:03 +00:00
Daniel Dunbar f0a5b9b126 Rename Darwin_X86 toolchain to just Darwin, this can support all platforms.
llvm-svn: 81016
2009-09-04 18:34:51 +00:00
Douglas Gregor bddb73fa1d If a destructor is referenced or a pseudo-destructor expression is
formed without a trailing '(', diagnose the error (these expressions
must be immediately called), emit a fix-it hint, and fix the code.

llvm-svn: 81015
2009-09-04 18:29:40 +00:00
Mike Stump 5a522353c3 Add overidding for methods for vtable building for the secondary
vtables.  Add thunk generation.  WIP.

llvm-svn: 81014
2009-09-04 18:27:16 +00:00
Daniel Dunbar 0da4a5dcab Use llvm::sys::getHostTriple, not LLVM_HOSTTRIPLE.
llvm-svn: 81013
2009-09-04 17:43:10 +00:00
Daniel Dunbar 156fa7dde0 Make CmpDriver less stupid.
llvm-svn: 81012
2009-09-04 17:41:47 +00:00
Daniel Dunbar c9b0a37211 Support 'make test TESTSUITE=CodeGen', etc.
llvm-svn: 81011
2009-09-04 17:40:27 +00:00
Daniel Dunbar 5095b293b7 Remove unused argument.
llvm-svn: 81010
2009-09-04 17:39:02 +00:00
Douglas Gregor ad8a336b40 Implement AST, semantics, and CodeGen for C++ pseudo-destructor
expressions, e.g.,

  p->~T()

when p is a pointer to a scalar type. 

We don't currently diagnose errors when pseudo-destructor expressions
are used in any way other than by forming a call.

llvm-svn: 81009
2009-09-04 17:36:40 +00:00
Andreas Neustifter 5673c0aace Updated tests to use ProfileVerifer to test ProfileLoader and ProfileEstimator.
(Keep disabled test disabled until selfhosted build issue is resolved.)

llvm-svn: 81008
2009-09-04 17:21:59 +00:00
Andreas Neustifter 8f166f6a36 Cleaned up ProfileVerifierPass.
(See http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20090831/086219.html)

llvm-svn: 81007
2009-09-04 17:15:10 +00:00
Steve Naroff ef9618b75f Implement accessors clang_getCursorKind(), clang_getCursorDecl().
Implement clang_getCursor() - wired up to Argiris's work.
Implement callbacks for CXCursor_ObjCProtocolRef.

llvm-svn: 81004
2009-09-04 15:44:05 +00:00
Douglas Gregor 2d2282e8f9 When searching for a default constructor or copy constructor, skip constructor templates
llvm-svn: 81002
2009-09-04 14:46:39 +00:00
Andreas Neustifter 18156bd75c Converted MaximumSpanningTree algorithm to a generic template, this could go
into llvm/ADT.

llvm-svn: 81001
2009-09-04 12:34:44 +00:00
Dan Gohman 0c2477c26b Include optional subclass flags, such as inbounds, nsw, etc., in the
Constant uniquing tables. This allows distinct ConstantExpr objects
with the same operation and different flags.

Even though a ConstantExpr "a + b" is either always overflowing or
never overflowing (due to being a ConstantExpr), it's still necessary
to be able to represent it both with and without overflow flags at
the same time within the IR, because the safety of the flag may
depend on the context of the use. If the constant really does overflow,
it wouldn't ever be safe to use with the flag set, however the use
may be in code that is never actually executed.

This also makes it possible to merge all the flags tests into a single test.

llvm-svn: 80998
2009-09-04 12:08:11 +00:00
Duncan Sands bc74cae983 Use delete[] to match new[] (found by valgrind).
llvm-svn: 80997
2009-09-04 11:59:43 +00:00
Evan Cheng 3d2fce01aa Run branch folding if if-converter make some transformations.
llvm-svn: 80994
2009-09-04 07:47:40 +00:00
Evan Cheng fc4eef183b Fix comment for consistency sake.
llvm-svn: 80993
2009-09-04 07:46:30 +00:00
Douglas Gregor 43e75176ec Parse extern templates, pass that information all the way to Sema,
then drop it on the floor.

llvm-svn: 80989
2009-09-04 06:33:52 +00:00
Douglas Gregor 119b0c7185 Introduce an egregious hack to fix PR4828.
The problem this change addresses is that we treat __is_pod and
__is_empty as keywords in C++, because they are built-in type traits
in GCC >= 4.3. However, GNU libstdc++ 4.2 (and possibly earlier
versions) define implementation-detail struct templates named __is_pod
and __is_empty. 

This commit solves the problem by recognizing

  struct __is_pod

and

  struct __is_empty

as special token sequences. When one of these token sequences is
encountered, the keyword (__is_pod or __is_empty) is implicitly
downgraded to an identifier so that parsing can continue. This is an
egregious hack, but it has the virtue of "just working" whether
someone is using libstdc++ 4.2 or not, without the need for special
flags.

llvm-svn: 80988
2009-09-04 05:53:02 +00:00
Daniel Dunbar 30e30587eb Remove stale greps.
llvm-svn: 80986
2009-09-04 05:07:52 +00:00
Daniel Dunbar 59eb5ef136 Update lib deps.
llvm-svn: 80985
2009-09-04 05:07:44 +00:00
Douglas Gregor f6a5411fd0 Actually initialize HasQualifier and HasExplicitTemplateArgumentList in the EmptyShell constructor for MemberExpr. Should clear up some valgrind failures in PCH reading
llvm-svn: 80984
2009-09-04 05:04:07 +00:00
Bob Wilson 36d8c75eca Convert tests to FileCheck.
llvm-svn: 80983
2009-09-04 04:07:19 +00:00
Daniel Dunbar 79ee0fa59c Add a valgrind suppressions file for x86_64-pc-linux-gnu and gcc-4.3.3 which
suppresses the overlapped memcpy in stable_sort that clang triggers.

llvm-svn: 80982
2009-09-04 02:53:57 +00:00
Daniel Dunbar 3009f81d1d Add --vg-arg option to clang test runner.
- Passes additional argument through to valgrind.

Also, don't run valgrind with --leak-check=no by default.

llvm-svn: 80981
2009-09-04 02:53:50 +00:00
Zhongxing Xu bfb000f337 move the check into MarkNoReturnFunction.
llvm-svn: 80980
2009-09-04 02:17:35 +00:00
Zhongxing Xu 1748d8a43d Extract mark-no-return-function code into a function.
llvm-svn: 80979
2009-09-04 02:13:36 +00:00
Jim Grosbach 1eaa90b901 Whitespace cleanup
llvm-svn: 80978
2009-09-04 01:38:51 +00:00
John McCall 06f6fe8df7 Correctly handle elaborated template ids. Still not handled properly for friends.
llvm-svn: 80977
2009-09-04 01:14:41 +00:00
Eric Christopher a3438c8bc2 If there's a calling convention attach it to the rewind function call.
llvm-svn: 80976
2009-09-04 01:14:14 +00:00
Bob Wilson e072f8eedb Convert a test to FileCheck.
llvm-svn: 80975
2009-09-04 00:32:31 +00:00
Evan Cheng 1f6e5eb07b Funky indentation.
llvm-svn: 80971
2009-09-03 23:54:22 +00:00
Daniel Dunbar a48a2f6055 Revert "--- Reverse-merging r80908 into '.':", I already "fixed" this.
llvm-svn: 80970
2009-09-03 23:40:10 +00:00
Dan Gohman e4ca02da1b Revert 80959. It isn't sufficient to solve the full problem. And it
introduced regressions in the Ocaml bindings tests.

llvm-svn: 80969
2009-09-03 23:34:49 +00:00
Erick Tryzelaar 19e1eec248 Replace ocamlc tests with ocamlopt tests since they're less noisy.
There's a bug with ocamlc that uses "char*" instead of "const char*" for
global string variables. This causes g++ to be very noisy when linking
ocamlc programs. That's why the ocaml test used to cat to /dev/null.
ocamlopt doesn't have this problem, so we can get rid of the >/dev/null,
which may obscure some problems.

llvm-svn: 80968
2009-09-03 23:27:31 +00:00