platform/upstream/llvm.git
10 years agoSupport: style/documentation cleanup for format
Saleem Abdulrasool [Wed, 4 Jun 2014 15:47:07 +0000 (15:47 +0000)]
Support: style/documentation cleanup for format

This is purely a documentation/whitespace cleanup for the format support
functions.

The current style does not duplicate the function/class names in the
documentation; conform to this style.

Additionally, there was a large amount of duplication of comments that added no
real value.  Use block comments for the related sets of functions which are used
for type deduction and parameter container classes.

No functional change.

llvm-svn: 210190

10 years agoSupport: add additional comment for ARM EH structure
Saleem Abdulrasool [Wed, 4 Jun 2014 15:47:04 +0000 (15:47 +0000)]
Support: add additional comment for ARM EH structure

Replicate the fact that ARM::WinEH::RuntimeFunction purposefully does not merge
functions to accommodate raw data access use cases in tools such as readobj.
Pointed out by Renato during post-commit review.

No functional change.

llvm-svn: 210189

10 years agoMake locales (and transitively, std::endl) work reliably with gcc.
Nico Weber [Wed, 4 Jun 2014 15:46:56 +0000 (15:46 +0000)]
Make locales (and transitively, std::endl) work reliably with gcc.

libc++ currently relies on undefined initialization order of global
initializers when using gcc:

1. __start_std_streams in iostream.cpp calls locale::id::_init, which assigns
   an id to each locale::facet in an initializer

2. Every facet has a static locale::id id, whose constructor sets the facet's
   id to 0

If 2 runs after 1, it clobbers the facet's assigned consecutive id, causing
exceptions to be thrown when e.g. running code like "cout << endl".

To fix this, let _LIBCPP_CONSTEXPR evaluate to "constexpr" instead of nothing
with gcc.  locale::id's constructor is marked _LIBCPP_CONSTEXPR, which ensures
that it won't get an initializer that could potentially run after the
iostream.cpp initializer. (This remains broken when building with msvc.)

Also switch constexpr-specific code in bitset to use __SIZEOF_SIZE_T__ instead
of __SIZE_WIDTH__, because gcc doesn't define the latter.

Pair-programmed/debugged with Dana Jansens.

llvm-svn: 210188

10 years agoAdd gdb-remote test for $qMemoryRegionInfo code querying.
Todd Fiala [Wed, 4 Jun 2014 15:44:33 +0000 (15:44 +0000)]
Add gdb-remote test for $qMemoryRegionInfo code querying.

Added test stub for collecting a code, heap and stack address.

Added test to verify that the code address returns a readable,
executable memory region and that the memory region range
was indeed the one that the code belonged to.

llvm-svn: 210187

10 years ago InstCombine: Improvement to check if signed addition overflows.
Rafael Espindola [Wed, 4 Jun 2014 15:39:14 +0000 (15:39 +0000)]
 InstCombine: Improvement to check if signed addition overflows.

This patch implements two things:

1. If we know one number is positive and another is negative, we return true as
    signed addition of two opposite signed numbers will never overflow.

2. Implemented TODO : If one of the operands only has one non-zero bit, and if
    the other operand has a known-zero bit in a more significant place than it
    (not including the sign bit) the ripple may go up to and fill the zero, but
    won't change the sign. e.x -  (x & ~4) + 1

We make sure that we are ignoring 0 at MSB.

Patch by Suyog Sarda.

llvm-svn: 210186

10 years agoAdd gdb-remote test to ensure $qMemoryRegionInfo is supported.
Todd Fiala [Wed, 4 Jun 2014 14:48:22 +0000 (14:48 +0000)]
Add gdb-remote test to ensure $qMemoryRegionInfo is supported.

llvm-svn: 210185

10 years ago[OPENMP] Parsing/Sema for OMPLasprivateClause.
Alexander Musman [Wed, 4 Jun 2014 13:06:39 +0000 (13:06 +0000)]
[OPENMP] Parsing/Sema for OMPLasprivateClause.
Parsing this clause, allowing it on directive ‘omp simd’ and semantic checks.

llvm-svn: 210184

10 years agoclang-format: Leave empty lines within UnwrappedLines.
Daniel Jasper [Wed, 4 Jun 2014 12:40:57 +0000 (12:40 +0000)]
clang-format: Leave empty lines within UnwrappedLines.

These are commonly used to structure things like enums or long braced
lists. There doesn't seem to be a good reason to have the behavior in
such structures be different from the behavior between statements.

llvm-svn: 210183

10 years ago[AArch64] clang-format the load/store optimizer.
Tilmann Scheller [Wed, 4 Jun 2014 12:40:35 +0000 (12:40 +0000)]
[AArch64] clang-format the load/store optimizer.

