Commit Graph

108667 Commits

Author SHA1 Message Date
Douglas Gregor d29fde248e Eliminate an incomplete/incorrect attempt to provide support for C++0x
unrestricted unions, which ended up attempting to initialize objects
in a union (which CodeGen isn't prepared for). Fixes PR9683.

llvm-svn: 135027
2011-07-13 02:14:02 +00:00
Eli Friedman 609ada27ce Silliness with commas, as reported at http://blog.regehr.org/archives/558 . As it turns out, this is my fault for not noticing this was an issue when I was looking at this a long time ago. :(
llvm-svn: 135026
2011-07-13 02:05:57 +00:00
John McCall ca2c56f20b Switch delete[] IR-generation over to the destroy framework,
which implicitly makes it EH-safe as well.

llvm-svn: 135025
2011-07-13 01:41:37 +00:00
Evan Cheng 21e9051922 Add an entry.
llvm-svn: 135024
2011-07-13 01:33:00 +00:00
Bruno Cardoso Lopes 1021b4a9dd AVX Codegen support for 256-bit versions of vandps, vandpd, vorps, vorpd, vxorps, vxorpd
llvm-svn: 135023
2011-07-13 01:15:33 +00:00
Douglas Gregor 1c2e20d73d When compiling ::delete for a class with a virtual destructor, call
the complete destructor and then invoke the global delete
operator. Previously, we would invoke the deleting destructor, which
calls the wrong delete operator. Fixes PR10341.

llvm-svn: 135021
2011-07-13 00:54:47 +00:00
Bill Wendling ee6e776be2 Don't emit the FDE end label if the last thing emitted was a compact unwind and
not the FDE

llvm-svn: 135020
2011-07-13 00:49:09 +00:00
Johnny Chen 4c9c3ee08a Update docstrings for SBModeule/SBTarget::FindGlobalVariables().
llvm-svn: 135019
2011-07-13 00:46:49 +00:00
Eli Friedman 16323380cd Add an assert (which should never trigger) that triggers on a testcase I'm looking at.
llvm-svn: 135018
2011-07-13 00:44:29 +00:00
Evan Cheng f863e3fb73 Improve codegen for select's:
if (x != 0) x = 1
if (x == 1) x = 1

Previous codegen looks like this:
        mov     r1, r0
        cmp     r1, #1
        mov     r0, #0
        moveq   r0, #1

The naive lowering select between two different values. It should recognize the
test is equality test so it's more a conditional move rather than a select:
        cmp     r0, #1
        movne   r0, #0

rdar://9758317

llvm-svn: 135017
2011-07-13 00:42:17 +00:00
Johnny Chen 0d0dff4398 Add display of a static int variable to the test scenario.
llvm-svn: 135016
2011-07-13 00:31:31 +00:00
Bill Wendling 0402e8fe4b Assign variable before we test it.
llvm-svn: 135015
2011-07-13 00:23:39 +00:00
Bill Wendling ed3c44224b Fix obvious think-o.
llvm-svn: 135014
2011-07-13 00:20:09 +00:00
Bill Wendling 929b90ff32 Clean up the handling of an EBP/RBP unwind frame pointer. In particular, don't
assert when the frame pointer is -1 (i.e., the function is "frameless").

Still to do: "frameless" unwind information.

llvm-svn: 135013
2011-07-13 00:16:14 +00:00
Enrico Granata 79dce0a66e fixing missing RefCounter class
llvm-svn: 135012
2011-07-13 00:00:57 +00:00
Richard Smith 26935e60b6 Correctly set up the list of virtual base classes for a CXXRecordDecl. Previously we got the source range wrong for everything in the virtual bases list.
llvm-svn: 135011
2011-07-12 23:49:11 +00:00
Fariborz Jahanian c87c8799ec revert fix for // rdar://9740328
llvm-svn: 135010
2011-07-12 23:20:13 +00:00
Johnny Chen af6e82f611 Add a test case to exercise 'target variable' command before and after running the inferior.
Currently it fails after the inferior is run.

rdar://problem/9763907

llvm-svn: 135009
2011-07-12 23:18:03 +00:00
Enrico Granata 10bc1e5452 test cases
llvm-svn: 135008
2011-07-12 22:57:47 +00:00
Enrico Granata f4efecd958 smarter summary strings:
- formats %s %char[] %c and %a now work to print 0-terminated c-strings if they are applied to a char* or char[] even without the [] operator (e.g. ${var%s})
 - array formats (char[], intN[], ..) now work when applied to an array of a scalar type even without the [] operator (e.g. ${var%int32_t[]})
LLDB will not crash because of endless loop when trying to obtain a summary for an object that has no value and references itself in its summary string
In many cases, a wrong summary string will now display an "<error>" message instead of giving out an empty string

llvm-svn: 135007
2011-07-12 22:56:10 +00:00
Bill Wendling 5d11676eef There is a cyclic dependency between MC and Target if this method is out-of-line.
llvm-svn: 135006
2011-07-12 22:35:01 +00:00
Johnny Chen ef1c6845ae Fix short description of 'target variable' command.
llvm-svn: 135005
2011-07-12 22:34:30 +00:00
Bruno Cardoso Lopes 0aadf83f80 Revert r134946
llvm-svn: 135004
2011-07-12 22:30:58 +00:00
Argyrios Kyrtzidis a200973ead [arcmt] Also avoid 'weak' for forward references to objc classes.
llvm-svn: 135003
2011-07-12 22:16:25 +00:00
Argyrios Kyrtzidis ce9b739999 [arcmt] Before applying '__weak' check whether the objc class is annotated with objc_arc_weak_reference_unavailable
or is in a list of classes not supporting 'weak'.

rdar://9489367.

llvm-svn: 135002
2011-07-12 22:05:17 +00:00
Fariborz Jahanian c0f6af2103 objc++: Some level of covariance is allowed in ObjC properties.
Make it also available in ObjC++ propeties. // rdar://9740328

llvm-svn: 135001
2011-07-12 22:05:16 +00:00
Francois Pichet ce206000d3 Remove the const from Type after of Jay deconstify work.
llvm-svn: 135000
2011-07-12 22:04:11 +00:00
David Chisnall c2800aab7b Fix another typo (int -> id for captured_obj).
llvm-svn: 134998
2011-07-12 20:34:06 +00:00
John McCall 30317fda63 Generalize Cleanup::Emit's "isForEH" parameter into a set
of flags.  No functionality change.

llvm-svn: 134997
2011-07-12 20:27:29 +00:00
Peter Collingbourne 77b0e7f296 Implement -MG. Fixes PR9613
llvm-svn: 134996
2011-07-12 19:35:15 +00:00
Benjamin Kramer ae2d344384 Add more compiler workarounds. Should fix the build with old GCCs and MSVC.
llvm-svn: 134995
2011-07-12 18:37:23 +00:00
Benjamin Kramer 660e29828b Delete StructType bodies when destroying a StructType.
Leak found by valgrind.

llvm-svn: 134994
2011-07-12 18:22:07 +00:00
Douglas Gregor 7e6bfb4a0d In ARC mode, consider Objective-C lifetime types (object pointers and
block pointers) that don't have any qualification to be POD types. We
were previously considering them to be non-POD types, because this was
convenient in C++ for is_pod-like traits. However, we now end up
inferring lifetime in such cases (template arguments infer __strong),
so it is not necessary.

Moreover, we want rvalues of object type (which have their lifetime
stripped) to be PODs to allow, e.g., va_arg(arglist, id) to function
properly. Fixes <rdar://problem/9758798>.

llvm-svn: 134993
2011-07-12 17:28:52 +00:00
Fariborz Jahanian 7f4427fc60 Fix a bug where a local variable named 'self' is causing
implicit ivar accesses to go through the 'self' variable
rather than the real 'self' for the method. // rdar://9730771

llvm-svn: 134992
2011-07-12 17:16:56 +00:00
Raghesh Aloor 3cb6628d7c MemAccess: Reading Change in Access Function
This patch reads the change in access functions from
imported JSCOP file. A test case is also added.

llvm-svn: 134991
2011-07-12 17:14:03 +00:00
Greg Clayton d16e1e596a Added the ability to _not_ skip the prologue when settings breakpoints
by name by adding an extra parameter to the lldb_private::Target breakpoint 
setting functions.

Added a function in the DWARF symbol file plug-in that can dump errors
and prints out which DWARF file the error is happening in so we can track
down what used to be assertions easily.

Fixed the MacOSX kernel plug-in to properly read the kext images and set
the kext breakpoint to watch for kexts as they are loaded.

llvm-svn: 134990
2011-07-12 17:06:17 +00:00
John McCall 5fa8e20878 Ugh, use this compiler workaround again.
llvm-svn: 134989
2011-07-12 16:53:04 +00:00
John McCall 4bd0fb1f09 Switch field destruction over to use the new destroyer-based API
and kill a lot of redundant code.

llvm-svn: 134988
2011-07-12 16:41:08 +00:00
Jim Grosbach 992a2856f5 Add check for predicate w/o S bit.
llvm-svn: 134987
2011-07-12 16:25:04 +00:00
Jim Grosbach ade1fb17d4 Improve test cases from r134746.
Use memory barriers to force if-conversion off for these tests instead of
the internal llc command line option ifcvt-limit.

llvm-svn: 134986
2011-07-12 16:06:01 +00:00
Garrison Venn 76310ac9be Reverted 134901 because of 134959. Did not use svn merge -r but rather:
1,$s/llvm::Type::getInt\(..\)Ty(builder.getContext())/builder.getInt\1Ty()/g
1,$s/builder.getInt\(..*\)Ty()->getPointerTo()/builder.getInt\1PtrTy()/g

vi sub commands (second one was not a reversion but requested by 
Tobias Grosser.

Mod was tested, but other examples have failed to build as they are currently 
being thrashed with the const qualifier removal change.

llvm-svn: 134985
2011-07-12 15:34:42 +00:00
Douglas Gregor 2207ec273a Improve name mangling for instantiation-dependent types that are not
dependent. This covers an odd class of types such as

  int (&)[sizeof(sizeof(T() + T()))];

which involve template parameters but, because of some trick typically
involving a form of expression that is never type-dependent, resolve
down to a non-dependent type. Such types need to be mangled
essentially as they were written in the source code (involving
template parameters), rather than via their canonical type.

In general, instantiation-dependent types should be mangled as
they were written in the source. However, since we can't do that now
without non-trivial refactoring of the AST (see the new FIXME), I've
gone for this partial solution: only use the as-written-in-the-source
mangling for these strange types that are instantiation-dependent but
not dependent. This provides better compatibility with previous
incarnations of Clang and with GCC. In the future, we'd like to get
this right.

Fixes <rdar://problem/9663282>.

llvm-svn: 134984
2011-07-12 15:18:55 +00:00
Benjamin Kramer a4fb836f06 Pop block scope after reading from it.
Found by valgrind.

llvm-svn: 134983
2011-07-12 14:11:05 +00:00
Jay Foad b804a2b751 Second attempt at de-constifying LLVM Types in FunctionType::get(),
StructType::get() and TargetData::getIntPtrType().

llvm-svn: 134982
2011-07-12 14:06:48 +00:00
Tobias Grosser 0a33f7e678 www: Fix typo
llvm-svn: 134981
2011-07-12 12:43:00 +00:00
Tobias Grosser 851b96e7f0 Adapt to LLVM type system changes
Remove constness of Types and do not name the structures generated in the OpenMP
code.

llvm-svn: 134980
2011-07-12 12:42:54 +00:00
Tobias Grosser 585b36a1cb VectorType is also a SequentialType
llvm-svn: 134979
2011-07-12 11:37:02 +00:00
Tobias Grosser 6c3501d5c6 Remove IntegerType constness from TargetData
llvm-svn: 134978
2011-07-12 11:36:58 +00:00
Chandler Carruth 4678f67139 Work around a problem with a static helper's formulation in release
builds introduced in r134972:

lib/CodeGen/CGExpr.cpp:1294:7: error: no matching function for call to 'EmitBitCastOfLValueToProperType'
lib/CodeGen/CGExpr.cpp:1278:1: note: candidate function not viable: no known conversion from 'CGBuilderTy' (aka 'IRBuilder<false>') to 'llvm::IRBuilder<> &' for 1st argument

This fixes the issue by passing CodeGenFunction on down, and using its
builder directly rather than passing just the builder down.

This may not be the best / cleanest fix, Chris please review. It at
least fixes builds.

llvm-svn: 134977
2011-07-12 08:58:26 +00:00
Hans Wennborg 38198ded24 Fix typo correction crash on overloaded functions, pr10283.
It would be cool if we could do overload resolution to suggest
the right function, but at least this fixes the crashing.

llvm-svn: 134976
2011-07-12 08:45:31 +00:00