platform/upstream/llvm.git
11 years agoAdded module map generation docs and some clean-up.
John Thompson [Wed, 16 Oct 2013 13:44:21 +0000 (13:44 +0000)]
Added module map generation docs and some clean-up.

llvm-svn: 192792

11 years ago[Sanitizer] Fix lint checker script on Mac
Alexey Samsonov [Wed, 16 Oct 2013 13:38:23 +0000 (13:38 +0000)]
[Sanitizer] Fix lint checker script on Mac

llvm-svn: 192791

11 years ago[SystemZ] Handle extensions in RxSBG optimizations
Richard Sandiford [Wed, 16 Oct 2013 13:35:13 +0000 (13:35 +0000)]
[SystemZ] Handle extensions in RxSBG optimizations

The input to an RxSBG operation can be narrower as long as the upper bits
are don't care.  This fixes a FIXME added in r192783.

llvm-svn: 192790

11 years agoFix FreeBSD build after r192714 (Windows command line driver)
Ed Maste [Wed, 16 Oct 2013 13:20:01 +0000 (13:20 +0000)]
Fix FreeBSD build after r192714 (Windows command line driver)

llvm-svn: 192789

11 years ago[pr17595] Fix a use after free.
Rafael Espindola [Wed, 16 Oct 2013 12:47:04 +0000 (12:47 +0000)]
[pr17595] Fix a use after free.

Destroying the codegen also frees the path of the created object. Copy the
path to a std::string.

llvm-svn: 192787

11 years agoRemove a workaround for PR16406 from the vtables-virtual-inheritance test
Timur Iskhodzhanov [Wed, 16 Oct 2013 11:38:29 +0000 (11:38 +0000)]
Remove a workaround for PR16406 from the vtables-virtual-inheritance test

llvm-svn: 192786

11 years agotsan: refactor libignore implementation
Dmitry Vyukov [Wed, 16 Oct 2013 11:28:12 +0000 (11:28 +0000)]
tsan: refactor libignore implementation

llvm-svn: 192785

11 years ago[SystemZ] Improve handling of SETCC
Richard Sandiford [Wed, 16 Oct 2013 11:10:55 +0000 (11:10 +0000)]
[SystemZ] Improve handling of SETCC

We previously used the default expansion to SELECT_CC, which in turn would
expand to "LHI; BRC; LHI".  In most cases it's better to use an IPM-based
sequence instead.

llvm-svn: 192784

11 years agoHandle (shl (anyext (shr ...))) in SimpilfyDemandedBits
Richard Sandiford [Wed, 16 Oct 2013 10:26:19 +0000 (10:26 +0000)]
Handle (shl (anyext (shr ...))) in SimpilfyDemandedBits

This is really an extension of the current (shl (shr ...)) -> shl optimization.
The main difference is that certain upper bits must also not be demanded.

The motivating examples are the first two in the testcase, which occur
in llvmpipe output.

llvm-svn: 192783

11 years ago[TSan] Extend test for reporting globals with races on them
Alexey Samsonov [Wed, 16 Oct 2013 09:56:17 +0000 (09:56 +0000)]
[TSan] Extend test for reporting globals with races on them

llvm-svn: 192782

11 years agollvm-symbolizer: don't always run demangler on global object names
Alexey Samsonov [Wed, 16 Oct 2013 09:54:49 +0000 (09:54 +0000)]
llvm-symbolizer: don't always run demangler on global object names

llvm-svn: 192781