No change in functionality.

llvm-svn: 210182

10 years ago[AArch64] Fix some LLVM Coding Standards violations in the load/store optimizer.
Tilmann Scheller [Wed, 4 Jun 2014 12:36:28 +0000 (12:36 +0000)]
[AArch64] Fix some LLVM Coding Standards violations in the load/store optimizer.

Variable names should start with an upper case letter.

No change in functionality.

llvm-svn: 210181

10 years ago[sancov] Handle fork.
Evgeniy Stepanov [Wed, 4 Jun 2014 12:13:54 +0000 (12:13 +0000)]
[sancov] Handle fork.

Reset coverage data on fork().
For memory-mapped mode (coverage_direct=1) this helps avoid loss of data
(before this change two processes would write to the same file simultaneously).
For normal mode, this reduces coverage dump size, because PCs from the parent
process are no longer inherited by the child.

llvm-svn: 210180

10 years agoAdjust multidim test cases to not access out-of-bound memory
Tobias Grosser [Wed, 4 Jun 2014 11:47:54 +0000 (11:47 +0000)]
Adjust multidim test cases to not access out-of-bound memory

We do this currently only for test cases where we have integer offsets that
clearly access array dimensions out-of-bound.

-;   for (long i = 0; i < n; i++)
-;     for (long j = 0; j < m; j++)
-;       for (long k = 0; k < o; k++)
+;   for (long i = 0; i < n - 3; i++)
+;     for (long j = 4; j < m; j++)
+;       for (long k = 0; k < o - 7; k++)
 ;         A[i+3][j-4][k+7] = 1.0;

This will be helpful if we later want to simplify the access functions under the
assumption that they do not access memory out of bounds.

llvm-svn: 210179

10 years agoFix gcc -Wparentheses warning.
Patrik Hagglund [Wed, 4 Jun 2014 11:21:11 +0000 (11:21 +0000)]
Fix gcc -Wparentheses warning.

llvm-svn: 210178

10 years agoInitial set of Makefiles
Iain Sandoe [Wed, 4 Jun 2014 09:54:07 +0000 (09:54 +0000)]
Initial set of Makefiles

This provides support for the autoconfing & make build style.
The format, style and implementation follows that used within the llvm and clang projects.

TODO: implement out-of-source documentation builds.
llvm-svn: 210177

10 years agowww: Polly can be built without any GPLed software
Tobias Grosser [Wed, 4 Jun 2014 09:26:39 +0000 (09:26 +0000)]
www: Polly can be built without any GPLed software

Thanks to Sebastian Pop and David Peixotto.

llvm-svn: 210176

10 years agoFix a wrong comment.
Rui Ueyama [Wed, 4 Jun 2014 09:09:06 +0000 (09:09 +0000)]
Fix a wrong comment.

Previously FileArchive ctor comment said that only its subclasses
can be instantiated, but the ctor is actually public and is
instantiated by ArchiveReader.

Remove the wrong comment and reorder the member functions so that
public members appear before private ones.

llvm-svn: 210175

10 years agoAdd a comment, fix style.
Rui Ueyama [Wed, 4 Jun 2014 09:00:55 +0000 (09:00 +0000)]
Add a comment, fix style.

llvm-svn: 210174

10 years agoclang-tidy: Make use-override tests stricter.
Daniel Jasper [Wed, 4 Jun 2014 08:47:25 +0000 (08:47 +0000)]
clang-tidy: Make use-override tests stricter.

As per post review comment.

llvm-svn: 210173

10 years agoFix format.
Rui Ueyama [Wed, 4 Jun 2014 08:39:56 +0000 (08:39 +0000)]
Fix format.

llvm-svn: 210172

10 years agoclang-tidy use override: Don't generate incorrect warnings without fixes
Daniel Jasper [Wed, 4 Jun 2014 08:26:02 +0000 (08:26 +0000)]
clang-tidy use override: Don't generate incorrect warnings without fixes

Add basic testing for the emitted diagnostics.

llvm-svn: 210171

10 years agoUse range-based for loops
Tobias Grosser [Wed, 4 Jun 2014 08:06:40 +0000 (08:06 +0000)]
Use range-based for loops

llvm-svn: 210170

10 years ago[OPENMP] Small comment and reformatting fixes.
Alexander Musman [Wed, 4 Jun 2014 07:53:32 +0000 (07:53 +0000)]
[OPENMP] Small comment and reformatting fixes.

Fix post-commit review comments by Carlo Bertolli
for commit r209660 - OMP collapse clause.

Re-formatted TransformOMP* functions in TreeTransform.h with clang-format.

llvm-svn: 210169

