Commit Graph

147446 Commits

Author SHA1 Message Date
Douglas Gregor c9be4734d6 <rdar://problem/13615607> Include SDK version information in the module hash.
This is a Darwin-SDK-specific hash criteria used to identify a
particular SDK without having to hash the contents of all of its
headers. If other platforms have such versioned files, we should add
those checks here.

llvm-svn: 179346
2013-04-12 00:18:53 +00:00
Rafael Espindola ecf1320579 Add 179294 back, but don't use bit fields so that it works on big endian hosts.
Original message:

Print more information about relocations.

With this patch llvm-readobj now prints if a relocation is pcrel, its length,
if it is extern and if it is scattered.

It also refactors the code a bit to use bit fields instead of shifts and
masks all over the place.

llvm-svn: 179345
2013-04-12 00:17:33 +00:00
Chad Rosier 766d0dea11 Add test case for r179343.
llvm-svn: 179344
2013-04-11 23:57:29 +00:00
Chad Rosier b67f80571b [ms-inline asm] Add support for using the LENGTH, TYPE, and SIZE operators with
variables that use namespace alias qualifiers.  Test case coming on clang side
shortly.
Part of rdar://13499009

llvm-svn: 179343
2013-04-11 23:57:04 +00:00
Enrico Granata af5bbe8f74 New test suite option (-T)
When -T is specified, the test suite will call svn info and dump the output on screen (this used to be the default behavior)
When -T is not specified, this step won't be performed (the new default)

llvm-svn: 179342
2013-04-11 23:48:00 +00:00
Enrico Granata ea6a58e2ae When specifying a relative path for the --framework option to dotest.py, Python would end up being confused and unable to locate the embedded_interpreter module, causing every testcase that uses the Script Interpreter (e.g. functionalities/data-formatter/data-formatter-stl/libstdcpp) to fail without even trying
This checkin fixes that problem by absolutizing the path before pushing it to the sys.path

llvm-svn: 179341
2013-04-11 23:40:59 +00:00
Chad Rosier da0ab491b6 Test case for r179339.
llvm-svn: 179340
2013-04-11 23:37:53 +00:00
Chad Rosier ae7ecd6d8f [ms-inline asm] Add support for using offsetof operator with variables that use
namespace alias qualifiers.  Test case coming on clang side shortly.
Part of rdar://13499009

llvm-svn: 179339
2013-04-11 23:37:34 +00:00
John McCall 67517f0bc9 Flail at trying to appease various linuxy buildbots.
llvm-svn: 179338
2013-04-11 23:25:27 +00:00
Manman Ren 06a9d50a35 Aliasing rules for struct-path aware TBAA.
Added PathAliases to check if two struct-path tags can alias.
Added command line option -struct-path-tbaa.

llvm-svn: 179337
2013-04-11 23:24:18 +00:00
Chad Rosier ce03189b57 [ms-inline asm] Pass a StringRef reference to ParseIntelVarWithQualifier so we
can build up the identifier string.  No test case as support for looking up
these type of identifiers hasn't been implemented on the clang side.
Part of rdar://13499009

llvm-svn: 179336
2013-04-11 23:24:15 +00:00
Manman Ren e1ad74e6fd Struct-path aware TBAA: uniformize scalar tag and path tag.
For struct-path aware TBAA, we used to use scalar type node as the scalar tag,
which has an incompatible format with the struct path tag. We now use the same
format: base type, access type and offset.

We also uniformize the scalar type node and the struct type node: name, a list
of pairs (offset + pointer to MDNode). For scalar type, we have a single pair.
These are to make implementaiton of aliasing rules easier.

llvm-svn: 179335
2013-04-11 23:02:56 +00:00
John McCall 65b8da0623 Fix the driver logic for recent versions of DragonFly.
Patch by John Marino.

llvm-svn: 179334
2013-04-11 22:55:55 +00:00
Enrico Granata a0f9512cb1 <rdar://problem/13558484>
This makes the dynamic values test case work for both libc++ and libstdcpp

llvm-svn: 179333
2013-04-11 22:55:45 +00:00
Jim Ingham dbd3c4da5c Save away the locations at the site we hit and iterate over that collection. Otherwise the action of one location
could delete the other locations, and that would leave us iterating over a reduced size collection and crash.

<rdar://problem/13592544>

llvm-svn: 179332
2013-04-11 22:53:47 +00:00
Manman Ren c7a90202be TBAA: add utility to create a TBAA scalar type node
llvm-svn: 179331
2013-04-11 22:51:30 +00:00
Enrico Granata 4873e52733 <rdar://problem/13623698>
This patch fixes the issue that we were using the C stack as a measure of depth of ValueObject hierarchies, in the sense that we were assuming that recursive ValueObject operations would never be deeper than the stack allows.
This assumption is easy to prove wrong, however.
For instance, after ~10k runs through this loop:
struct node
{
	int value;
	node* child;
	node (int x)
	{
		value = x;
		child = nullptr;
	}
};

