Commit Graph

105386 Commits

Author SHA1 Message Date
Devang Patel 3fd06f760b Preserve line number information.
llvm-svn: 131112
2011-05-10 00:03:11 +00:00
Johnny Chen 339ac4369d Add TestExprs2.py for recent check-ins related to the 'expression' subsystem.
llvm-svn: 131111
2011-05-09 23:41:06 +00:00
Caroline Tice 9088b06899 Make sure writing asynchronous output only backs up
& overwrites prompt if the IOChannel input reader is the top
input reader.

llvm-svn: 131110
2011-05-09 23:06:58 +00:00
Douglas Gregor 0f8bc97abd Ignore const/volatile/restrict qualifiers on anonymous structs and
unions. Fixes PR8326.

llvm-svn: 131109
2011-05-09 23:05:33 +00:00
Francois Pichet 16c9491f48 Add a FIXME.
llvm-svn: 131108
2011-05-09 22:32:46 +00:00
Devang Patel 589845d887 Do not ignore InlinedAt while walking up scope chain to find subprogram node.
llvm-svn: 131106
2011-05-09 22:14:49 +00:00
Sean Callanan e359d9b771 Fixed a bug in which expression-local variables were
treated as being permanently resident in target
memory.  In fact, since the expression's stack frame
is deleted and potentially re-used after the
expression completes, the variables need to be treated
as being freeze-dried.

llvm-svn: 131104
2011-05-09 22:04:36 +00:00
Fariborz Jahanian 7adbed6b4d 'long long' requires special treatment in ms_struct
structs (impacts 32-bit only though).

llvm-svn: 131103
2011-05-09 22:03:17 +00:00
Douglas Gregor 5d1d9e381e Extend the tag-ambiguity hack I committed in r130810 for tag
definitions to also include tag declarations. Fixes PR8151.

llvm-svn: 131102
2011-05-09 21:46:33 +00:00
Alexis Hunt 88c75c311f Clean up trivial default constructors now.
hasTrivialDefaultConstructor() really really means it now.

Also implement a fun standards bug regarding aggregates. Doug, if you'd
like, I can un-implement that bug if you think it is truly a defect.

The bug is that non-special-member constructors are never considered
user-provided, so the following is an aggregate:

struct foo {
  foo(int);
};

It's kind of bad, but the solution isn't obvious - should

struct foo {
  foo (int) = delete;
};

be an aggregate or not?

Lastly, add a missing initialization to FunctionDecl.

llvm-svn: 131101
2011-05-09 21:45:35 +00:00
Johnny Chen fa92ecc3e8 Add a test case test_process_info_with_no_arg(self) to 'class PlatformCommandTestCase'
for http://llvm.org/viewvc/llvm-project?rev=131089&view=rev.

llvm-svn: 131100
2011-05-09 20:51:47 +00:00
Douglas Gregor a7203e537d When determining whether we need to instantiate a function type,
also consider whether any of the parameter types (as written, prior to
decay) are dependent. Fixes PR9880 and <rdar://problem/9408413>.

llvm-svn: 131099
2011-05-09 20:45:16 +00:00
Eric Christopher 539ec3ae90 Check architectures to make sure that we can build for all of them
before we try to.

Patch by Patrick Walton!

llvm-svn: 131098
2011-05-09 20:24:43 +00:00
Greg Clayton b74944a829 Revert some unintended project changes from my last checkin.
llvm-svn: 131097
2011-05-09 20:23:10 +00:00
Greg Clayton 7349bd9078 While implementing unwind information using UnwindAssemblyInstEmulation I ran
into some cleanup I have been wanting to do when reading/writing registers.
Previously all RegisterContext subclasses would need to implement:

virtual bool
ReadRegisterBytes (uint32_t reg, DataExtractor &data);

virtual bool
WriteRegisterBytes (uint32_t reg, DataExtractor &data, uint32_t data_offset = 0);

There is now a new class specifically designed to hold register values: 
        lldb_private::RegisterValue
        
The new register context calls that subclasses must implement are:

virtual bool
ReadRegister (const RegisterInfo *reg_info, RegisterValue &reg_value) = 0;

virtual bool
WriteRegister (const RegisterInfo *reg_info, const RegisterValue &reg_value) = 0;

The RegisterValue class must be big enough to handle any register value. The
class contains an enumeration for the value type, and then a union for the 
data value. Any integer/float values are stored directly in an appropriate
host integer/float. Anything bigger is stored in a byte buffer that has a length
and byte order. The RegisterValue class also knows how to copy register value
bytes into in a buffer with a specified byte order which can be used to write
the register value down into memory, and this does the right thing when not
all bytes from the register values are needed (getting a uint8 from a uint32
register value..). 