10 years agoFix a use of uninitialized value. OldCC is set when IsCmpZero || IsSwapped and read...
Nick Lewycky [Wed, 4 Jun 2014 07:45:54 +0000 (07:45 +0000)]
Fix a use of uninitialized value. OldCC is set when IsCmpZero || IsSwapped and read when ShouldUpdateCC || IsSwapped, and ShouldUpdateCC is independent. Fixes PR19932, but no test since I wasn't able to get any symptoms to appear, not even with valgrind and the testcase from the PR. It's clear what happened from inspection of the code.

llvm-svn: 210168

10 years agoAdd a subtarget hook: enablePostMachineScheduler.
Andrew Trick [Wed, 4 Jun 2014 07:06:27 +0000 (07:06 +0000)]
Add a subtarget hook: enablePostMachineScheduler.

As requested by AArch64 subtargets.

Note that this will have no effect until the
AArch64 target actually enables the pass like this:
substitutePass(&PostRASchedulerID, &PostMachineSchedulerID);

As soon as armv7 switches over, PostMachineScheduler will become the
default postRA scheduler, so this won't be necessary any more.
Targets using the old postRA schedule would then do:
substitutePass(&PostMachineSchedulerID, &PostRASchedulerID);

llvm-svn: 210167

10 years agoMove GenericScheduler and PostGenericScheduler into a header.
Andrew Trick [Wed, 4 Jun 2014 07:06:18 +0000 (07:06 +0000)]
Move GenericScheduler and PostGenericScheduler into a header.

These were not exposed previously because I didn't want out-of-tree
targets to be too dependent on their internals. They can be reused for
a very wide variety of processors with casual scheduling needs without
exposing the classes by instead using hooks defined in
MachineSchedPolicy (we can add more if needed). When targets are more
aggressively tuned or want to provide custom heuristics, they can
define their own MachineSchedStrategy. I tend to think this is better
once you start customizing heuristics because you can copy over only
what you need. I don't think that layering heuristics generally works
well.

However, Arch64 targets now want to reuse the Generic scheduling logic
but also provide extensions. I don't see much harm in exposing the
Generic scheduling classes with a major caveat: these scheduling
strategies may change in the future without validating performance on
less mainstream processors. If you want to be immune from changes,
just define your own MachineSchedStrategy.

llvm-svn: 210166

10 years agodocs: Remove documentation for legacy PGO options
Justin Bogner [Wed, 4 Jun 2014 06:29:38 +0000 (06:29 +0000)]
docs: Remove documentation for legacy PGO options

Late last year r191835 removed a largely unmaintained legacy PGO
infrastructure, but some of the docs were missed. Since these docs are
for things that don't actually exist anymore, they should be removed.

llvm-svn: 210165

10 years ago[Object][ELF] Range-based loop simplification.
Simon Atanasyan [Wed, 4 Jun 2014 05:51:44 +0000 (05:51 +0000)]
[Object][ELF] Range-based loop simplification.

No functional changes.

llvm-svn: 210164

10 years agoFix a couple minor typos in $qMemoryRegionInfo packet docs.
Todd Fiala [Wed, 4 Jun 2014 05:07:40 +0000 (05:07 +0000)]
Fix a couple minor typos in $qMemoryRegionInfo packet docs.

llvm-svn: 210163

10 years agoAdd a note about debug mode being non-functional
Marshall Clow [Wed, 4 Jun 2014 04:49:49 +0000 (04:49 +0000)]
Add a note about debug mode being non-functional

llvm-svn: 210162

10 years agoGraphWriter: try gv before xdg-open
Alp Toker [Wed, 4 Jun 2014 04:11:12 +0000 (04:11 +0000)]
GraphWriter: try gv before xdg-open

Avoid changing behaviour for everyone who's used to the traditional ghostview
UI, especially since it knows how to stay in the foreground unlike xdg-open.

Amendment to r210147.

llvm-svn: 210148

10 years agoGraphWriter: support the XDG open utility
Alp Toker [Wed, 4 Jun 2014 03:57:44 +0000 (03:57 +0000)]
GraphWriter: support the XDG open utility

This runs a suitable viewer on Unix desktop environments specified by
Freedesktop.org (GNOME, KDE, Linux distributions etc.)

llvm-svn: 210147

10 years agoRemove inclusions of LLVM's private config.h
Alp Toker [Wed, 4 Jun 2014 03:34:26 +0000 (03:34 +0000)]
Remove inclusions of LLVM's private config.h

llvm-svn: 210146

10 years agoRemove the last remaining llvm/Config/config.h includes
Alp Toker [Wed, 4 Jun 2014 03:28:55 +0000 (03:28 +0000)]
Remove the last remaining llvm/Config/config.h includes

This corrects long-standing misuses of LLVM's internal config.h.