11 years agoUnbreak the gcc build (complain about duplicate definition of Initialize/Terminate...
Sylvestre Ledru [Wed, 16 Oct 2013 09:12:15 +0000 (09:12 +0000)]
Unbreak the gcc build (complain about duplicate definition of Initialize/Terminate (done in the cpp code)

llvm-svn: 192780

11 years agoAdd a 'deleteModule' method to the Linker class.
Bill Wendling [Wed, 16 Oct 2013 08:59:57 +0000 (08:59 +0000)]
Add a 'deleteModule' method to the Linker class.

This deletes the Module ivar instead of having the LTO code generater do it. It
also sets the pointer to 'NULL', so that if it's used again it will abort
quickly.

llvm-svn: 192778

11 years ago[asan] Remove CallocOverflow32 test from asan_test.
Evgeniy Stepanov [Wed, 16 Oct 2013 08:34:31 +0000 (08:34 +0000)]
[asan] Remove CallocOverflow32 test from asan_test.

The same as with MSan, this test behavior depends on ASAN_OPTIONS, and we've
got a lit_test that covers this.

llvm-svn: 192777

11 years ago[msan] Handle origins in __sanitizer_unaligned_(load|store)*.
Evgeniy Stepanov [Wed, 16 Oct 2013 08:25:13 +0000 (08:25 +0000)]
[msan] Handle origins in __sanitizer_unaligned_(load|store)*.

llvm-svn: 192776

11 years agoRevert r192758 (and r192759), "MC: Better handling of tricky symbol and section names"
NAKAMURA Takumi [Wed, 16 Oct 2013 08:22:49 +0000 (08:22 +0000)]
Revert r192758 (and r192759), "MC: Better handling of tricky symbol and section names"

GNU AS didn't like quotes in symbol names.

    Error: junk at end of line, first unrecognized character is `"'

        .def "@feat.00";
        "@feat.00" = 1

Reproduced on Cygwin's 2.23.52.20130309 and mingw32's 2.20.1.20100303.

llvm-svn: 192775

11 years agoMake some pthread_mutex_* and pthread_cond_* interceptors common.
Alexey Samsonov [Wed, 16 Oct 2013 08:20:31 +0000 (08:20 +0000)]
Make some pthread_mutex_* and pthread_cond_* interceptors common.

Reviewers: eugenis, dvyukov

Reviewed By: dvyukov

CC: llvm-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D1937

llvm-svn: 192774

11 years agoReally fix build warning/error that I think r192756 was trying to fix.
Craig Topper [Wed, 16 Oct 2013 06:50:36 +0000 (06:50 +0000)]
Really fix build warning/error that I think r192756 was trying to fix.

llvm-svn: 192773

11 years agoFix a bug that the empty string could be added to dead strip root.
Rui Ueyama [Wed, 16 Oct 2013 05:06:52 +0000 (05:06 +0000)]
Fix a bug that the empty string could be added to dead strip root.

llvm-svn: 192772

11 years agoPropagate deadStripOptimize()'s failure to the caller.
Rui Ueyama [Wed, 16 Oct 2013 05:03:39 +0000 (05:03 +0000)]
Propagate deadStripOptimize()'s failure to the caller.

We want to make the program to exit with non-zero exit code if there's an error
during dead stripping.

llvm-svn: 192771

11 years agoTypeFinder: prefer iterative algorithm to keep stack usage low.
Will Dietz [Wed, 16 Oct 2013 04:10:06 +0000 (04:10 +0000)]
TypeFinder: prefer iterative algorithm to keep stack usage low.

Introduce subtype_reverse_iterator to maintain
the numbering assigned during the recursive type walk.

llvm-svn: 192770

11 years agoFix a bug in Windows resource file detection.
Rui Ueyama [Wed, 16 Oct 2013 03:29:49 +0000 (03:29 +0000)]
Fix a bug in Windows resource file detection.

The magic bytes should not include the trailing NUL byte.

llvm-svn: 192769

11 years agoA couple of small visual improvements for lui
Ben Langmuir [Wed, 16 Oct 2013 03:01:04 +0000 (03:01 +0000)]
A couple of small visual improvements for lui

Change titles to white rather than green text to improve readability on blue
background, and use erase() instead of clear() to reduce flicker in the source
window.

llvm-svn: 192768

11 years agoAdd a triple to this test.
Rafael Espindola [Wed, 16 Oct 2013 02:27:33 +0000 (02:27 +0000)]
Add a triple to this test.

llvm-svn: 192767

11 years agolui: clean up breakpoint window, and allow multi-line list items
Ben Langmuir [Wed, 16 Oct 2013 02:01:41 +0000 (02:01 +0000)]
lui: clean up breakpoint window, and allow multi-line list items

* Clean the SBBreakpoint: id = out of the output
* clamp output to window width (eventually we should be able to scroll
left/right)
* On 'tab', expand a breakpoint to show its locations
* Allow enter/space to toggle breakpoints

llvm-svn: 192766

11 years agoAdd a ListWin to cui to show scrollabled lists
Ben Langmuir [Wed, 16 Oct 2013 02:00:21 +0000 (02:00 +0000)]
Add a ListWin to cui to show scrollabled lists

Author: Paul Redmond <paul.redmond@intel.com>
llvm-svn: 192765

11 years agoAdd support for metadata representing .ident directives.
Rafael Espindola [Wed, 16 Oct 2013 01:49:05 +0000 (01:49 +0000)]
Add support for metadata representing .ident directives.

llvm-svn: 192764

11 years agoclang-tools-extra/modularize: Compare Paths to Prefix as natively-canonicalized form.
NAKAMURA Takumi [Wed, 16 Oct 2013 01:42:33 +0000 (01:42 +0000)]
clang-tools-extra/modularize: Compare Paths to Prefix as natively-canonicalized form.

On Win32, paths are not expected to be canonicalized.

llvm-svn: 192763

11 years agoOn 32 bit windows, mangle stdcall and fastcall decls in clang.
Rafael Espindola [Wed, 16 Oct 2013 01:40:34 +0000 (01:40 +0000)]
On 32 bit windows, mangle stdcall and fastcall decls in clang.

This removes the dependency on the llvm mangler doing it for us. In isolation,
the benefit is that the testing of what mangling is applied is all in one place:
(C, C++) X (Itanium, Microsoft) are all handled by clang.

This also gives me hope that in the future the llvm mangler (and llvm-ar) will
not depend on TargetMachine.

llvm-svn: 192762

11 years agoFix a pair of bugs in the emission of pubname tables:
Eric Christopher [Wed, 16 Oct 2013 01:37:49 +0000 (01:37 +0000)]
Fix a pair of bugs in the emission of pubname tables:

1) Make sure we emit static member variables by checking
at the end of createGlobalVariableDIE rather than piecemeal
in the function.
(As a note, createGlobalVariableDIE needs rewriting.)

2) Make sure we use the definition rather than declaration DIE
for two things: a) determining linkage for gnu pubnames, and b)
as the address of the DIE for global variables.
(As a note, createGlobalVariableDIE really needs rewriting.)

Adjust the testcase to make sure we're checking the correct DIEs.

llvm-svn: 192761

11 years agoAdd a MCAsmInfoELF class and factor some code into it.
Rafael Espindola [Wed, 16 Oct 2013 01:34:32 +0000 (01:34 +0000)]
Add a MCAsmInfoELF class and factor some code into it.

We had a MCAsmInfoCOFF, but no common class for all the ELF MCAsmInfos before.

llvm-svn: 192760

11 years agodos2unix on quoted-names.ll
Hans Wennborg [Wed, 16 Oct 2013 01:22:07 +0000 (01:22 +0000)]
dos2unix on quoted-names.ll

llvm-svn: 192759

11 years agoMC: Better handling of tricky symbol and section names
Hans Wennborg [Wed, 16 Oct 2013 01:20:40 +0000 (01:20 +0000)]
MC: Better handling of tricky symbol and section names

Because of win32 mangling, we produce symbol and section names with
funny characters in them, most notably @ characters.

MC would choke on trying to parse its own assembly output. This patch addresses
that by:

- Making @ trigger quoting of symbol names
- Also quote section names in the same way
- Just parse section names like other identifiers (to allow for quotes)
- Don't assume @ signifies a symbol variant if it is in a string.

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

llvm-svn: 192758

11 years agoMove .ident handling to MCStreamer.
Rafael Espindola [Wed, 16 Oct 2013 01:05:45 +0000 (01:05 +0000)]
Move .ident handling to MCStreamer.

No functionality change, but exposes the API so that codegen can use it too.

Patch by Katya Romanova.

llvm-svn: 192757

11 years agoFixing build warning/error
Andrew Kaylor [Wed, 16 Oct 2013 01:01:15 +0000 (01:01 +0000)]
Fixing build warning/error

llvm-svn: 192756

11 years agoSimplify zero initialization of DIEAttrs variable.
David Blaikie [Wed, 16 Oct 2013 00:47:21 +0000 (00:47 +0000)]
Simplify zero initialization of DIEAttrs variable.

llvm-svn: 192755

11 years agoAdding padding to the .eh_frame section in RuntimeDyld
Andrew Kaylor [Wed, 16 Oct 2013 00:32:24 +0000 (00:32 +0000)]
Adding padding to the .eh_frame section in RuntimeDyld

llvm-svn: 192754

11 years agoAdding support for deregistering EH frames with MCJIT.
Andrew Kaylor [Wed, 16 Oct 2013 00:14:21 +0000 (00:14 +0000)]
Adding support for deregistering EH frames with MCJIT.

Patch by Yaron Keren

llvm-svn: 192753

11 years agoFix typo
Matt Arsenault [Tue, 15 Oct 2013 23:44:48 +0000 (23:44 +0000)]
Fix typo

llvm-svn: 192752

11 years agoFix missing C++ mode thing in header
Matt Arsenault [Tue, 15 Oct 2013 23:44:45 +0000 (23:44 +0000)]
Fix missing C++ mode thing in header

llvm-svn: 192751

11 years agoEnable MI Sched for x86.
Andrew Trick [Tue, 15 Oct 2013 23:33:07 +0000 (23:33 +0000)]
Enable MI Sched for x86.

This changes the SelectionDAG scheduling preference to source
order. Soon, the SelectionDAG scheduler can be bypassed saving
a nice chunk of compile time.

Performance differences that result from this change are often a
consequence of register coalescing. The register coalescer is far from
perfect. Bugs can be filed for deficiencies.

On x86 SandyBridge/Haswell, the source order schedule is often
preserved, particularly for small blocks.

Register pressure is generally improved over the SD scheduler's ILP
mode. However, we are still able to handle large blocks that require
latency hiding, unlike the SD scheduler's BURR mode. MI scheduler also
attempts to discover the critical path in single-block loops and
adjust heuristics accordingly.

The MI scheduler relies on the new machine model. This is currently
unimplemented for AVX, so we may not be generating the best code yet.

Unit tests are updated so they don't depend on SD scheduling heuristics.

llvm-svn: 192750

11 years agoMake sure we're not attempting to construct a subprogram DIE
Eric Christopher [Tue, 15 Oct 2013 23:31:38 +0000 (23:31 +0000)]
Make sure we're not attempting to construct a subprogram DIE
twice and just look up the value. Fix the one case where
we were trying to create a subprogram DIE and we should already
have had one. Reflow formatting in collectDeadVariables while fixing.

llvm-svn: 192749

11 years agoAdd an assert that we have a scope that matters for methods
Eric Christopher [Tue, 15 Oct 2013 23:31:36 +0000 (23:31 +0000)]
Add an assert that we have a scope that matters for methods
and remove a call to getNonCompileUnitScope as a method
shouldn't be in the compile unit scope.

llvm-svn: 192748

11 years agoClean up, formatting, comments. No functional change.
Eric Christopher [Tue, 15 Oct 2013 23:31:31 +0000 (23:31 +0000)]
Clean up, formatting, comments. No functional change.

llvm-svn: 192747

11 years agoTest that we can merge together explicit and partial specializations from
Richard Smith [Tue, 15 Oct 2013 23:19:58 +0000 (23:19 +0000)]
Test that we can merge together explicit and partial specializations from
merged declarations of a class template.

llvm-svn: 192746

11 years agoSupport/FileSystem.h: Remove a trailing comma in enum file_magic::Impl.
NAKAMURA Takumi [Tue, 15 Oct 2013 23:01:44 +0000 (23:01 +0000)]
Support/FileSystem.h: Remove a trailing comma in enum file_magic::Impl.

llvm-svn: 192745

11 years agoUse ASSERT_EQ rather than ASSERT_TRUE for better unit test failures.
David Blaikie [Tue, 15 Oct 2013 23:00:17 +0000 (23:00 +0000)]
Use ASSERT_EQ rather than ASSERT_TRUE for better unit test failures.

Also minor using namespace move so it's not hard-up against the function
definition and outside the namespace as is usual.

llvm-svn: 192744

11 years agoR600/SI: Remove some leftover MI dump call
Vincent Lejeune [Tue, 15 Oct 2013 22:48:51 +0000 (22:48 +0000)]
R600/SI: Remove some leftover MI dump call

llvm-svn: 192743

11 years agoPath: Recognize Windows compiled resource file.
Rui Ueyama [Tue, 15 Oct 2013 22:45:38 +0000 (22:45 +0000)]
Path: Recognize Windows compiled resource file.

Some background: One can pass compiled resource files (.res files) directly
to the linker on Windows. If a resource file is given, the linker will run
"cvtres" command in background to convert the resource file to a COFF file
to link it.

What I'm trying to do with this patch is to make the linker to recognize
the resource file by file magic, so that it can run cvtres command.

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

llvm-svn: 192742

11 years ago<rdar://problem/15235492>
Enrico Granata [Tue, 15 Oct 2013 22:42:14 +0000 (22:42 +0000)]
<rdar://problem/15235492>

Extend DummySyntheticProvider to actually use debug-info vended children as the source of information
Make Python synthetic children either be valid, or fallback to the dummy, like their C++ counterparts

This allows LLDB to actually stop bailing out upon encountering an invalid synthetic children provider front-end, and still displaying the non synthetized ivar info

llvm-svn: 192741

11 years agoC++ modules: merging for enumerations and enumerators with multiple definitions
Richard Smith [Tue, 15 Oct 2013 22:02:41 +0000 (22:02 +0000)]
C++ modules: merging for enumerations and enumerators with multiple definitions
(eg through template instantiations in multiple modules).

llvm-svn: 192740

11 years agoTeach the AST dumper to dump the canonical declaration for a mergeable declaration.
Richard Smith [Tue, 15 Oct 2013 21:58:30 +0000 (21:58 +0000)]
Teach the AST dumper to dump the canonical declaration for a mergeable declaration.

llvm-svn: 192739

11 years agoRemove this regression test now that PR17578 is fixed (r192674). The fix is to
Yunzhong Gao [Tue, 15 Oct 2013 21:33:02 +0000 (21:33 +0000)]
Remove this regression test now that PR17578 is fixed (r192674). The fix is to
reject this test case at the Sema stage, so no CodeGen test should be needed.

llvm-svn: 192738

11 years agoSeparating ELF and MachO stub info functions for RuntimeDyld
Andrew Kaylor [Tue, 15 Oct 2013 21:32:56 +0000 (21:32 +0000)]
Separating ELF and MachO stub info functions for RuntimeDyld

llvm-svn: 192737

11 years agoReflow slightly.
Eric Christopher [Tue, 15 Oct 2013 21:22:34 +0000 (21:22 +0000)]
Reflow slightly.

llvm-svn: 192736

11 years agoReformat.
Eric Christopher [Tue, 15 Oct 2013 21:22:12 +0000 (21:22 +0000)]
Reformat.

llvm-svn: 192735

11 years ago[AArch64] Add support for NEON scalar signed saturating absolute value and
Chad Rosier [Tue, 15 Oct 2013 21:19:02 +0000 (21:19 +0000)]
[AArch64] Add support for NEON scalar signed saturating absolute value and
scalar signed saturating negate instructions.

llvm-svn: 192734

11 years ago[AArch64] Add support for NEON scalar signed saturating absolute value and
Chad Rosier [Tue, 15 Oct 2013 21:18:44 +0000 (21:18 +0000)]
[AArch64] Add support for NEON scalar signed saturating absolute value and
scalar signed saturating negate instructions.

llvm-svn: 192733

11 years agoFixing some host==target assumptions in RuntimeDyld
Andrew Kaylor [Tue, 15 Oct 2013 20:44:55 +0000 (20:44 +0000)]
Fixing some host==target assumptions in RuntimeDyld

llvm-svn: 192732

11 years agoRemove some dead code. (DarwinGDBCompat was retired in r189903).
Adrian Prantl [Tue, 15 Oct 2013 20:26:37 +0000 (20:26 +0000)]
Remove some dead code. (DarwinGDBCompat was retired in r189903).

llvm-svn: 192731

11 years agoStruct byval: fix a copy-paste error for thumb2.
Manman Ren [Tue, 15 Oct 2013 19:42:32 +0000 (19:42 +0000)]
Struct byval: fix a copy-paste error for thumb2.

PR17309

llvm-svn: 192730

11 years agoAdd constant evaluation support for __builtin_isinf, __builtin_isfinite,
Richard Smith [Tue, 15 Oct 2013 19:07:14 +0000 (19:07 +0000)]
Add constant evaluation support for __builtin_isinf, __builtin_isfinite,
__builtin_isnan, and __builtin_isnormal. Patch by Karthik Bhat! Tests by me.

llvm-svn: 192729

11 years agoAdd llvm_unreachable to pacify GCC's dropping off non-void function warning.
Benjamin Kramer [Tue, 15 Oct 2013 18:53:18 +0000 (18:53 +0000)]
Add llvm_unreachable to pacify GCC's dropping off non-void function warning.

+ 80 cols fix.

llvm-svn: 192728

11 years agoms-compat: Fix taking the address of a member of a dependent base
Reid Kleckner [Tue, 15 Oct 2013 18:38:02 +0000 (18:38 +0000)]
ms-compat: Fix taking the address of a member of a dependent base

If unqualified id lookup fails while parsing a class template with a
dependent base, clang with -fms-compatibility will pretend the user
prefixed the name with 'this->' in order to delay the lookup.  However,
if there was a unary ampersand, Sema::ActOnDependentIdExpression() will
create a DependentDeclRefExpr, which is not what we wanted at all.  Fix
this by building the CXXDependentScopeMemberExpr directly instead.

In order to be fully MSVC compatible, we would have to defer all
attempts at name lookup to instantiation time.  However, until we have
real problems with system headers that can't be parsed, we'll put off
implementing that.

Fixes PR16014.

Reviewers: rsmith

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

llvm-svn: 192727

11 years agostring.h and clang headers are apparently no longer necessary for SBType to compile
Enrico Granata [Tue, 15 Oct 2013 18:14:34 +0000 (18:14 +0000)]
string.h and clang headers are apparently no longer necessary for SBType to compile

llvm-svn: 192725

11 years agoUnbreak the build on OSX by defining Initialize() and Terminate() for the Windows...
Enrico Granata [Tue, 15 Oct 2013 18:11:29 +0000 (18:11 +0000)]
Unbreak the build on OSX by defining Initialize() and Terminate() for the Windows platform plugin

llvm-svn: 192724

11 years agoAdd missing dependency for clang-modernize.
Rui Ueyama [Tue, 15 Oct 2013 18:01:06 +0000 (18:01 +0000)]
Add missing dependency for clang-modernize.

Clang-modernize uses clang-apply-replacements internally but its CMakefile.txt
lacked the dependency.

llvm-svn: 192723

11 years agoFix PR17546
Michael Liao [Tue, 15 Oct 2013 17:51:58 +0000 (17:51 +0000)]
Fix PR17546

- Type of index used in extract_vector_elt or insert_vector_elt supposes
  to be TLI.getVectorIdxTy() which is pointer type on most targets. It'd
  better to truncate (or zero-extend in case it's changed later) it to
  mask element type to guarantee they are matching instead of asserting
  that.

llvm-svn: 192722

11 years agoFix PR16807
Michael Liao [Tue, 15 Oct 2013 17:51:02 +0000 (17:51 +0000)]
Fix PR16807

- Lower signed division by constant powers-of-2 to target-independent
  DAG operators instead of target-dependent ones to support them better
  on targets where vector types are legal but shift operators on that
  types are illegal. E.g., on AVX, PSRAW is only available on <8 x i16>
  though <16 x i16> is a legal type.

llvm-svn: 192721

11 years ago[libclang] For an unscoped enum include the enumerators in the top-level code-complet...
Argyrios Kyrtzidis [Tue, 15 Oct 2013 17:37:55 +0000 (17:37 +0000)]
[libclang] For an unscoped enum include the enumerators in the top-level code-completion hash since they enter the top-level namespace.

rdar://14703327

llvm-svn: 192720

11 years agoObjectiveC driver. Scrap -fno-objc-legacy-dispatch for NeXT
Fariborz Jahanian [Tue, 15 Oct 2013 17:16:30 +0000 (17:16 +0000)]
ObjectiveC driver. Scrap -fno-objc-legacy-dispatch for NeXT
runtime. It will be silently ignored and regardless
of deployment target. // rdar://14803286

llvm-svn: 192719

11 years ago[libclang] When querying for the availability of an enumerator, pick up the availabil...
Argyrios Kyrtzidis [Tue, 15 Oct 2013 17:00:53 +0000 (17:00 +0000)]
[libclang] When querying for the availability of an enumerator, pick up the availability from the enum declaration.

rdar://14789001.

llvm-svn: 192718

11 years agoLoopVectorize: Properly reflect PODness in comments.
Benjamin Kramer [Tue, 15 Oct 2013 16:19:54 +0000 (16:19 +0000)]
LoopVectorize: Properly reflect PODness in comments.

llvm-svn: 192717

11 years ago[lsan] Fix bug when discovering indirectly leaked objects.
Sergey Matveev [Tue, 15 Oct 2013 16:00:11 +0000 (16:00 +0000)]
[lsan] Fix bug when discovering indirectly leaked objects.

If an object contains pointers to itself, that doesn't make it indirectly
leaked. D'oh!

llvm-svn: 192716

11 years agotsan: introduce __tsan_default_options() function
Dmitry Vyukov [Tue, 15 Oct 2013 15:58:11 +0000 (15:58 +0000)]
tsan: introduce __tsan_default_options() function

The function allows to statically setup default values for flags.
The interafece matches what asan/msan provide.

llvm-svn: 192715

11 years agoPatch enabling lldb command line driver to run on windows.
Deepak Panickal [Tue, 15 Oct 2013 15:46:40 +0000 (15:46 +0000)]
Patch enabling lldb command line driver to run on windows.
CHANGES:
- Thread locking switched from pthreads to C++11 standard library.
- Abstracted platform specific header includes into 'platform.h'.
- Create editline emulator for windows.
- Emulated various platform dependant functions on windows.
TODO:
- User input currently handled by gets_s(), work started on better handler:
    see _WIP_INPUT_METHOD define blocks in 'ELWrapper.cpp'.
    Aim is to handle 'tab' auto completion on windows.
- Tidy up 'getopt.inc' from lldbHostCommon to serve as LLDB Drivers getopt windows implementation.

llvm-svn: 192714

11 years agoModuleAssistant: Fix warning, don't return bool as a pointer.
Will Dietz [Tue, 15 Oct 2013 15:45:00 +0000 (15:45 +0000)]
ModuleAssistant: Fix warning, don't return bool as a pointer.

No functionality change intended.

llvm-svn: 192713

11 years agoDon't depend on alias to declarations.
Rafael Espindola [Tue, 15 Oct 2013 15:40:03 +0000 (15:40 +0000)]
Don't depend on alias to declarations.

Accepting them is a bug (pr17535), not a feature.

llvm-svn: 192712

11 years agotsan: be silent if verbosity=0
Dmitry Vyukov [Tue, 15 Oct 2013 15:35:56 +0000 (15:35 +0000)]
tsan: be silent if verbosity=0

Currently tests fail with:
Check failed: 'AAA' == 'AAA ==26017==Could not detach from thread 361395 (errno 3).'

llvm-svn: 192711

11 years agoclang-format: No empty line after 'public:'
Tobias Grosser [Tue, 15 Oct 2013 14:41:02 +0000 (14:41 +0000)]
clang-format: No empty line after 'public:'

llvm-svn: 192710

11 years agoGuard the debug temp variable with NDEBUG to avoid warning/error with NDEBUG defined.
Pekka Jaaskelainen [Tue, 15 Oct 2013 14:40:46 +0000 (14:40 +0000)]
Guard the debug temp variable with NDEBUG to avoid warning/error with NDEBUG defined.

llvm-svn: 192709

11 years agoFixed code style of my change.
Serge Pavlov [Tue, 15 Oct 2013 14:24:32 +0000 (14:24 +0000)]
Fixed code style of my change.

llvm-svn: 192708

11 years agoDo not assert when trying to add a meta data operand with
Pekka Jaaskelainen [Tue, 15 Oct 2013 14:18:10 +0000 (14:18 +0000)]
Do not assert when trying to add a meta data operand with
MachineInstr::addOperand().

llvm-svn: 192707

11 years agotsan: remove __sanitizer_set_report_fd function from public interface
Dmitry Vyukov [Tue, 15 Oct 2013 14:14:34 +0000 (14:14 +0000)]
tsan: remove __sanitizer_set_report_fd function from public interface
__sanitizer_set_report_path now accepts two special values - stderr and stdout
logging to other file descriptors is not supported anymore,
it's fragile in presence of multiple processes, fork, etc

llvm-svn: 192706

11 years agotsan: use verbosity flag in sanitizer_common code directly
Dmitry Vyukov [Tue, 15 Oct 2013 14:12:26 +0000 (14:12 +0000)]
tsan: use verbosity flag in sanitizer_common code directly
now it's available from common_flags()

llvm-svn: 192705

11 years agotsan: actually parse verbofity flag
Dmitry Vyukov [Tue, 15 Oct 2013 14:00:28 +0000 (14:00 +0000)]
tsan: actually parse verbofity flag

llvm-svn: 192704

11 years agoAdded module map generation option.
John Thompson [Tue, 15 Oct 2013 13:52:33 +0000 (13:52 +0000)]
Added module map generation option.

llvm-svn: 192703

11 years agoUpdate makefiles to build PlatformWindows
Deepak Panickal [Tue, 15 Oct 2013 13:52:20 +0000 (13:52 +0000)]
Update makefiles to build PlatformWindows

llvm-svn: 192702

11 years agotsan: move verbosity flag to CommonFlags
Dmitry Vyukov [Tue, 15 Oct 2013 13:28:51 +0000 (13:28 +0000)]
tsan: move verbosity flag to CommonFlags

llvm-svn: 192701

11 years agotsan: do not leave trash source files in source dir
Dmitry Vyukov [Tue, 15 Oct 2013 13:23:29 +0000 (13:23 +0000)]
tsan: do not leave trash source files in source dir

llvm-svn: 192700

11 years ago[mips][msa] Added support for build_vector for v4f32 and v2f64.
Daniel Sanders [Tue, 15 Oct 2013 13:14:41 +0000 (13:14 +0000)]
[mips][msa] Added support for build_vector for v4f32 and v2f64.

llvm-svn: 192699

11 years agotsan: refactor overly-complex logical condition
Dmitry Vyukov [Tue, 15 Oct 2013 13:04:42 +0000 (13:04 +0000)]
tsan: refactor overly-complex logical condition

llvm-svn: 192698

11 years agoRevert "Add AllTargetsBindings sublibrary" as it breaks cmake build on (atleast)...
Anders Waldenborg [Tue, 15 Oct 2013 13:04:27 +0000 (13:04 +0000)]
Revert "Add AllTargetsBindings sublibrary" as it breaks cmake build on (atleast) windows and darwin.

llvm-svn: 192697

11 years agotsan: fix Go build
Dmitry Vyukov [Tue, 15 Oct 2013 13:03:06 +0000 (13:03 +0000)]
tsan: fix Go build

llvm-svn: 192696

11 years agotsan: move kernel struct definition from sanitizer_linux.h to sanitizer_platform_limi...
Dmitry Vyukov [Tue, 15 Oct 2013 12:57:59 +0000 (12:57 +0000)]
tsan: move kernel struct definition from sanitizer_linux.h to sanitizer_platform_limits_posix.h

llvm-svn: 192695

11 years agotsan: do not build llvm from scratch on each presubmit
Dmitry Vyukov [Tue, 15 Oct 2013 12:54:50 +0000 (12:54 +0000)]
tsan: do not build llvm from scratch on each presubmit

llvm-svn: 192694

11 years agoPatch to add PlatformWindows, based on Carlo Kok's version from the Windows branch.
Deepak Panickal [Tue, 15 Oct 2013 12:32:12 +0000 (12:32 +0000)]
Patch to add PlatformWindows, based on Carlo Kok's version from the Windows branch.

llvm-svn: 192693

11 years agotsan: use sanitizer::CommonFlags in tsan
Dmitry Vyukov [Tue, 15 Oct 2013 12:25:29 +0000 (12:25 +0000)]
tsan: use sanitizer::CommonFlags in tsan

llvm-svn: 192692

11 years ago[msan] Remove CallocOverflow test.
Evgeniy Stepanov [Tue, 15 Oct 2013 12:20:16 +0000 (12:20 +0000)]
[msan] Remove CallocOverflow test.

This behaviour depends on MSAN_OPTIONS.
All interesting combinations are covered by lit_tests/allocator_returns_null.cc.

llvm-svn: 192691

11 years agoAdd AllTargetsBindings sublibrary instead of having static inlines in the llvm-c...
Anders Waldenborg [Tue, 15 Oct 2013 12:08:59 +0000 (12:08 +0000)]
Add AllTargetsBindings sublibrary instead of having static inlines in the llvm-c headers.

This new library will be linked in when using the "all-targets"
component and contains the LLVMInitializeAll* functions.

This means that those functions will exist as real symbols in
the shared library, and can therefore can be called from
bindings that are using ffi the shared library.

llvm-svn: 192690