All RegiterContext and other sources have been switched over to using the new
regiter value class.

llvm-svn: 131096
2011-05-09 20:18:18 +00:00
Jim Grosbach 112a2de78c Tidy up. 80-column and whitespace.
llvm-svn: 131094
2011-05-09 20:05:25 +00:00
Eric Christopher 4480428474 Look through struct wrapped types for inline asm statments.
Patch by Evan Cheng.

llvm-svn: 131093
2011-05-09 20:04:43 +00:00
Howard Hinnant 0cfdb9517e Updated type_traits and the type_traits design doc with recent work done in clang.
llvm-svn: 131090
2011-05-09 19:21:17 +00:00
Johnny Chen 3173e27e9f Fix the wrong error message for "platform process info", i.e., with no pid(s) specified for the command.
llvm-svn: 131089
2011-05-09 19:05:46 +00:00
Dan Gohman 0daf687e1d Change a few std::maps to DenseMaps.
llvm-svn: 131088
2011-05-09 18:44:09 +00:00
Alexis Hunt f479f1b7e4 Rename "hasTrivialConstructor" to "hasTrivialDefaultConstructor" and
modify the semantics slightly to accomodate default constructors (I
hope).

llvm-svn: 131087
2011-05-09 18:22:59 +00:00
Eric Christopher 5dc19f916c Fix td file comments for Mips.
Patch by Liu <proljc@gmail.com>!

llvm-svn: 131086
2011-05-09 18:16:46 +00:00
Mon P Wang 92ff16b7bb Fixed MC encoding for index_align for VLD1/VST1 (single element from one lane) for size 32
llvm-svn: 131085
2011-05-09 17:47:27 +00:00
Daniel Dunbar eb86b04595 Driver/Darwin: Put dsymutil -o arguments first, so that dysmutil doesn't barf
when POSIXLY_COMPLIANT is set.
 - Patch by Dave Vasilevsky!

llvm-svn: 131084
2011-05-09 17:23:16 +00:00
Duncan Sands 6be291a2cd Indent properly, no functionality change.
llvm-svn: 131082
2011-05-09 08:03:33 +00:00
Greg Clayton 0e4851641f Fixed an issue with the MacOSX backchain register context where the pc was
being returned for both the PC and FP.

llvm-svn: 131081
2011-05-09 03:39:34 +00:00
John McCall e155a3d8aa __builtin_va_list is void* on ARM, not char*.
rdar://problem/9391966

llvm-svn: 131080
2011-05-09 02:19:37 +00:00
Jim Ingham 1a414cfb5d Change an unconditional log to a conditional one.
llvm-svn: 131079
2011-05-09 01:06:45 +00:00
NAKAMURA Takumi 392445823d Eliminate an unused line to fix a warning.
llvm-svn: 131078
2011-05-08 23:19:04 +00:00
Francois Pichet a7c8da40a8 Fix test.
llvm-svn: 131077
2011-05-08 23:15:10 +00:00
Francois Pichet bc6ebb5b76 Allow implicit conversion from function pointer to void* in Microsoft mode.
Necessary to parse MFC code.

llvm-svn: 131076
2011-05-08 22:52:41 +00:00
Anders Carlsson c36783e8b9 Move code to emit the callee of an CXXOperatorCallExpr out into a separate function in CGClass.cpp
llvm-svn: 131075
2011-05-08 20:32:23 +00:00
Alexis Hunt d8ee4beff4 Restore an accidentally-deleted word.
llvm-svn: 131074
2011-05-08 20:15:27 +00:00
Jakob Stoklund Olesen 89bd2ae517 Remove an assertion to fix PR9872.
It can happen that a live debug variable is the last use of a sub-register, and
the register allocator will pick a larger register class for the virtual
register.  If the allocated register doesn't support the sub-register index,
just use %noreg for the debug variables instead of asserting.

In PR9872, a debug variable ends up in the sub_8bit_hi part of a GR32_ABCD
register. The register is split and one part is inflated to GR32 and assigned
%ESI because there are no more normal uses of sub_8bit_hi.

Since %ESI doesn't have that sub-register, substPhysReg asserted. Now it will
simply insert a %noreg instead, and the debug variable will be marked
unavailable in that range.

We don't currently have a way of saying: !"value" is in bits 8-15 of %ESI, I
don't know if DWARF even supports that.

llvm-svn: 131073
2011-05-08 19:21:08 +00:00
Johnny Chen 2158b97358 Fix docstring.
llvm-svn: 131072
2011-05-08 18:55:37 +00:00
Benjamin Kramer d724a590e5 X86: Add a bunch of peeps for add and sub of SETB.
"b + ((a < b) ? 1 : 0)" compiles into
	cmpl	%esi, %edi
	adcl	$0, %esi