In most cases the public llvm-config.h header was intended and we can now
remove the old hacks thanks to LLVM r210144.

The config.h header is private, won't be installed and should no longer be
included by clang or other modules.

llvm-svn: 210145

10 years agoconfig.h: fix layering and don't duplicate definitions
Alp Toker [Wed, 4 Jun 2014 03:21:38 +0000 (03:21 +0000)]
config.h: fix layering and don't duplicate definitions

Also correct the llvm-config.h header guard so it doesn't depend on 'CONFIG_H'
which is commonly defined in external projects and caused trouble for
embedders.

In future llvm/Config/llvm-config.h will be installed, but not
the private llvm/Config/config.h header.

llvm-svn: 210144

10 years agoDebugInfo: Partial revert r209984 due to more cases where abstract DbgVariables do...
David Blaikie [Wed, 4 Jun 2014 01:30:59 +0000 (01:30 +0000)]
DebugInfo: Partial revert r209984 due to more cases where abstract DbgVariables do not have associated DIEs.

Along with a test case to demonstrate that due to inlining order there
are cases where abstract variable DIEs are not constructed since the
abstract subprogram was built due to a previous inlining that optimized
away those variables. This produces incorrect debug info (the 'missing'
abstract variable causes the inlined instance of that variable to be
emitted with a full description (name, line, file) rather than
referencing the abstract origin), but this commit at least ensures that
it doesn't crash...

llvm-svn: 210143

10 years ago[mach-o] Make anonymous atom out of section content before any symbol
Nick Kledzik [Wed, 4 Jun 2014 00:34:27 +0000 (00:34 +0000)]
[mach-o] Make anonymous atom out of section content before any symbol

In sections that are broken into atoms at symbols, if the first symbol in the
section is not at the start of the section, then make an anonymous atom for
the section content that is before the first symbol.

llvm-svn: 210142

10 years agoDowngrade "definition of dllimport static field" error to warning for class templates...
Hans Wennborg [Wed, 4 Jun 2014 00:18:41 +0000 (00:18 +0000)]
Downgrade "definition of dllimport static field" error to warning for class templates (PR19902)

This allows us to compile the following kind of code, which occurs in MSVC
headers:

  template <typename> struct S {
    __declspec(dllimport) static int x;
  };
  template <typename T> int S<T>::x;

The definition works similarly to a dllimport inline function definition and
gets available_externally linkage.

Differential Revision: http://reviews.llvm.org/D3998

llvm-svn: 210141

10 years agoDisable unstable test on ARM
Greg Fitzgerald [Wed, 4 Jun 2014 00:06:41 +0000 (00:06 +0000)]
Disable unstable test on ARM

llvm-svn: 210140

10 years ago[mach-o] Refactor sections -> atoms to be table driven.
Nick Kledzik [Tue, 3 Jun 2014 23:36:50 +0000 (23:36 +0000)]
[mach-o] Refactor sections -> atoms to be table driven.

Previously each section kind had its own code to loop over the section and
parse it into atoms.  This refactoring has two tables.  The first maps sections
to ContentType.  The second maps ContentType to information on how to find
the atom boundaries.

A few bugs in test cases were discovered as part of the refactoring.
No change in functionality intended.

llvm-svn: 210138

10 years agoAdd __builtin_operator_new and __builtin_operator_delete, which act like calls
Richard Smith [Tue, 3 Jun 2014 23:27:44 +0000 (23:27 +0000)]
Add __builtin_operator_new and __builtin_operator_delete, which act like calls
to the normal non-placement ::operator new and ::operator delete, but allow
optimizations like new-expressions and delete-expressions do.

llvm-svn: 210137

10 years agoFix typos
Matt Arsenault [Tue, 3 Jun 2014 23:06:13 +0000 (23:06 +0000)]
Fix typos

llvm-svn: 210135

10 years agoCalculate dead instructions when a live interval is created.
Pete Cooper [Tue, 3 Jun 2014 22:42:10 +0000 (22:42 +0000)]
Calculate dead instructions when a live interval is created.

This gets us closer to being able to remove LiveVariables entirely which is where dead instructions are currently tagged as such.

Reviewed by Jakob Olesen

llvm-svn: 210132

10 years agoUpdate DR page for latest revision of CWG issues list.
Richard Smith [Tue, 3 Jun 2014 21:58:55 +0000 (21:58 +0000)]
Update DR page for latest revision of CWG issues list.

llvm-svn: 210130

10 years agoAdd test case for inherited exceptions
Jonathan Roelofs [Tue, 3 Jun 2014 21:50:11 +0000 (21:50 +0000)]
Add test case for inherited exceptions

Test case written by Dana Jansens.

