platform/upstream/llvm.git
11 years ago[sanitizer] Add syscall handlers to ASan and TSan runtimes.
Evgeniy Stepanov [Fri, 12 Apr 2013 14:57:03 +0000 (14:57 +0000)]
[sanitizer] Add syscall handlers to ASan and TSan runtimes.

ASan checks addressability of syscall arguments. TSan does nothing for now.

llvm-svn: 179380

11 years agoRevamps structural error detection / handling.
Manuel Klimek [Fri, 12 Apr 2013 14:13:36 +0000 (14:13 +0000)]
Revamps structural error detection / handling.

Previously we'd only detect structural errors on the very first level.
This leads to incorrectly balanced braces not being discovered, and thus
incorrect indentation.

This change fixes the problem by:
- changing the parser to use an error state that can be detected
  anywhere inside the productions, for example if we get an eof on
  SOME_MACRO({ some block <eof>
- previously we'd never break lines when we discovered a structural
  error; now we break even in the case of a structural error if there
  are two unwrapped lines within the same line; thus,
  void f() { while (true) { g(); y(); } }
  will still be re-formatted, even if there's missing braces somewhere
  in the file
- still exclude macro definitions from generating structural error;
  macro definitions are inbalanced snippets

llvm-svn: 179379

11 years ago[sanitizer] More syscall handler placeholders.
Evgeniy Stepanov [Fri, 12 Apr 2013 14:06:40 +0000 (14:06 +0000)]
[sanitizer] More syscall handler placeholders.

This time it's the full list scavenged from syscalls.h
Fixed return value type.

llvm-svn: 179378

11 years agoFix clang-format-diff.py script.
Daniel Jasper [Fri, 12 Apr 2013 13:42:36 +0000 (13:42 +0000)]
Fix clang-format-diff.py script.

llvm-svn: 179377

11 years agoAArch64: use full triple for ELF tests
Tim Northover [Fri, 12 Apr 2013 12:54:58 +0000 (12:54 +0000)]
AArch64: use full triple for ELF tests

These tests rely specifically on the names of ELF relocations, let alone any
other detail. There's no way they'd work if LLVM was emitting something else by
default.

llvm-svn: 179376

11 years agoAArch64: remove over-zealous use of CHECK-NEXT
Tim Northover [Fri, 12 Apr 2013 12:54:49 +0000 (12:54 +0000)]
AArch64: remove over-zealous use of CHECK-NEXT

It turns out some platforms (e.g. Windows) lay out their llvm-mc slightly
differently with extra newlines; there was no real reason for the test lines to
be consecutive, so this relaxes the FileCheck.

llvm-svn: 179375

11 years agoRevert broken pieces of r179373.
Benjamin Kramer [Fri, 12 Apr 2013 12:13:51 +0000 (12:13 +0000)]
Revert broken pieces of r179373.

You can't copy an OwningPtr, and move semantics aren't available in C++98.

llvm-svn: 179374

11 years agoReplace uses of the deprecated std::auto_ptr with OwningPtr.
Andy Gibbs [Fri, 12 Apr 2013 10:56:28 +0000 (10:56 +0000)]
Replace uses of the deprecated std::auto_ptr with OwningPtr.

llvm-svn: 179373

11 years agoProvide better emacs integration.
Daniel Jasper [Fri, 12 Apr 2013 10:12:01 +0000 (10:12 +0000)]
Provide better emacs integration.

The new emacs integration is simpler, does not save the current file
before reformatting and ensures that emacs does not scroll as a result
of formatting.

Also explicitly set the style in clang-format tests to make them more
robust.

llvm-svn: 179372

11 years agoFinally drop the 'static' from INLINE and ALWAYS_INLINE
Timur Iskhodzhanov [Fri, 12 Apr 2013 09:37:20 +0000 (09:37 +0000)]
Finally drop the 'static' from INLINE and ALWAYS_INLINE

The ALWAYS_INLINE doesn't have static on POSIX anyways since r178341; the INLINE is only used in .h files, so shouldn't have been 'static' in the first place

llvm-svn: 179371

11 years agoFix a disconcerting bug in Value::isUsedInBasicBlock, which gave wrong answers for...
Benjamin Kramer [Fri, 12 Apr 2013 08:33:11 +0000 (08:33 +0000)]
Fix a disconcerting bug in Value::isUsedInBasicBlock, which gave wrong answers for blocks larger than 3 instrs.

Also add a unit test. PR15727.

llvm-svn: 179370

11 years ago[MSan] Demangle function name in description of stack origin
Alexey Samsonov [Fri, 12 Apr 2013 07:27:30 +0000 (07:27 +0000)]
[MSan] Demangle function name in description of stack origin

llvm-svn: 179368

11 years agoDon't explicitly provide -pie in MSan bootstrap of LLVM, as it's now implied by the...
Alexey Samsonov [Fri, 12 Apr 2013 07:18:55 +0000 (07:18 +0000)]
Don't explicitly provide -pie in MSan bootstrap of LLVM, as it's now implied by the driver

llvm-svn: 179367

11 years ago[MSan] don't build tests with -fPIE/-pie, as these flags are implied by -fsanitize...
Alexey Samsonov [Fri, 12 Apr 2013 07:14:04 +0000 (07:14 +0000)]
[MSan] don't build tests with -fPIE/-pie, as these flags are implied by -fsanitize=memory now

llvm-svn: 179366

11 years ago[TSan] remove -fPIE -pie from TSan lit tests to check that -fsanitize=thread implies...
Alexey Samsonov [Fri, 12 Apr 2013 07:11:00 +0000 (07:11 +0000)]
[TSan] remove -fPIE -pie from TSan lit tests to check that -fsanitize=thread implies them now

llvm-svn: 179365

11 years agoReplace elf-dump with llvm-readobj in lld tests
Nico Rieck [Fri, 12 Apr 2013 04:29:01 +0000 (04:29 +0000)]
Replace elf-dump with llvm-readobj in lld tests

llvm-svn: 179364

11 years agoTeach llvm-readobj to print ELF program headers
Nico Rieck [Fri, 12 Apr 2013 04:07:39 +0000 (04:07 +0000)]
Teach llvm-readobj to print ELF program headers

llvm-svn: 179363

11 years agoRemove obsolete object file dumpers
Nico Rieck [Fri, 12 Apr 2013 04:07:13 +0000 (04:07 +0000)]
Remove obsolete object file dumpers

llvm-svn: 179362

11 years agoReplace coff-/elf-dump with llvm-readobj
Nico Rieck [Fri, 12 Apr 2013 04:06:46 +0000 (04:06 +0000)]
Replace coff-/elf-dump with llvm-readobj

llvm-svn: 179361

11 years agoAdd extensive relocation tests for llvm-readobj
Nico Rieck [Fri, 12 Apr 2013 04:02:23 +0000 (04:02 +0000)]
Add extensive relocation tests for llvm-readobj

This test ensures that relocation type names returned by libObject match
the raw relocation type value.

llvm-svn: 179360

11 years agoAdd -expand-relocs to llvm-readobj
Nico Rieck [Fri, 12 Apr 2013 04:01:52 +0000 (04:01 +0000)]
Add -expand-relocs to llvm-readobj

This option expands shown relocations from single line to a dictionary
format:

  Relocation {
    Offset: 0x4
    Type: R_386_32 (1)
    Symbol: sym
    Info: 0x0
  }

llvm-svn: 179359

11 years agoAdd missing relocation names
Nico Rieck [Fri, 12 Apr 2013 04:01:28 +0000 (04:01 +0000)]
Add missing relocation names

llvm-svn: 179358

11 years agoSupport MIPS64EL relocation type names
Nico Rieck [Fri, 12 Apr 2013 03:59:28 +0000 (03:59 +0000)]
Support MIPS64EL relocation type names

MIPS64EL relocation entries have up to three relocation operations. Because
libObject only exposes a single relocation name, use the concatenation of
the individual relocation type names.

llvm-svn: 179357

11 years agoAdd PPC instruction record forms and associated query functions
Hal Finkel [Fri, 12 Apr 2013 02:18:09 +0000 (02:18 +0000)]
Add PPC instruction record forms and associated query functions

This is prep. work for the implementation of optimizeCompare. Many PPC
instructions have 'record' forms (in almost all cases, this means that the RC
bit is set) that cause the result of the instruction to be compared with zero,
and the result of that comparison saved in a predefined condition register. In
order to add the record forms of the instructions without too much
copy-and-paste, the relevant functions have been refactored into multiclasses
which define both the record and normal forms.

Also, two TableGen-generated mapping functions have been added which allow
querying the instruction code for the record form given the normal form (and
vice versa).

No functionality change intended.

llvm-svn: 179356

11 years agoDon't disable block layout when forcing block alignment.
Nadav Rotem [Fri, 12 Apr 2013 01:24:16 +0000 (01:24 +0000)]
Don't disable block layout when forcing block alignment.

llvm-svn: 179355

11 years agoFix the test on linux by setting the triple and the align format
Nadav Rotem [Fri, 12 Apr 2013 01:07:16 +0000 (01:07 +0000)]
Fix the test on linux by setting the triple and the align format

llvm-svn: 179354

11 years agoAdd a flag to align all basic blocks in the function.
Nadav Rotem [Fri, 12 Apr 2013 00:48:32 +0000 (00:48 +0000)]
Add a flag to align all basic blocks in the function.

When debugging performance regressions we often ask ourselves if the regression
that we see is due to poor isel/sched/ra or due to some micro-architetural
problem.  When comparing two code sequences one good way to rule out front-end
bottlenecks (and other the issues) is to force code alignment. This pass adds
a flag that forces the alignment of all of the basic blocks in the program.

llvm-svn: 179353

11 years ago[analyzer] Fix grammar in comment.
Jordan Rose [Fri, 12 Apr 2013 00:44:24 +0000 (00:44 +0000)]
[analyzer] Fix grammar in comment.

By Adam Schnitzer!

llvm-svn: 179352

11 years ago[analyzer] Show "Returning from ..." note at caller's depth, not callee's.
Jordan Rose [Fri, 12 Apr 2013 00:44:17 +0000 (00:44 +0000)]
[analyzer] Show "Returning from ..." note at caller's depth, not callee's.

Before:
  1. Calling 'foo'
    2. Doing something interesting
    3. Returning from 'foo'
  4. Some kind of error here

After:
  1. Calling 'foo'
    2. Doing something interesting
  3. Returning from 'foo'
  4. Some kind of error here

The location of the note is already in the caller, not the callee, so this
just brings the "depth" attribute in line with that.

This only affects plist diagnostic consumers (i.e. Xcode). It's necessary
for Xcode to associate the control flow arrows with the right stack frame.

<rdar://problem/13634363>

llvm-svn: 179351

11 years ago[analyzer] Don't emit extra context arrow after returning from an inlined call.
Jordan Rose [Fri, 12 Apr 2013 00:44:01 +0000 (00:44 +0000)]
[analyzer] Don't emit extra context arrow after returning from an inlined call.

In this code

  int getZero() {
    return 0;
  }

  void test() {
    int problem = 1 / getZero(); // expected-warning {{Division by zero}}
  }

we generate these arrows:

    +-----------------+
    |                 v
    int problem = 1 / getZero();
                  ^   |
                  +---+

where the top one represents the control flow up to the first call, and the
bottom one represents the flow to the division.* It turns out, however, that
we were generating the top arrow twice, as if attempting to "set up context"
after we had already returned from the call. This resulted in poor
highlighting in Xcode.

* Arguably the best location for the division is the '/', but that's a
  different problem.

<rdar://problem/13326040>

llvm-svn: 179350

11 years agoRemove REQUIRES now that r179237 fixed the real problem.
Rafael Espindola [Fri, 12 Apr 2013 00:32:20 +0000 (00:32 +0000)]
Remove REQUIRES now that r179237 fixed the real problem.

llvm-svn: 179349

11 years agoChange the default for PlatformDarwinKernel to be enabled a la
Jason Molenda [Fri, 12 Apr 2013 00:23:57 +0000 (00:23 +0000)]
Change the default for PlatformDarwinKernel to be enabled a la
settings set platform.plugin.darwin-kernel.search-locally-for-kexts true

llvm-svn: 179348

11 years agoMake sure we have the include paths we need
Douglas Gregor [Fri, 12 Apr 2013 00:23:25 +0000 (00:23 +0000)]
Make sure we have the include paths we need

llvm-svn: 179347

11 years ago<rdar://problem/13615607> Include SDK version information in the module hash.
Douglas Gregor [Fri, 12 Apr 2013 00:18:53 +0000 (00:18 +0000)]
<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

11 years agoAdd 179294 back, but don't use bit fields so that it works on big endian hosts.
Rafael Espindola [Fri, 12 Apr 2013 00:17:33 +0000 (00:17 +0000)]
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

11 years agoAdd test case for r179343.
Chad Rosier [Thu, 11 Apr 2013 23:57:29 +0000 (23:57 +0000)]
Add test case for r179343.

llvm-svn: 179344

11 years ago[ms-inline asm] Add support for using the LENGTH, TYPE, and SIZE operators with
Chad Rosier [Thu, 11 Apr 2013 23:57:04 +0000 (23:57 +0000)]
[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

11 years agoNew test suite option (-T)
Enrico Granata [Thu, 11 Apr 2013 23:48:00 +0000 (23:48 +0000)]
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

11 years agoWhen specifying a relative path for the --framework option to dotest.py, Python would...
Enrico Granata [Thu, 11 Apr 2013 23:40:59 +0000 (23:40 +0000)]
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

11 years agoTest case for r179339.
Chad Rosier [Thu, 11 Apr 2013 23:37:53 +0000 (23:37 +0000)]
Test case for r179339.

llvm-svn: 179340

11 years ago[ms-inline asm] Add support for using offsetof operator with variables that use
Chad Rosier [Thu, 11 Apr 2013 23:37:34 +0000 (23:37 +0000)]
[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

11 years agoFlail at trying to appease various linuxy buildbots.
John McCall [Thu, 11 Apr 2013 23:25:27 +0000 (23:25 +0000)]
Flail at trying to appease various linuxy buildbots.

llvm-svn: 179338

11 years agoAliasing rules for struct-path aware TBAA.
Manman Ren [Thu, 11 Apr 2013 23:24:18 +0000 (23:24 +0000)]
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

11 years ago[ms-inline asm] Pass a StringRef reference to ParseIntelVarWithQualifier so we
Chad Rosier [Thu, 11 Apr 2013 23:24:15 +0000 (23:24 +0000)]
[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

11 years agoStruct-path aware TBAA: uniformize scalar tag and path tag.
Manman Ren [Thu, 11 Apr 2013 23:02:56 +0000 (23:02 +0000)]
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

11 years agoFix the driver logic for recent versions of DragonFly.
John McCall [Thu, 11 Apr 2013 22:55:55 +0000 (22:55 +0000)]
Fix the driver logic for recent versions of DragonFly.

Patch by John Marino.

llvm-svn: 179334

11 years ago<rdar://problem/13558484>
Enrico Granata [Thu, 11 Apr 2013 22:55:45 +0000 (22:55 +0000)]
<rdar://problem/13558484>

This makes the dynamic values test case work for both libc++ and libstdcpp

llvm-svn: 179333

11 years agoSave away the locations at the site we hit and iterate over that collection. Otherwi...
Jim Ingham [Thu, 11 Apr 2013 22:53:47 +0000 (22:53 +0000)]
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

11 years agoTBAA: add utility to create a TBAA scalar type node
Manman Ren [Thu, 11 Apr 2013 22:51:30 +0000 (22:51 +0000)]
TBAA: add utility to create a TBAA scalar type node

llvm-svn: 179331

11 years ago<rdar://problem/13623698>
Enrico Granata [Thu, 11 Apr 2013 22:48:58 +0000 (22:48 +0000)]
<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

11 years ago<rdar://problem/13370286>
Greg Clayton [Thu, 11 Apr 2013 22:26:47 +0000 (22:26 +0000)]
<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

11 years agoUse std::unique_ptr instead of std::auto_ptr.
Greg Clayton [Thu, 11 Apr 2013 22:24:51 +0000 (22:24 +0000)]
Use std::unique_ptr instead of std::auto_ptr.

llvm-svn: 179328

11 years agoFixed SBValueList to have a __str__ function like all other SB classes. Previously...
Greg Clayton [Thu, 11 Apr 2013 22:24:25 +0000 (22:24 +0000)]
Fixed SBValueList to have a __str__ function like all other SB classes. Previously this was done as __repr__.

llvm-svn: 179327

11 years agoFixed the thread list so it correctly updates after the first core thread exists.
Greg Clayton [Thu, 11 Apr 2013 22:23:34 +0000 (22:23 +0000)]
Fixed the thread list so it correctly updates after the first core thread exists.

llvm-svn: 179326

11 years ago[ms-inline asm] Add a new AsmRewriteKind, AOK_Delete. To be used in a future
Chad Rosier [Thu, 11 Apr 2013 22:00:03 +0000 (22:00 +0000)]
[ms-inline asm] Add a new AsmRewriteKind, AOK_Delete.  To be used in a future
commit.
Part of rdar://13453209

llvm-svn: 179325

11 years agoUpdate test case for r179323.
Chad Rosier [Thu, 11 Apr 2013 21:49:48 +0000 (21:49 +0000)]
Update test case for r179323.

llvm-svn: 179324

11 years ago[ms-inline asm] Remove brackets from around a symbol reference in the target
Chad Rosier [Thu, 11 Apr 2013 21:49:30 +0000 (21:49 +0000)]
[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

11 years agoUse FileCheck instead of grep.
Preston Gurd [Thu, 11 Apr 2013 21:39:01 +0000 (21:39 +0000)]
Use FileCheck instead of grep.

llvm-svn: 179322

11 years agoHand over the job of laying out the argument structure
Sean Callanan [Thu, 11 Apr 2013 21:16:36 +0000 (21:16 +0000)]
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

11 years agoFix undefined behavior in AArch64
David Majnemer [Thu, 11 Apr 2013 20:13:52 +0000 (20:13 +0000)]
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

11 years agoOptimize icmp involving addition better
David Majnemer [Thu, 11 Apr 2013 20:05:46 +0000 (20:05 +0000)]
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

11 years agoMips specific inline asm memory operand modifier test case
Jack Carter [Thu, 11 Apr 2013 19:39:19 +0000 (19:39 +0000)]
Mips specific inline asm memory operand modifier test case

These changes are based on commit responses for r179135.

llvm-svn: 179315

11 years ago[mips] Custom-lower i64 MULHS and MULHU nodes. Remove the code which selects
Akira Hatanaka [Thu, 11 Apr 2013 19:29:26 +0000 (19:29 +0000)]
[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

11 years ago[mips] Clean up MipsISelDAGToDAG.cpp and MipsISelLowering.cpp.
Akira Hatanaka [Thu, 11 Apr 2013 19:07:14 +0000 (19:07 +0000)]
[mips] Clean up MipsISelDAGToDAG.cpp and MipsISelLowering.cpp.

- Rename function.
- Pass iterator by value.
- Remove header include.

No functionality changes.

llvm-svn: 179312

11 years agoWiden the checks in the ms abi memptr test to work under NDEBUG
Reid Kleckner [Thu, 11 Apr 2013 19:01:17 +0000 (19:01 +0000)]
Widen the checks in the ms abi memptr test to work under NDEBUG

llvm-svn: 179311

11 years agoExclude test30 of Sema/return.c for Hexagon since setjmp.h include file
Jyotsna Verma [Thu, 11 Apr 2013 18:56:34 +0000 (18:56 +0000)]
Exclude test30 of Sema/return.c for Hexagon since setjmp.h include file
is unavailable for Hexagon.

llvm-svn: 179310

11 years agoAdd a new -mimplicit-float option for symmetry with -mno-implicit-float.
Bob Wilson [Thu, 11 Apr 2013 18:53:25 +0000 (18:53 +0000)]
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

11 years agoFollow Jordan's advice and use {{^}} and {{$}} for this test
Reid Kleckner [Thu, 11 Apr 2013 18:39:10 +0000 (18:39 +0000)]
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

11 years ago[asan] inline flags(), up to 1% perf gain on malloc-intensive code
Kostya Serebryany [Thu, 11 Apr 2013 18:36:04 +0000 (18:36 +0000)]
[asan] inline flags(), up to 1% perf gain on malloc-intensive code

llvm-svn: 179307

11 years ago[asan] make heavy_uar_test even heavier
Kostya Serebryany [Thu, 11 Apr 2013 18:27:02 +0000 (18:27 +0000)]
[asan] make heavy_uar_test even heavier

llvm-svn: 179306

11 years ago[ms-cxxabi] Implement member pointer emission and dereferencing
Reid Kleckner [Thu, 11 Apr 2013 18:13:19 +0000 (18:13 +0000)]
[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

11 years agoHandle C++ static variables in the expression
Sean Callanan [Thu, 11 Apr 2013 17:57:16 +0000 (17:57 +0000)]
Handle C++ static variables in the expression
parser.

<rdar://problem/13631469>

llvm-svn: 179304

11 years agoRevert my last two commits while I debug what is wrong in a big endian host.
Rafael Espindola [Thu, 11 Apr 2013 17:46:10 +0000 (17:46 +0000)]
Revert my last two commits while I debug what is wrong in a big endian host.

llvm-svn: 179303

11 years ago[PCH] Change test/PCH/headersearch.cpp to use -emit-llvm-only instead of -emit-obj
Argyrios Kyrtzidis [Thu, 11 Apr 2013 17:37:48 +0000 (17:37 +0000)]
[PCH] Change test/PCH/headersearch.cpp to use -emit-llvm-only instead of -emit-obj

llvm-svn: 179301

11 years ago[libclang] Improve a doxygen comment, as suggested by Jordan.
Argyrios Kyrtzidis [Thu, 11 Apr 2013 17:31:13 +0000 (17:31 +0000)]
[libclang] Improve a doxygen comment, as suggested by Jordan.

llvm-svn: 179300

11 years agoHexagon: Remove -g option from the assembler command line.
Jyotsna Verma [Thu, 11 Apr 2013 17:27:18 +0000 (17:27 +0000)]
Hexagon: Remove -g option from the assembler command line.

llvm-svn: 179299

11 years agoFix llvm-readobj tests on big endian hosts.
Rafael Espindola [Thu, 11 Apr 2013 17:23:23 +0000 (17:23 +0000)]
Fix llvm-readobj tests on big endian hosts.

llvm-svn: 179298

11 years ago[libclang] Have clang_getCXXAccessSpecifier() also return the access control of a...
Argyrios Kyrtzidis [Thu, 11 Apr 2013 17:02:10 +0000 (17:02 +0000)]
[libclang] Have clang_getCXXAccessSpecifier() also return the access control of a C++ declaration within its parent scope.

Suggested by Stefan Seefeld.

llvm-svn: 179297

11 years agoStatic variables inside classes were not being added to the RecordDecl, now they...
Greg Clayton [Thu, 11 Apr 2013 16:57:51 +0000 (16:57 +0000)]
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

11 years agocmake build of lldb was complaining about missing files.
Sylvestre Ledru [Thu, 11 Apr 2013 16:32:47 +0000 (16:32 +0000)]
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

11 years agoPrint more information about relocations.
Rafael Espindola [Thu, 11 Apr 2013 16:31:37 +0000 (16:31 +0000)]
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

11 years agoExplicitly list all sanitizer headers in CMake build rules. Make sure sanitizer lit_t...
Alexey Samsonov [Thu, 11 Apr 2013 15:49:52 +0000 (15:49 +0000)]
Explicitly list all sanitizer headers in CMake build rules. Make sure sanitizer lit_tests depend on fresh headers.

llvm-svn: 179293

11 years ago[asan] improve the UAR reporting (try harder to find the correct frame), try to make...
Kostya Serebryany [Thu, 11 Apr 2013 15:35:40 +0000 (15:35 +0000)]
[asan] improve the UAR reporting (try harder to find the correct frame), try to make the test more stable

llvm-svn: 179292

11 years agoFix for wrong instcombine on vector insert/extract
Benjamin Kramer [Thu, 11 Apr 2013 15:10:09 +0000 (15:10 +0000)]
Fix for wrong instcombine on vector insert/extract

When trying to collapse sequences of insertelement/extractelement
instructions into single shuffle instructions, there is one specific
case where the Instruction Combiner wrongly updates the resulting
Mask of shuffle indexes.

The problem is in function CollectShuffleElments.

If we have a sequence of insert/extract element instructions
like the one below:

  %tmp1 = extractelement <4 x float> %LHS, i32 0
  %tmp2 = insertelement <4 x float> %RHS, float %tmp1, i32 1
  %tmp3 = extractelement <4 x float> %RHS, i32 2
  %tmp4 = insertelement <4 x float> %tmp2, float %tmp3, i32 3

Where:
  . %RHS will have a mask of [4,5,6,7]
  . %LHS will have a mask of [0,1,2,3]

The Mask of shuffle indexes is wrongly computed to [4,1,6,7]
instead of [4,0,6,7].
When analyzing %tmp2 in order to compute the Mask for the
resulting shuffle instruction, the algorithm forgets to update
the mask index at position 1 with the index associated to the
element extracted from %LHS by instruction %tmp1.

Patch by Andrea DiBiagio!

llvm-svn: 179291

11 years agoAdd a CHECK-NOT for a more faithful translation of the original grep | count 2.
Eli Bendersky [Thu, 11 Apr 2013 14:43:19 +0000 (14:43 +0000)]
Add a CHECK-NOT for a more faithful translation of the original grep | count 2.
Thanks to Reid Kleckner for catching this.

llvm-svn: 179289

11 years ago[sanitizer] Syscall hooks.
Evgeniy Stepanov [Thu, 11 Apr 2013 14:37:04 +0000 (14:37 +0000)]
[sanitizer] Syscall hooks.

Pre- and post- hooks for linux syscalls. Not wired into anything, but exposed
through public interface.

llvm-svn: 179288

11 years agoChange clang-format's affinity for breaking after return types.
Daniel Jasper [Thu, 11 Apr 2013 14:29:13 +0000 (14:29 +0000)]
Change clang-format's affinity for breaking after return types.

Function declarations are now broken with the following preferences:
1) break amongst arguments.
2) break after return type.
3) break after (.
4) break before after nested name specifiers.

Options #2 or #3 are preferred over #1 only if a substantial number of
lines can be saved by that.

llvm-svn: 179287

11 years ago[asan] make heavy_uar_test a bit more heavy and fix he fake stack to pass this test
Kostya Serebryany [Thu, 11 Apr 2013 14:07:02 +0000 (14:07 +0000)]
[asan] make heavy_uar_test a bit more heavy and fix he fake stack to pass this test

llvm-svn: 179286

11 years agoAdd a function to check if an argument list is too long.
Rafael Espindola [Thu, 11 Apr 2013 14:06:34 +0000 (14:06 +0000)]
Add a function to check if an argument list is too long.

This will be used in clang to decide if it should create an @file or not. It
will be tested on the clang side.

Patch by Nathan Froyd.

llvm-svn: 179285

11 years agoFix failing dependencies-and-pp.c test
Reid Kleckner [Thu, 11 Apr 2013 13:43:19 +0000 (13:43 +0000)]
Fix failing dependencies-and-pp.c test

The bots seem to do more line wrapping because they have longer absolute
paths.

llvm-svn: 179284

11 years agoUse lit's internal shell runner on Windows for Clang tests
Reid Kleckner [Thu, 11 Apr 2013 13:34:18 +0000 (13:34 +0000)]
Use lit's internal shell runner on Windows for Clang tests

The behavior can be overridden by setting LIT_USE_INTERNAL_SHELL=0 in
the environment.

This fixes issues with /dev/null for me and brings the test suite time
down to 30s.  =D

llvm-svn: 179283

11 years agoFileCheck-ify more grep tests with quoted double quotes
Reid Kleckner [Thu, 11 Apr 2013 13:24:56 +0000 (13:24 +0000)]
FileCheck-ify more grep tests with quoted double quotes

This required some tedious reordering to match clang's order.
Presumably these ObjC tests were generated based on llvm-gcc's output
ordering.

llvm-svn: 179282

11 years ago[ASan] test source-based init-order blacklisting added in r179280
Alexey Samsonov [Thu, 11 Apr 2013 13:21:41 +0000 (13:21 +0000)]
[ASan] test source-based init-order blacklisting added in r179280

llvm-svn: 179281

11 years ago[ASan] Allow disabling init-order checks for globals by source file name.
Alexey Samsonov [Thu, 11 Apr 2013 13:20:00 +0000 (13:20 +0000)]
[ASan] Allow disabling init-order checks for globals by source file name.

llvm-svn: 179280

11 years agoAdd myself in the CREDITS.TXT
Sylvestre Ledru [Thu, 11 Apr 2013 13:15:39 +0000 (13:15 +0000)]
Add myself in the CREDITS.TXT

llvm-svn: 179279

11 years ago[asan] fix use-after-return functionality (PR15672) and enable the corresponding...
Kostya Serebryany [Thu, 11 Apr 2013 12:49:38 +0000 (12:49 +0000)]
[asan] fix use-after-return functionality (PR15672) and enable the corresponding test. We still don't guarantee anything with regard to use-after-return checking

llvm-svn: 179278

11 years agoAdd missing colons to check lines.
Benjamin Kramer [Thu, 11 Apr 2013 12:41:41 +0000 (12:41 +0000)]
Add missing colons to check lines.

llvm-svn: 179277

11 years agoFileCheckize a bunch of tests.
Benjamin Kramer [Thu, 11 Apr 2013 12:32:23 +0000 (12:32 +0000)]
FileCheckize a bunch of tests.

llvm-svn: 179276

11 years agoAdd braces around || in && to pacify GCC.
Benjamin Kramer [Thu, 11 Apr 2013 11:57:01 +0000 (11:57 +0000)]
Add braces around || in && to pacify GCC.

llvm-svn: 179275

11 years ago[ASan] Symbolize correct address when printint error summary
Alexey Samsonov [Thu, 11 Apr 2013 11:45:04 +0000 (11:45 +0000)]
[ASan] Symbolize correct address when printint error summary

llvm-svn: 179274