int main ()
{
	node root(1);
	node* ptr = &root;
	int j = 2;
	while (1)
	{
		ptr->child = new node(j++);
		ptr = ptr->child;
	}
	return 0;
}

the deepmost child object will be deeper than the stack on most architectures, and we would be unable to display it

This checkin fixes the issue by introducing a notion of root of ValueObject hierarchies.
In a couple cases, we have to use an iterative algorithm instead of going to the root because we want to allow deeper customizations (e.g. formats, dynamic values).
While the patch passes our test suite without regressions, it is a good idea to keep eyes open for any unexpected behavior (recursion can be subtle..)
Also, I am hesitant to introduce a test case since failing at this will not just be marked as an "F", but most definitely crash LLDB.

llvm-svn: 179330
2013-04-11 22:48:58 +00:00
Greg Clayton 3342b9b2c9 <rdar://problem/13370286>
Fixed a case there the OperatingSystemPython would try to access and play with SBValue objects when the process' public run lock was taken. Prior to this fix, all attempts to run any SBValue functions would fail if run from the private state thread (like updating the thread list). Now we have two run locks, one for public (all threads except the private state thread) and one for private.

llvm-svn: 179329
2013-04-11 22:26:47 +00:00
Greg Clayton 269c6e3507 Use std::unique_ptr instead of std::auto_ptr.
llvm-svn: 179328
2013-04-11 22:24:51 +00:00
Greg Clayton dda8c7d56f Fixed SBValueList to have a __str__ function like all other SB classes. Previously this was done as __repr__.
llvm-svn: 179327
2013-04-11 22:24:25 +00:00
Greg Clayton 39da3efdd6 Fixed the thread list so it correctly updates after the first core thread exists.
llvm-svn: 179326
2013-04-11 22:23:34 +00:00
Chad Rosier 1038105449 [ms-inline asm] Add a new AsmRewriteKind, AOK_Delete. To be used in a future
commit.
Part of rdar://13453209

llvm-svn: 179325
2013-04-11 22:00:03 +00:00
Chad Rosier 76154684e9 Update test case for r179323.
llvm-svn: 179324
2013-04-11 21:49:48 +00:00
Chad Rosier 8fb8330069 [ms-inline asm] Remove brackets from around a symbol reference in the target
specific logic.  This makes the code much less fragile.  Test case coming on the
clang side in a moment.
rdar://13634327

llvm-svn: 179323
2013-04-11 21:49:30 +00:00
Preston Gurd 6bda0db299 Use FileCheck instead of grep.
llvm-svn: 179322
2013-04-11 21:39:01 +00:00
Sean Callanan 3dd6a42306 Hand over the job of laying out the argument structure
to the Materializer.  Materialization is still done by
the ClangExpressionDeclMap; this will be the next thing
to move.

Also fixed a layout bug that this uncovered.

llvm-svn: 179318
2013-04-11 21:16:36 +00:00
David Majnemer 938493999e Fix undefined behavior in AArch64
A64Imms::isLogicalImmBits and A64Imms::isLogicalImm will attempt to
execute shifts that perform undefined behavior. Instead of attempting
to perform the 64-bit rotation, treat it as a no-op.

llvm-svn: 179317
2013-04-11 20:13:52 +00:00
David Majnemer b81cd63c4b Optimize icmp involving addition better
Allows LLVM to optimize sequences like the following:

%add = add nsw i32 %x, 1
%cmp = icmp sgt i32 %add, %y

into:

%cmp = icmp sge i32 %x, %y

as well as:

%add1 = add nsw i32 %x, 20
%add2 = add nsw i32 %y, 57
%cmp = icmp sge i32 %add1, %add2

into:

%add = add nsw i32 %y, 37
%cmp = icmp sle i32 %cmp, %x

llvm-svn: 179316
2013-04-11 20:05:46 +00:00
Jack Carter a16fa808d3 Mips specific inline asm memory operand modifier test case
These changes are based on commit responses for r179135.

llvm-svn: 179315
2013-04-11 19:39:19 +00:00
Akira Hatanaka 4f1130eb66 [mips] Custom-lower i64 MULHS and MULHU nodes. Remove the code which selects
multiply instructions in MipsSEDAGToDAGISel.

This patch was supposed to be part of r178403.

llvm-svn: 179314
2013-04-11 19:29:26 +00:00
Akira Hatanaka 52f79fcdae [mips] Clean up MipsISelDAGToDAG.cpp and MipsISelLowering.cpp.
- Rename function.
- Pass iterator by value.
- Remove header include.

No functionality changes.