llvm-svn: 210129

10 years agoRevert r209381 as it isn't a local variable. Add a testcase so that
Eric Christopher [Tue, 3 Jun 2014 21:01:39 +0000 (21:01 +0000)]
Revert r209381 as it isn't a local variable. Add a testcase so that
we know next time this happens.

llvm-svn: 210127

10 years agoFixup formatting in the pass.
Eric Christopher [Tue, 3 Jun 2014 21:01:35 +0000 (21:01 +0000)]
Fixup formatting in the pass.

llvm-svn: 210126

10 years agoUpdate comments to match reality.
Rafael Espindola [Tue, 3 Jun 2014 20:25:26 +0000 (20:25 +0000)]
Update comments to match reality.

llvm-svn: 210125

10 years agoFix formatting
Tobias Grosser [Tue, 3 Jun 2014 20:20:41 +0000 (20:20 +0000)]
Fix formatting

llvm-svn: 210124

10 years agoFix a small bug in the parsing of anonymous globals.
Rafael Espindola [Tue, 3 Jun 2014 20:07:32 +0000 (20:07 +0000)]
Fix a small bug in the parsing of anonymous globals.

It was able to parse

hidden dllexport global i32 42

but not

dllexport global i32 42

llvm-svn: 210121

10 years agoSimplify the parsing of unnamed globals. No functionality changed.
Rafael Espindola [Tue, 3 Jun 2014 20:00:20 +0000 (20:00 +0000)]
Simplify the parsing of unnamed globals. No functionality changed.

llvm-svn: 210120

10 years agoUpdate comment. This should have been part of r210062.
Rafael Espindola [Tue, 3 Jun 2014 19:38:37 +0000 (19:38 +0000)]
Update comment. This should have been part of r210062.

llvm-svn: 210119

10 years agoRemove some redundant doc comments
Alp Toker [Tue, 3 Jun 2014 19:06:49 +0000 (19:06 +0000)]
Remove some redundant doc comments

llvm-svn: 210118

10 years agorecord delinearization result and reuse it in polyhedral translation
Sebastian Pop [Tue, 3 Jun 2014 18:16:31 +0000 (18:16 +0000)]
record delinearization result and reuse it in polyhedral translation

Without this patch, the testcase would fail on the delinearization of the second
array:

; void foo(long n, long m, long o, double A[n][m][o]) {
;   for (long i = 0; i < n; i++)
;     for (long j = 0; j < m; j++)
;       for (long k = 0; k < o; k++) {
;         A[i+3][j-4][k+7] = 1.0;
;         A[i][0][k] = 2.0;
;       }
; }

; CHECK: [n, m, o] -> { Stmt_for_body6[i0, i1, i2] -> MemRef_A[3 + i0, -4 + i1, 7 + i2] };
; CHECK: [n, m, o] -> { Stmt_for_body6[i0, i1, i2] -> MemRef_A[i0, 0, i2] };

Here is the output of FileCheck on the testcase without this patch:

; CHECK: [n, m, o] -> { Stmt_for_body6[i0, i1, i2] -> MemRef_A[i0, 0, i2] };
         ^
<stdin>:26:2: note: possible intended match here
 [n, m, o] -> { Stmt_for_body6[i0, i1, i2] -> MemRef_A[o0] };
 ^

It is possible to find a good delinearization for A[i][0][k] only in the context
of the delinearization of both array accesses.

There are two ways to delinearize together all array subscripts touching the
same base address: either duplicate the code from scop detection to first gather
all array references and then run the delinearization; or as implemented in this
patch, use the same delinearization info that we computed during scop detection.

llvm-svn: 210117

10 years agoAdded gdb-remote memory read ($m) test.
Todd Fiala [Tue, 3 Jun 2014 18:09:56 +0000 (18:09 +0000)]
Added gdb-remote memory read ($m) test.

Added set-memory:{content} and get-memory-address-hex: commands
to the test exe for gdb-remote.  Added a test that sets the content
via the inferior command line, then reads it back via gdb-remote
with $m.

Passing on debugserver.  Marked as fail on llgs.  Implementing
in the llgs branch next.

llvm-svn: 210116

10 years agoFix leak from r210059
Alp Toker [Tue, 3 Jun 2014 17:23:34 +0000 (17:23 +0000)]
Fix leak from r210059

Also revert r210096 which temporarily disabled the test while this was being
investigated.

llvm-svn: 210115

10 years ago[AArch64] Fix typo in load/store optimizer.
Tilmann Scheller [Tue, 3 Jun 2014 16:33:13 +0000 (16:33 +0000)]
[AArch64] Fix typo in load/store optimizer.

llvm-svn: 210114