instead of
	cmpl	%esi, %edi
	sbbl	%eax, %eax
	andl	$1, %eax
	addl	%esi, %eax

This saves a register, a false dependency on %eax
(Intel's CPUs still don't ignore it) and it's shorter.

llvm-svn: 131070
2011-05-08 18:36:07 +00:00
Johnny Chen b21c52eac8 Add test scenario to verify 'eax' register is available when launching the i386 slice
of a universal binary and 'rax' register is available when launching the x86_64 slice.

rdar://problem/9403437

llvm-svn: 131069
2011-05-08 17:25:27 +00:00
Anders Carlsson cc53197903 Don't emit complete constructors for abstract classes. Also, don't emit
complete destructors for abstract classes unless the destructor is virtual
and thus needs to be in the vtable.

llvm-svn: 131068
2011-05-08 17:25:05 +00:00
Rafael Espindola ab39c63538 Don't force relaxation of AdvanceLoc instructions on OS X. gdb is happy with
the smaller encoding and this cuts 270336 bytes from a release version of
clang and 1246272 bytes from a debug build.

llvm-svn: 131067
2011-05-08 14:35:21 +00:00
Francois Pichet 59d2b017d7 Look at all the record redeclaration when looking for a uuid attribute.
llvm-svn: 131066
2011-05-08 10:02:20 +00:00
Douglas Gregor f30053d18d Relax the conversion rules for Objective-C GC qualifiers a
bit by allowing __weak and __strong to be added/dropped as part of
implicit conversions (qualification conversions in C++). A little
history: GCC lets one add/remove/change GC qualifiers just about
anywhere, implicitly. Clang did roughly the same before, but we
recently normalized the semantics of qualifiers across the board to
get a semantics that we could reason about (yay). Unfortunately, this
tightened the screws a bit too much for GC qualifiers, where it's
common to add/remove these qualifiers at will.

Overall, we're still in better shape than we were before: we don't
permit directly changing the GC qualifier (e.g., __weak -> __strong),
so type safety is improved. More importantly, we're internally
consistent in our handling of qualifiers, and the logic that allows
adding/removing GC qualifiers (but not adding/removing address
spaces!) only touches two obvious places.

Fixes <rdar://problem/9402499>.

llvm-svn: 131065
2011-05-08 06:09:53 +00:00
Greg Clayton c4103b3c2f Fixed not being able to launch the i386 slice of a universal binary by adding
a new "QLaunchArch:<arch-name>" where <arch-name> is the architecture name.
This allows us to remotely launch a debugserver and then set the architecture
for the binary we will launch.

llvm-svn: 131064
2011-05-08 04:53:50 +00:00
Sean Callanan d9ca42aa4f Added support for reading untyped symbols. Right now
they are treated as pointers of type (void*).  This
allows reading of environ, for instance.

llvm-svn: 131063
2011-05-08 02:21:26 +00:00
Eli Friedman aa2637343c PR9869: Add explicit destructor declarations to Operator subclasses, to allow
compiling Operator.h with gcc 4.6 in C++0x mode.

llvm-svn: 131062
2011-05-08 01:59:22 +00:00
Jim Ingham 9b70ddb305 StepUntil should check whether the target of the step until is in the current
function and if not return an error.

llvm-svn: 131061
2011-05-08 00:56:32 +00:00
Douglas Gregor 2d1c055eba In C++, allow us to emit a global as 'constant' even if it has class
type, so long as it is known to have a constant initializer and the
class type is a POD class. Fixes <rdar://problem/9306265>.

llvm-svn: 131060
2011-05-07 22:06:45 +00:00
Jakob Stoklund Olesen c132174169 Eliminate the ARM sub-register indexes that are not needed by the sources.
Tablegen will invent its own names for these indexes, and the register file is a
bit simpler.

llvm-svn: 131059
2011-05-07 21:22:42 +00:00
Jakob Stoklund Olesen c8c4ded3c6 Teach TableGen to automatically generate missing SubRegIndex instances.
The RegisterInfo.td file should only specify the indexes that sources need to
refer to. The rest is inferred.

llvm-svn: 131058
2011-05-07 21:22:39 +00:00
Douglas Gregor 9ca5465500 Revert r130717, which caused a regression (<rdar://problem/9402621>).
llvm-svn: 131057
2011-05-07 20:12:26 +00:00
Eli Friedman 6dec2aa9b4 Fix comments per Duncan's review.
llvm-svn: 131055
2011-05-07 19:23:14 +00:00