llvm-svn: 179312
2013-04-11 19:07:14 +00:00
Reid Kleckner dac9342a52 Widen the checks in the ms abi memptr test to work under NDEBUG
llvm-svn: 179311
2013-04-11 19:01:17 +00:00
Jyotsna Verma 2147a3d039 Exclude test30 of Sema/return.c for Hexagon since setjmp.h include file
is unavailable for Hexagon.

llvm-svn: 179310
2013-04-11 18:56:34 +00:00
Bob Wilson 9c8af45a0c Add a new -mimplicit-float option for symmetry with -mno-implicit-float.
This new option is the default, but it is useful to have a flag to override
-mno-implicit-float by putting -mimplicit-float later on the command line.

llvm-svn: 179309
2013-04-11 18:53:25 +00:00
Reid Kleckner 96cf7adce2 Follow Jordan's advice and use {{^}} and {{$}} for this test
This is a better way of ensuring that we match the output of the
rewriter and not the CHECK line.

llvm-svn: 179308
2013-04-11 18:39:10 +00:00
Kostya Serebryany fd27b83ef2 [asan] inline flags(), up to 1% perf gain on malloc-intensive code
llvm-svn: 179307
2013-04-11 18:36:04 +00:00
Kostya Serebryany bb68f2cd65 [asan] make heavy_uar_test even heavier
llvm-svn: 179306
2013-04-11 18:27:02 +00:00
Reid Kleckner 2341ae3856 [ms-cxxabi] Implement member pointer emission and dereferencing
Summary:
Handles all inheritance models for both data and function member
pointers.

Also implements isZeroInitializable() and refactors some of the null
member pointer code.

MSVC supports converting member pointers through virtual bases, which
clang does not (yet?) support.  Implementing that extension is covered
by http://llvm.org/15713

Reviewers: rjmccall

CC: cfe-commits

Differential Revision: http://llvm-reviews.chandlerc.com/D613

llvm-svn: 179305
2013-04-11 18:13:19 +00:00
Sean Callanan 0ff3bf96f2 Handle C++ static variables in the expression
parser.

<rdar://problem/13631469>

llvm-svn: 179304
2013-04-11 17:57:16 +00:00
Rafael Espindola e2742a038c Revert my last two commits while I debug what is wrong in a big endian host.
llvm-svn: 179303
2013-04-11 17:46:10 +00:00
Argyrios Kyrtzidis e055d27e65 [PCH] Change test/PCH/headersearch.cpp to use -emit-llvm-only instead of -emit-obj
llvm-svn: 179301
2013-04-11 17:37:48 +00:00
Argyrios Kyrtzidis f646408ed5 [libclang] Improve a doxygen comment, as suggested by Jordan.
llvm-svn: 179300
2013-04-11 17:31:13 +00:00
Jyotsna Verma 2ddb2c825f Hexagon: Remove -g option from the assembler command line.
llvm-svn: 179299
2013-04-11 17:27:18 +00:00
Rafael Espindola 4c8ea76b6b Fix llvm-readobj tests on big endian hosts.
llvm-svn: 179298
2013-04-11 17:23:23 +00:00
Argyrios Kyrtzidis 1ab09cc883 [libclang] Have clang_getCXXAccessSpecifier() also return the access control of a C++ declaration within its parent scope.
Suggested by Stefan Seefeld.

llvm-svn: 179297
2013-04-11 17:02:10 +00:00
Greg Clayton 973b6c9b00 Static variables inside classes were not being added to the RecordDecl, now they are. This gets us closer to being able to display static variables in classes.
llvm-svn: 179296
2013-04-11 16:57:51 +00:00
Sylvestre Ledru 9eb4b33f85 cmake build of lldb was complaining about missing files.
Example:
CMake Error at cmake/modules/LLVMProcessSources.cmake:89 (message):
  Found unknown source file
  /llvm-toolchain-3.3~svn179293.cmake/tools/lldb/source/Plugins/Platform/MacOSX/PlatformDarwinKernel.cpp

llvm-svn: 179295
2013-04-11 16:32:47 +00:00
Rafael Espindola 708a44d464 Print more information about relocations.
With this patch llvm-readobj now prints if a relocation is pcrel, its length,
if it is extern and if it is scattered.

It also refactors the code a bit to use bit fields instead of shifts and
masks all over the place.

llvm-svn: 179294
2013-04-11 16:31:37 +00:00
Alexey Samsonov 9f3938e271 Explicitly list all sanitizer headers in CMake build rules. Make sure sanitizer lit_tests depend on fresh headers.
llvm-svn: 179293
2013-04-11 15:49:52 +00:00
Kostya Serebryany 1c77de3aeb [asan] improve the UAR reporting (try harder to find the correct frame), try to make the test more stable
llvm-svn: 179292
2013-04-11 15:35:40 +00:00