10 years ago[AArch64] Add regression tests for the load/store optimizer which cover post-index...
Tilmann Scheller [Tue, 3 Jun 2014 16:03:00 +0000 (16:03 +0000)]
[AArch64] Add regression tests for the load/store optimizer which cover post-index update folding with sub rather than add.

The tests check that the following transform happens:

  (ldr|str) X, [x20]
   ...
  sub x20, x20, #16
   ->
  (ldr|str) X, [x20], #-16

with X being either w0, x0, s0, d0 or q0.

llvm-svn: 210113

10 years agoFix build broken by LLVM commit r209103
Jeroen Ketema [Tue, 3 Jun 2014 15:43:57 +0000 (15:43 +0000)]
Fix build broken by LLVM commit r209103

Reviewed-by: Aaron Watry <awatry@gmail.com>
llvm-svn: 210111

10 years agoRemove dead code.
Rafael Espindola [Tue, 3 Jun 2014 15:36:31 +0000 (15:36 +0000)]
Remove dead code.

New code should probably use shared_ptr anyway.

llvm-svn: 210110

10 years ago[sancov] Delay opening dump file until the first module constructor.
Evgeniy Stepanov [Tue, 3 Jun 2014 15:27:15 +0000 (15:27 +0000)]
[sancov] Delay opening dump file until the first module constructor.

llvm-svn: 210109

10 years ago[sancov] Handle spaces in module name.
Evgeniy Stepanov [Tue, 3 Jun 2014 15:25:43 +0000 (15:25 +0000)]
[sancov] Handle spaces in module name.

llvm-svn: 210108

10 years agoImplement one operator== with another.
Rafael Espindola [Tue, 3 Jun 2014 15:06:22 +0000 (15:06 +0000)]
Implement one operator== with another.

Thanks for David Blaikie for the suggestion.

llvm-svn: 210107

10 years ago[asan] enable detect_odr_violation=2; https://code.google.com/p/address-sanitizer...
Kostya Serebryany [Tue, 3 Jun 2014 15:06:13 +0000 (15:06 +0000)]
[asan] enable detect_odr_violation=2; https://code.google.com/p/address-sanitizer/wiki/OneDefinitionRuleViolation . This feature has been working quite well so far, found a few bugs and zero false positives. The main problem is that there could be lots of true positives and users will have to disable this checking until the bugs are fixed.

llvm-svn: 210106

10 years agoWindows fix: Disable editline for MSVC. Since r208369 there have been issues, probabl...
Colin Riley [Tue, 3 Jun 2014 14:37:35 +0000 (14:37 +0000)]
Windows fix: Disable editline for MSVC. Since r208369 there have been issues, probably related to the editline wrapper. For now, it's more stable and usable disabled.

llvm-svn: 210105

10 years agoWindows fix: Condition::Wait returned failure when it actually succeeded (SleepCondit...
Colin Riley [Tue, 3 Jun 2014 14:33:41 +0000 (14:33 +0000)]
Windows fix: Condition::Wait returned failure when it actually succeeded (SleepConditionVariableCS returns non-zero for success)

llvm-svn: 210104

10 years ago[asan] Fix coverage instrumentation with -asan-globals=0.
Evgeniy Stepanov [Tue, 3 Jun 2014 14:16:00 +0000 (14:16 +0000)]
[asan] Fix coverage instrumentation with -asan-globals=0.

llvm-svn: 210103

10 years agoAArch64: mark small types (i1, i8, i16) as promoted
Tim Northover [Tue, 3 Jun 2014 13:54:53 +0000 (13:54 +0000)]
AArch64: mark small types (i1, i8, i16) as promoted

This means the output of LowerFormalArguments returns a lowered
SDValue with the correct type (expected in SelectionDAGBuilder).
Without this, an assertion under a DEBUG macro triggers when those
types are passed on the stack.

llvm-svn: 210102

10 years agoUse IntrusiveRefCntPtr's == and != nullptr operators.
Rafael Espindola [Tue, 3 Jun 2014 13:27:48 +0000 (13:27 +0000)]
Use IntrusiveRefCntPtr's == and != nullptr operators.

This is a partial revert of r210075.

llvm-svn: 210101

10 years agoAdd operator== and operator!= to compare with nullptr.
Rafael Espindola [Tue, 3 Jun 2014 13:26:18 +0000 (13:26 +0000)]
Add operator== and operator!= to compare with nullptr.

llvm-svn: 210100

10 years agoFix windows build: SBTypeEnumMember.cpp added to the separate windows liblldb.dll...
Colin Riley [Tue, 3 Jun 2014 13:01:18 +0000 (13:01 +0000)]
Fix windows build: SBTypeEnumMember.cpp added to the separate windows liblldb.dll project.

llvm-svn: 210099

10 years ago[sancov] Fix map update logic on Android.
Evgeniy Stepanov [Tue, 3 Jun 2014 12:15:43 +0000 (12:15 +0000)]
[sancov] Fix map update logic on Android.

dlopen()/dlclose() are not interceptable on Android,
so we update .sancov.map in module constructor callbacks.

llvm-svn: 210098

10 years agoclang-format: Refactor indentation behavior for multiple nested blocks.
Daniel Jasper [Tue, 3 Jun 2014 12:02:45 +0000 (12:02 +0000)]
clang-format: Refactor indentation behavior for multiple nested blocks.

This fixes a few oddities when formatting multiple nested JavaScript
blocks, e.g.:

Before:
  promise.then(
      function success() {
        doFoo();
        doBar();
      },
      [], function error() {
        doFoo();
        doBaz();
      });
  promise.then([],
               function success() {
                 doFoo();
                 doBar();
               },
               function error() {
    doFoo();
    doBaz();
  });

After:
  promise.then(
      function success() {
        doFoo();
        doBar();
      },
      [],
      function error() {
        doFoo();
        doBaz();
      });
  promise.then([],
               function success() {
                 doFoo();
                 doBar();
               },
               function error() {
                 doFoo();
                 doBaz();
               });

llvm-svn: 210097

10 years agotemporary disable part of a test because it causes clang to leak memory (want to...
Kostya Serebryany [Tue, 3 Jun 2014 11:45:37 +0000 (11:45 +0000)]
temporary disable part of a test because it causes clang to leak memory (want to have the sanitizer bot green)

llvm-svn: 210096

10 years ago[OPENMP] Loop canonical form analysis (Sema)
Alexander Musman [Tue, 3 Jun 2014 10:16:47 +0000 (10:16 +0000)]
[OPENMP] Loop canonical form analysis (Sema)

This patch implements semantic analysis to make sure that the loop is in OpenMP canonical form.
This is the form required for 'omp simd', 'omp for' and other loop pragmas.

Differential revision: http://reviews.llvm.org/D3778

llvm-svn: 210095

10 years ago[Mips] Make la25-stub.test self contained.
Simon Atanasyan [Tue, 3 Jun 2014 09:59:42 +0000 (09:59 +0000)]
[Mips] Make la25-stub.test self contained.

No functional changes.

llvm-svn: 210094

10 years agoImprove error message.
Rui Ueyama [Tue, 3 Jun 2014 08:40:49 +0000 (08:40 +0000)]
Improve error message.

Previously the parser always printed out an error message followed
by "Invalid file type" even if the file type is correct.

llvm-svn: 210093

10 years agoRemove incorrect assertion.
Richard Smith [Tue, 3 Jun 2014 08:40:27 +0000 (08:40 +0000)]
Remove incorrect assertion.

llvm-svn: 210092

10 years agoImplement DR990 and DR1070. Aggregate initialization initializes uninitialized
Richard Smith [Tue, 3 Jun 2014 08:26:00 +0000 (08:26 +0000)]
Implement DR990 and DR1070. Aggregate initialization initializes uninitialized
elements from {}, rather than value-initializing them. This permits calling an
initializer-list constructor or constructing a std::initializer_list object.
(It would also permit initializing a const reference or rvalue reference if
that weren't explicitly prohibited by other rules.)

llvm-svn: 210091

10 years agoTeach AST dumper to dump the array filler in an initializer list.
Richard Smith [Tue, 3 Jun 2014 08:24:28 +0000 (08:24 +0000)]
Teach AST dumper to dump the array filler in an initializer list.

llvm-svn: 210090

10 years agoRename FileToMutable -> SimpleFileWrapper.
Rui Ueyama [Tue, 3 Jun 2014 08:12:33 +0000 (08:12 +0000)]
Rename FileToMutable -> SimpleFileWrapper.

FileToMutable is what this class does, but this class (or, to be precise,
an instance of this class) is a wrapper of the other SimpleFile. It's odd
that the class was named like a function.

llvm-svn: 210089

10 years agoFix build breakage.
Rui Ueyama [Tue, 3 Jun 2014 07:53:37 +0000 (07:53 +0000)]
Fix build breakage.

llvm-svn: 210087

10 years agoInline short member function.
Rui Ueyama [Tue, 3 Jun 2014 07:52:42 +0000 (07:52 +0000)]
Inline short member function.

llvm-svn: 210086

10 years agoUse auto for obvious types.
Rui Ueyama [Tue, 3 Jun 2014 07:43:15 +0000 (07:43 +0000)]
Use auto for obvious types.

llvm-svn: 210085

10 years agoNo need to compute valBit until mask bit is 1.
Rui Ueyama [Tue, 3 Jun 2014 07:39:32 +0000 (07:39 +0000)]
No need to compute valBit until mask bit is 1.

llvm-svn: 210084

10 years agoPR11410: Extend diagnostic to cover all cases of aggregate initialization, not
Richard Smith [Tue, 3 Jun 2014 07:28:54 +0000 (07:28 +0000)]
PR11410: Extend diagnostic to cover all cases of aggregate initialization, not
just the extremely specific case of a trailing array element that couldn't be
initialized because the default constructor for the element type is deleted.

Also reword the diagnostic to better match our other context diagnostics and to
prepare for the implementation of core issue 1070.

llvm-svn: 210083

10 years agoUse range-based for loop.
Rui Ueyama [Tue, 3 Jun 2014 07:27:49 +0000 (07:27 +0000)]
Use range-based for loop.

llvm-svn: 210082

10 years agoRemove unusual use of using.
Rui Ueyama [Tue, 3 Jun 2014 07:24:46 +0000 (07:24 +0000)]
Remove unusual use of using.

llvm-svn: 210081

10 years agoList DR532 as implemented on the defect report status page by renaming the namespace.
Nikola Smiljanic [Tue, 3 Jun 2014 07:06:20 +0000 (07:06 +0000)]
List DR532 as implemented on the defect report status page by renaming the namespace.

llvm-svn: 210080

10 years agoWhen emitting a multidimensional array new, emit the initializers for the
Richard Smith [Tue, 3 Jun 2014 06:58:52 +0000 (06:58 +0000)]
When emitting a multidimensional array new, emit the initializers for the
trailing elements as a single loop, rather than sometimes emitting a nest of
several loops. This fixes a bug where CodeGen would sometimes try to emit an
expression with the wrong type for the element being initialized. Plus various
other minor cleanups to the IR produced for array new initialization.

llvm-svn: 210079

10 years agoUse an enum class.
Rafael Espindola [Tue, 3 Jun 2014 05:26:12 +0000 (05:26 +0000)]
Use an enum class.

llvm-svn: 210078

10 years agoUse an enum class.
Rafael Espindola [Tue, 3 Jun 2014 05:12:33 +0000 (05:12 +0000)]
Use an enum class.

Might also fix the windows build.

llvm-svn: 210077

10 years agoRemove the last unspecified_bool_type from llvm.
Rafael Espindola [Tue, 3 Jun 2014 05:05:15 +0000 (05:05 +0000)]
Remove the last unspecified_bool_type from llvm.

llvm-svn: 210076

10 years agoDon't assume an implicit IntrusiveRefCntPtr -> bool operator.
Rafael Espindola [Tue, 3 Jun 2014 05:04:52 +0000 (05:04 +0000)]
Don't assume an implicit IntrusiveRefCntPtr -> bool operator.

llvm-svn: 210075

10 years agoReference::target() doesn't and shouldn't return a nullptr.
Rui Ueyama [Tue, 3 Jun 2014 05:04:07 +0000 (05:04 +0000)]
Reference::target() doesn't and shouldn't return a nullptr.

llvm-svn: 210074

10 years agoMake this operator bool() explicit to match the standard library.
Rafael Espindola [Tue, 3 Jun 2014 04:54:15 +0000 (04:54 +0000)]
Make this operator bool() explicit to match the standard library.

llvm-svn: 210073

10 years agoMake this operator bool() explicit to match the standard library.
Rafael Espindola [Tue, 3 Jun 2014 04:42:24 +0000 (04:42 +0000)]
Make this operator bool() explicit to match the standard library.

llvm-svn: 210072

10 years agoThis lambda returns a boolean, update the return statements.
Rafael Espindola [Tue, 3 Jun 2014 04:41:30 +0000 (04:41 +0000)]
This lambda returns a boolean, update the return statements.

llvm-svn: 210071

10 years agoDon't assume an implicit error_code -> bool operator.
Rafael Espindola [Tue, 3 Jun 2014 04:40:55 +0000 (04:40 +0000)]
Don't assume an implicit error_code -> bool operator.

llvm-svn: 210070

10 years agoFix Android build after r210053
Greg Fitzgerald [Tue, 3 Jun 2014 04:29:46 +0000 (04:29 +0000)]
Fix Android build after r210053

llvm-svn: 210069

10 years agoIgnore line numbers on debug intrinsics. Add an assert to ensure that we aren't emitt...
Nick Lewycky [Tue, 3 Jun 2014 04:25:36 +0000 (04:25 +0000)]
Ignore line numbers on debug intrinsics. Add an assert to ensure that we aren't emitting line number zero, the .gcno format uses this to indicate that the next field is a filename.

llvm-svn: 210068