platform/upstream/llvm.git
9 years agoFix some clang warnings in WinEHPrepare
Reid Kleckner [Wed, 11 Mar 2015 23:39:36 +0000 (23:39 +0000)]
Fix some clang warnings in WinEHPrepare

llvm-svn: 231985

9 years agoHandle big index in getelementptr instruction
Reid Kleckner [Wed, 11 Mar 2015 23:36:10 +0000 (23:36 +0000)]
Handle big index in getelementptr instruction

CodeGen incorrectly ignores (assert from APInt) constant index bigger
than 2^64 in getelementptr instruction. This is a test and fix for that.

Patch by PaweÅ‚ Bylica!

Reviewed By: rnk

Subscribers: majnemer, rnk, mcrosier, resistor, llvm-commits

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

llvm-svn: 231984

9 years agoAdd deprecation notice for -f(no-)sanitize-recover flags.
Alexey Samsonov [Wed, 11 Mar 2015 23:34:25 +0000 (23:34 +0000)]
Add deprecation notice for -f(no-)sanitize-recover flags.

These flags should be replaced with corresponding
-f(no-)sanitize-recover=<list> flags.

llvm-svn: 231983

9 years ago[PowerPC] Remove canFoldAsLoad from instruction definitions
Hal Finkel [Wed, 11 Mar 2015 23:28:38 +0000 (23:28 +0000)]
[PowerPC] Remove canFoldAsLoad from instruction definitions

The PowerPC backend had a number of loads that were marked as canFoldAsLoad
(and I'm partially at fault here for copying around the relevant line of
TableGen definitions without really looking at what it meant). This is not
right; PPC (non-memory) instructions don't support direct memory operands, and
so there is nothing a 'foldable' instruction could be folded into.

Noticed by inspection, no test case.

The one thing we might lose by doing this is ability to fold some loads into
stackmap/patchpoint pseudo-instructions. However, this was untested, and would
not obviously have worked for extending loads, and I'd rather re-add support
for that once it can be tested.

llvm-svn: 231982

9 years agoExtended support for native Windows C++ EH outlining
Andrew Kaylor [Wed, 11 Mar 2015 23:22:06 +0000 (23:22 +0000)]
Extended support for native Windows C++ EH outlining

Differential Review: http://reviews.llvm.org/D7886

llvm-svn: 231981

9 years agoRemove useMachineScheduler and replace it with subtarget options
Eric Christopher [Wed, 11 Mar 2015 22:56:10 +0000 (22:56 +0000)]
Remove useMachineScheduler and replace it with subtarget options
that control, individually, all of the disparate things it was
controlling.

At the same time move a FIXME in the Hexagon port to a new
subtarget function that will enable a user of the machine
scheduler to avoid using the source scheduler for pre-RA-scheduling.
The FIXME would have this removed, but involves either testcase
changes or adding -pre-RA-sched=source to a few testcases.

llvm-svn: 231980

9 years agoHave getCallPreservedMask and getThisCallPreservedMask take a
Eric Christopher [Wed, 11 Mar 2015 22:42:13 +0000 (22:42 +0000)]
Have getCallPreservedMask and getThisCallPreservedMask take a
MachineFunction argument so that we can grab subtarget specific
features off of it.

llvm-svn: 231979

9 years ago[analyzer] www: +progress for undefbehavior.ZeroAllocDereference
Anton Yartsev [Wed, 11 Mar 2015 22:29:32 +0000 (22:29 +0000)]
[analyzer] www: +progress for undefbehavior.ZeroAllocDereference

llvm-svn: 231978

9 years agoOne more getCalleeSavedRegs prototype with nullptr.
Eric Christopher [Wed, 11 Mar 2015 22:24:37 +0000 (22:24 +0000)]
One more getCalleeSavedRegs prototype with nullptr.

llvm-svn: 231977

9 years agoDon't rely on the elf test suites inputs when testing the driver. We
Chandler Carruth [Wed, 11 Mar 2015 22:12:40 +0000 (22:12 +0000)]
Don't rely on the elf test suites inputs when testing the driver. We
already have a perfectly cromulent test archive in the driver inputs.

llvm-svn: 231976

9 years agoBe nicer to C90 environments and avoid the declaration of variables in for
Joerg Sonnenberger [Wed, 11 Mar 2015 22:06:53 +0000 (22:06 +0000)]
Be nicer to C90 environments and avoid the declaration of variables in for
header.

From Alexander Esilevich.

llvm-svn: 231975

9 years agoAdd the option, -info-plist to llvm-objdump used with -macho to print the
Kevin Enderby [Wed, 11 Mar 2015 22:06:32 +0000 (22:06 +0000)]
Add the option, -info-plist to llvm-objdump used with -macho to print the
Mach-O info plist section as strings.

llvm-svn: 231974

9 years agoMove the 'linker-script-test' binary to the tools directory.
Chandler Carruth [Wed, 11 Mar 2015 22:05:49 +0000 (22:05 +0000)]
Move the 'linker-script-test' binary to the tools directory.

The canonical LLVM directory arrangement places binaries in the 'utils/'
tree when they are used as part of building the project. For example,
the tblgen binaries are built out of 'utils/' trees.

Tools which are not used by any other part of the build, including
testing utilities, are just in the 'tools' directory. For example, in
Clang we have 'c-index-test' which is exactly the same kind of thing as
'linker-script-test'.

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

llvm-svn: 231973

9 years agoAlways include stddef.h to make sure size_t exists.
Joerg Sonnenberger [Wed, 11 Mar 2015 21:58:40 +0000 (21:58 +0000)]
Always include stddef.h to make sure size_t exists.

From Alexander Esilevich.

llvm-svn: 231972

9 years agoDon't overconstrain a FileCheck pattern
David Majnemer [Wed, 11 Mar 2015 21:50:09 +0000 (21:50 +0000)]
Don't overconstrain a FileCheck pattern

llvm-svn: 231971

9 years agoHave getCalleeSavedRegs take a non-null MachineFunction all the
Eric Christopher [Wed, 11 Mar 2015 21:41:28 +0000 (21:41 +0000)]
Have getCalleeSavedRegs take a non-null MachineFunction all the
time. The target independent code was passing in one all the
time and targets weren't checking validity before using. Update
a few calls to pass in a MachineFunction where necessary.

llvm-svn: 231970

9 years agoConstify AArch64CollectLOH.cpp. NFC
Pete Cooper [Wed, 11 Mar 2015 21:40:25 +0000 (21:40 +0000)]
Constify AArch64CollectLOH.cpp.  NFC

llvm-svn: 231969

9 years agoFix a comparison function to actually be a SWO so that it conforms to
Chandler Carruth [Wed, 11 Mar 2015 21:34:33 +0000 (21:34 +0000)]
Fix a comparison function to actually be a SWO so that it conforms to
the spec required by std::sort and friends.

Ordering things this way also dramatically simplifies the code as
short-circuit ensures we can skip all of the negative tests.

I've left one FIXME where we're establishing a fairly arbitrary
ordering. Previously, the function compared all types as equal except
for the ones it explicitly handled, but it didn't delegate correctly to
the atomflags when doing so, and so it would fail to be a SWO. The two
possible fixes are to stop comparing the atom flags entirely, or to
establish some arbitrary ordering of the types.

Since it was pure luck which ordering of unequal types we ended up with
previously (the caller was std::sort, not std::stable_sort) I chose to
make the ordering explicit and guaranteed. This seems like the best
conservative approach as I suspect we would want to switch to
stable_sort otherwise in order to have deterministic output.

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

llvm-svn: 231968

9 years agoRevert "[dsymutil] Gather function ranges during DIE selection."
Frederic Riss [Wed, 11 Mar 2015 21:17:41 +0000 (21:17 +0000)]
Revert "[dsymutil] Gather function ranges during DIE selection."

This reverts commit r231957.

IntervalMap currently doesn't support keys more aligned than host pointers
and I've been using it with uint64_t keys. This asserts on some 32bits
systems.

Revert while I work on an IntervalMap generalization.

llvm-svn: 231967

9 years agoInitialize ProcessGDBRemoteLog for LLGS to fix remote platform logging
Robert Flack [Wed, 11 Mar 2015 21:14:22 +0000 (21:14 +0000)]
Initialize ProcessGDBRemoteLog for LLGS to fix remote platform logging

This was previously initialized by ProcessGDBRemote::Initialize but lldb-server does not contain ProcessGDBRemote anymore so this needs to be initialized directly.

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

llvm-svn: 231966

9 years agoRefactor float to integer conversion to share the same code.
Joerg Sonnenberger [Wed, 11 Mar 2015 21:13:56 +0000 (21:13 +0000)]
Refactor float to integer conversion to share the same code.
80bit Intel/PPC long double is excluded due to lacking support
for the abstraction. Consistently provide saturation logic.
Extend to long double on 128bit IEEE extended platforms.

Initial patch with test cases from GuanHong Liu.
Reviewed by Steve Canon.

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

llvm-svn: 231965

9 years agoReduce the number of components initialized for LLGS further.
Robert Flack [Wed, 11 Mar 2015 20:35:05 +0000 (20:35 +0000)]
Reduce the number of components initialized for LLGS further.

In http://reviews.llvm.org/D7880 the initialization for LLGS was separated out so that LLGS could initialize only the components it needs to. This further reduces the set of components initialized for LLGS.

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

llvm-svn: 231964

9 years ago[mips][microMIPS] Make usage of NOT16 by code generator
Jozef Kolek [Wed, 11 Mar 2015 20:28:31 +0000 (20:28 +0000)]
[mips][microMIPS] Make usage of NOT16 by code generator

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

llvm-svn: 231963

9 years agoadd CHECK-LABELs for better reliability
Sanjay Patel [Wed, 11 Mar 2015 20:12:07 +0000 (20:12 +0000)]
add CHECK-LABELs for better reliability

llvm-svn: 231962

9 years agoPut jump tables in unique sections on COFF.
Rafael Espindola [Wed, 11 Mar 2015 19:58:37 +0000 (19:58 +0000)]
Put jump tables in unique sections on COFF.

If a function is going in an unique section (because of -ffunction-sections
for example), putting a jump table in .rodata will keep .rodata alive and
that will keep alive any other function that also has a jump table.

Instead, put the jump table in a unique section that is associated with the
function.

llvm-svn: 231961

9 years ago[PowerPC] ABI support for the QPX vector instruction set
Hal Finkel [Wed, 11 Mar 2015 19:14:15 +0000 (19:14 +0000)]
[PowerPC] ABI support for the QPX vector instruction set

Support for the QPX vector instruction set, used on the IBM BG/Q supercomputer,
has recently been added to the LLVM PowerPC backend. This vector instruction
set requires some ABI modifications because the ABI on the BG/Q expects
<4 x double> vectors to be provided with 32-byte stack alignment, and to be
handled as native vector types (similar to how Altivec vectors are handled on
mainline PPC systems). I've named this ABI variant elfv1-qpx, have made this
the default ABI when QPX is supported, and have updated the ABI handling code
to provide QPX vectors with the correct stack alignment and associated
register-assignment logic.

llvm-svn: 231960

9 years agoARM: simplify and extend byval handling
Tim Northover [Wed, 11 Mar 2015 18:54:22 +0000 (18:54 +0000)]
ARM: simplify and extend byval handling

The main issue being fixed here is that APCS targets handling a "byval align N"
parameter with N > 4 were miscounting what objects were where on the stack,
leading to FrameLowering setting the frame pointer incorrectly and clobbering
the stack.

But byval handling had grown over many years, and had multiple layers of cruft
trying to compensate for each other and calculate padding correctly. This only
really needs to be done once, in the HandleByVal function. Elsewhere should
just do what it's told by that call.

I also stripped out unnecessary APCS/AAPCS distinctions (now that Clang emits
byvals with the correct C ABI alignment), which simplified HandleByVal.

rdar://20095672

llvm-svn: 231959

9 years ago[dsymutil] Add missing headers.
Frederic Riss [Wed, 11 Mar 2015 18:46:01 +0000 (18:46 +0000)]
[dsymutil] Add missing headers.

No build failure, found by code inspection.

llvm-svn: 231958

9 years ago[dsymutil] Gather function ranges during DIE selection.
Frederic Riss [Wed, 11 Mar 2015 18:45:59 +0000 (18:45 +0000)]
[dsymutil] Gather function ranges during DIE selection.

Gather the function ranges [low_pc, high_pc) during DIE selection and
store them along with the offset to apply to them to get the linked
addresses.

This is just the data collection part, it comes with no tests. That
information will be used in multiple followup commits to perform the
relocation of line tables and range sections among other things, and
these commits will add tests.

llvm-svn: 231957

9 years ago[dsymutil] Small clang-format patch.
Frederic Riss [Wed, 11 Mar 2015 18:45:57 +0000 (18:45 +0000)]
[dsymutil] Small clang-format patch.

llvm-svn: 231956

9 years ago[dsymutil] Correctly clone address attributes.
Frederic Riss [Wed, 11 Mar 2015 18:45:52 +0000 (18:45 +0000)]
[dsymutil] Correctly clone address attributes.

DW_AT_low_pc on functions is taken care of by the relocation processing, but
DW_AT_high_pc and DW_AT_low_pc on other lexical scopes need special handling.

llvm-svn: 231955

9 years agoRemove the need to cache the subtarget in the R600 TargetRegisterInfo
Eric Christopher [Wed, 11 Mar 2015 18:43:21 +0000 (18:43 +0000)]
Remove the need to cache the subtarget in the R600 TargetRegisterInfo
classes.

llvm-svn: 231954

9 years agoMS ABI: Mark 'throw' as implemented in the compatibility doc
David Majnemer [Wed, 11 Mar 2015 18:38:51 +0000 (18:38 +0000)]
MS ABI: Mark 'throw' as implemented in the compatibility doc

llvm-svn: 231953

9 years agoMS ABI: Implement copy-ctor closures, finish implementing throw
David Majnemer [Wed, 11 Mar 2015 18:36:39 +0000 (18:36 +0000)]
MS ABI: Implement copy-ctor closures, finish implementing throw

This adds support for copy-constructor closures.  These are generated
when the C++ runtime has to call a copy-constructor with a particular
calling convention or with default arguments substituted in to the call.

Because the runtime has no mechanism to call the function with a
different calling convention or know-how to evaluate the default
arguments at run-time, we create a thunk which will do all the
appropriate work and package it in a way the runtime can use.

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

llvm-svn: 231952

9 years agoHave getRegPressureSetLimit take a MachineFunction so that a
Eric Christopher [Wed, 11 Mar 2015 18:34:58 +0000 (18:34 +0000)]
Have getRegPressureSetLimit take a MachineFunction so that a
we can inspect the subtarget and function when computing values.

llvm-svn: 231951

9 years ago[modules] When merging the pattern of a class template definition into a prior
Richard Smith [Wed, 11 Mar 2015 18:21:02 +0000 (18:21 +0000)]
[modules] When merging the pattern of a class template definition into a prior
definition, be sure to update the definition data on all declarations, not just
the canonical one, since the pattern might not be in the list of pending
definitions (if it used to be canonical itself).

One-line fix by me; reduced testcase by Daniel Jasper!

llvm-svn: 231950

9 years agoPass a process full executable path within "name" response field.
Oleksiy Vyalov [Wed, 11 Mar 2015 18:13:37 +0000 (18:13 +0000)]
Pass a process full executable path within "name" response field.

http://reviews.llvm.org/D8239

llvm-svn: 231949

9 years agoInstCombine: Don't fold call bitcast into args if callee is byval
David Majnemer [Wed, 11 Mar 2015 18:03:05 +0000 (18:03 +0000)]
InstCombine: Don't fold call bitcast into args if callee is byval

This fixes a bug reported here:
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20150309/265341.html

llvm-svn: 231948

9 years ago[ASan/Win] Fix a CHECK failure when an exception is thrown from a callback passed...
Timur Iskhodzhanov [Wed, 11 Mar 2015 17:47:10 +0000 (17:47 +0000)]
[ASan/Win] Fix a CHECK failure when an exception is thrown from a callback passed to QueueUserWorkItem

llvm-svn: 231947

9 years agoUpdated with list of possible improvements we are tracking internally
Kit Barton [Wed, 11 Mar 2015 17:43:43 +0000 (17:43 +0000)]
Updated with list of possible improvements we are tracking internally

llvm-svn: 231946

9 years agoAdd the "vbroadcasti128" instruction back.
Juergen Ributzka [Wed, 11 Mar 2015 17:29:03 +0000 (17:29 +0000)]
Add the "vbroadcasti128" instruction back.

This is a follow-up to r231182. This adds the "vbroadcasti128" instruction
back, but without the intrinsic mapping. Also add a test to check the
instriction encoding.

This is related to rdar://problem/18742778.

llvm-svn: 231945

9 years agoReverted OpenCL2.0 atomic type commits r231932, r231935
Anastasia Stulova [Wed, 11 Mar 2015 17:26:37 +0000 (17:26 +0000)]
Reverted OpenCL2.0 atomic type commits r231932, r231935
(caused undesirable update of -std flag to use _Atomic)

llvm-svn: 231942

9 years ago[clang-tidy] Static Analyzer checker configuration options pass-through.
Gabor Horvath [Wed, 11 Mar 2015 17:25:22 +0000 (17:25 +0000)]
[clang-tidy] Static Analyzer checker configuration options pass-through.

Reviewed by: Alexander Kornienko

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

llvm-svn: 231941

9 years agoFix ctype_byname<wchar_t>::do_is() mask checking.... again
Jonathan Roelofs [Wed, 11 Mar 2015 17:00:28 +0000 (17:00 +0000)]
Fix ctype_byname<wchar_t>::do_is() mask checking.... again

This basically reverts the revert in r216508, and fixes a few more cases while
I'm at it. Reading my commit message on that commit again, I think it's bupkis.

http://reviews.llvm.org/D8237

llvm-svn: 231940

9 years agorevert r231700 (designated initializer patch) which broke
Fariborz Jahanian [Wed, 11 Mar 2015 16:59:48 +0000 (16:59 +0000)]
revert r231700 (designated initializer patch) which broke
several projects. rdar://20120666.

llvm-svn: 231939

9 years ago[clang-tidy] Clean up misc-use-override warning. NFC
Alexander Kornienko [Wed, 11 Mar 2015 16:47:27 +0000 (16:47 +0000)]
[clang-tidy] Clean up misc-use-override warning. NFC

llvm-svn: 231938

9 years agoDisable cat*() on CloudABI. Also make tiny cleanups.
Ed Schouten [Wed, 11 Mar 2015 16:39:36 +0000 (16:39 +0000)]
Disable cat*() on CloudABI. Also make tiny cleanups.

On a new platform that I am working on
(https://github.com/NuxiNL/cloudlibc) I am not implementing the
cat{open,close,gets}() API, just like Android, Newlib, etc.

Instead of adding yet another operating system name to the #ifs,
introduce _LIBCPP_HAS_CATOPEN in include/__config. Also adjust the code
to only pull in nl_types.h when _LIBCPP_HAS_CATOPEN is set. We only
needed this header for the cat*() API.

Differential Revision: http://reviews.llvm.org/D8163
Reviewed by: marshall

llvm-svn: 231937

9 years agoAdd a CODE_OWNERS.txt file to LLDB.
Zachary Turner [Wed, 11 Mar 2015 16:26:46 +0000 (16:26 +0000)]
Add a CODE_OWNERS.txt file to LLDB.

llvm-svn: 231936

9 years agoOpenCL: CL2.0 atomic type diagnostics
Anastasia Stulova [Wed, 11 Mar 2015 16:23:10 +0000 (16:23 +0000)]
OpenCL: CL2.0 atomic type diagnostics

Added restictions for atomic type usage from OpenCL C Spec Section 6.13.11.8

llvm-svn: 231935

9 years agoMake NaCl's use of .init_array for static constructors match Linux
Derek Schuff [Wed, 11 Mar 2015 16:16:09 +0000 (16:16 +0000)]
Make NaCl's use of .init_array for static constructors match Linux

Summary:
The generic ELF TargetObjectFile defaults to .ctors, but Linux's
defaults to .init_array by calling InitializeELF with the value of
UseInitArray from TargetMachine. Make NaCl's behavior match.

Reviewers: jvoung
Differential Revision: http://reviews.llvm.org/D8240

llvm-svn: 231934

9 years agoWrap in __MINGW32__ to avoid warnings from msvc.
Benjamin Kramer [Wed, 11 Mar 2015 16:09:02 +0000 (16:09 +0000)]
Wrap in __MINGW32__ to avoid warnings from msvc.

llvm-svn: 231933

9 years agoOpenCL: CL2.0 atomic types
Anastasia Stulova [Wed, 11 Mar 2015 15:57:53 +0000 (15:57 +0000)]
OpenCL: CL2.0 atomic types

OpenCL C Spec v2.0 Section 6.13.11

- Made c11 _Atomic being accepted only for c11 compilations

- Implemented CL2.0 atomics by aliasing them to the corresponding c11 atomic types using implicit typedef

- Added diagnostics for atomics Khronos extension enabling

llvm-svn: 231932

9 years agoAdd builtins for the 64-bit vector integer arithmetic instructions added in POWER8.
Kit Barton [Wed, 11 Mar 2015 15:57:19 +0000 (15:57 +0000)]
Add builtins for the 64-bit vector integer arithmetic instructions added in POWER8.

These are the Clang-related changes for the instructions added to LLVM in http://reviews.llvm.org/D7959.

Phabricator review: http://reviews.llvm.org/D8041

llvm-svn: 231931

9 years agoAdd missing namespace specifier for MSVC.
Benjamin Kramer [Wed, 11 Mar 2015 15:53:24 +0000 (15:53 +0000)]
Add missing namespace specifier for MSVC.

llvm-svn: 231930

9 years agoRtlCaptureContext is absent from the mingw32 headers, provide a prototype.
Benjamin Kramer [Wed, 11 Mar 2015 15:41:15 +0000 (15:41 +0000)]
RtlCaptureContext is absent from the mingw32 headers, provide a prototype.

llvm-svn: 231929

9 years agoLinkerScript: Add parsing of the MEMORY command
Meador Inge [Wed, 11 Mar 2015 15:34:44 +0000 (15:34 +0000)]
LinkerScript: Add parsing of the MEMORY command

This patch implements parsing of the GNU ld MEMORY command [1].
The command and the memory block definitions are parsed as
specified (including the slightly strange "o" and "l" keywords).
Evaluation will be added at a later point in time.

[1] https://sourceware.org/binutils/docs-2.25/ld/MEMORY.html

llvm-svn: 231928

9 years agoInliner should not add callgraph edges for intrinsic calls (PR22857)
Sanjay Patel [Wed, 11 Mar 2015 15:12:32 +0000 (15:12 +0000)]
Inliner should not add callgraph edges for intrinsic calls (PR22857)

The CallGraphNode function "addCalledFunction()" asserts that edges are not to intrinsics.

This patch makes sure that the Inliner does not add such an edge to the callgraph.

Fix for clang crash by assertion: https://llvm.org/bugs/show_bug.cgi?id=22857

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

llvm-svn: 231927

9 years agoclang-format: Recognize the .ts (TypeScript) extension as JavaScript.
Daniel Jasper [Wed, 11 Mar 2015 14:58:38 +0000 (14:58 +0000)]
clang-format: Recognize the .ts (TypeScript) extension as JavaScript.

Patch by Martin Probst. Thank you.

llvm-svn: 231926

9 years agoRevert "[CMake] Don't pass in MSVC warning flags as definitions"
Greg Bedwell [Wed, 11 Mar 2015 14:57:48 +0000 (14:57 +0000)]
Revert "[CMake] Don't pass in MSVC warning flags as definitions"

reverting while I investigate why it broke the sanitizer-windows build.
This reverts commit r231924.

llvm-svn: 231925

9 years ago[CMake] Don't pass in MSVC warning flags as definitions
Greg Bedwell [Wed, 11 Mar 2015 14:26:29 +0000 (14:26 +0000)]
[CMake] Don't pass in MSVC warning flags as definitions

NFC currently but required as a prerequisite for using
the Microsoft resource compiler in conjunction with
CMake's ninja generator, which knows how to filter flags
appropriately, but not definitions.

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

llvm-svn: 231924

9 years agoPrefer pipes over temporary files in a feeble attempt to stabilize this test on windows.
Benjamin Kramer [Wed, 11 Mar 2015 13:55:41 +0000 (13:55 +0000)]
Prefer pipes over temporary files in a feeble attempt to stabilize this test on windows.

llvm-svn: 231923

9 years agoRefactor GdbRemote test cases to support remote platforms
Tamas Berghammer [Wed, 11 Mar 2015 13:51:07 +0000 (13:51 +0000)]
Refactor GdbRemote test cases to support remote platforms

Previously these test cases execute lldb-server on the host and run the
tests against it even if a remote platform was specified. With this CL
these tests always test the communication with an lldb-server instance
running on the target.

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

llvm-svn: 231922

9 years agoFix too short title underline reported by build-bot.
Dan Liew [Wed, 11 Mar 2015 13:34:49 +0000 (13:34 +0000)]
Fix too short title underline reported by build-bot.

llvm-svn: 231921

9 years agoclang-format: Fix incorrect && recognition.
Daniel Jasper [Wed, 11 Mar 2015 12:59:49 +0000 (12:59 +0000)]
clang-format: Fix incorrect && recognition.

Before:
  if (a &&(b = c)) ..

After:
  if (a && (b = c)) ..

llvm-svn: 231920

9 years agoRelax CHECK to match mips syntax.
Rafael Espindola [Wed, 11 Mar 2015 12:48:24 +0000 (12:48 +0000)]
Relax CHECK to match mips syntax.

llvm-svn: 231919

9 years agoMove MiInterpreterExecTestCase to test/tools/lldb-mi/interpreter folder (MI)
Ilia K [Wed, 11 Mar 2015 12:28:48 +0000 (12:28 +0000)]
Move MiInterpreterExecTestCase to test/tools/lldb-mi/interpreter folder (MI)

llvm-svn: 231918

9 years agoFix build on Windows (PATH_MAX was undefined) after r231858
Ilia K [Wed, 11 Mar 2015 11:24:10 +0000 (11:24 +0000)]
Fix build on Windows (PATH_MAX was undefined) after r231858

llvm-svn: 231917

9 years agoAVX-512: Added SKX forms of shift instructions.
Elena Demikhovsky [Wed, 11 Mar 2015 10:25:42 +0000 (10:25 +0000)]
AVX-512: Added SKX forms of shift instructions.
Added rotation instructions, encoding only.
Added encoding tests for all these forms.

llvm-svn: 231916

9 years agoFix bug in ProcessGDBRemote
Pavel Labath [Wed, 11 Mar 2015 09:53:42 +0000 (09:53 +0000)]
Fix bug in ProcessGDBRemote

Summary:
ProcessGDBRemote::AsyncThread nuked its own thread handle upon exiting. This prevented the main
thread from joining it correctly in StopAsyncThread. I address this by moving the Reset() call to
StopAsyncThread, after the join.

Reviewers: clayborg, zturner

Subscribers: lldb-commits

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

llvm-svn: 231915

9 years agoEnable security checks for arc4random() on CloudABI as well.
Ed Schouten [Wed, 11 Mar 2015 08:48:55 +0000 (08:48 +0000)]
Enable security checks for arc4random() on CloudABI as well.

CloudABI also supports the arc4random() function. We can enable compiler
warnings for rand(), random() and *rand48() on this system as well.

llvm-svn: 231914

9 years agoFix up default header paths for CloudABI.
Ed Schouten [Wed, 11 Mar 2015 08:46:01 +0000 (08:46 +0000)]
Fix up default header paths for CloudABI.

CloudABI is a pure cross compilation target. This means that we should
not add /usr/include and /usr/local/include. Instead, headers are stored
in $sysroot/$triple/include.

The method of going back to the sysroot (by using "../../..") is also
used in this function for some of the other environments (e.g., MinGW).

llvm-svn: 231913

9 years agoAdd target information for CloudABI on x86-64.
Ed Schouten [Wed, 11 Mar 2015 08:42:46 +0000 (08:42 +0000)]
Add target information for CloudABI on x86-64.

CloudABI can be identified by the __CloudABI__ preprocessor definition. The
system uses ELF executables.

CloudABI uses Unicode 7.0.0 for the encoding of wchar_t. As Unicode 7.0.0 is
synchronized with ISO/IEC 10646:2012 (released on 2012-06-01),
__STDC_ISO_10646__ is defined as 201206L.

llvm-svn: 231912

9 years agoNow that r231902's test is executed, make it actually pass
Justin Bogner [Wed, 11 Mar 2015 08:17:25 +0000 (08:17 +0000)]
Now that r231902's test is executed, make it actually pass

As of r231908, the test I added in r231902 actually gets run - but I'd
checked in a stale version of the input so it didn't pass. Fix the
input and un-xfail the test.

llvm-svn: 231911

9 years agoFix another verifier crash where a GC intrinsic would look at the internals of anothe...
Owen Anderson [Wed, 11 Mar 2015 06:57:30 +0000 (06:57 +0000)]
Fix another verifier crash where a GC intrinsic would look at the internals of another intrinsic in order to verify itself.

This causes a crash if the referenced intrinsic was malformed.  In this case, we
would already have reported an error on the referenced intrinsic, but then
crashed on the second one when it tried to introspect the first without
error checking.

llvm-svn: 231910

9 years agoSema: Properly track mangling number/name for linkage for using decls
David Majnemer [Wed, 11 Mar 2015 06:45:39 +0000 (06:45 +0000)]
Sema: Properly track mangling number/name for linkage for using decls

Using declarations which are aliases to struct types have their name
used as the struct type's name for linkage purposes.  Otherwise, make
sure to give an anonymous struct defined inside a using declaration a
mangling number to disambiguate it from other anonymous structs in the
same context.

This fixes PR22809.

llvm-svn: 231909

9 years agoMake test added in r231902 actually be executed.
Daniel Jasper [Wed, 11 Mar 2015 06:44:51 +0000 (06:44 +0000)]
Make test added in r231902 actually be executed.

There were also errors in the CHECK line which I fixed and the test
doesn't actually pass as the "100" is in the wrong line. Not sure
whether this is a test failure or a coverage failure so making the test
XFAIL for now.

llvm-svn: 231908

9 years agoPrevent test from accessing files.
Daniel Jasper [Wed, 11 Mar 2015 06:01:01 +0000 (06:01 +0000)]
Prevent test from accessing files.

llvm-svn: 231907

9 years agoGarbage collect an unused class in Atoms.h
Davide Italiano [Wed, 11 Mar 2015 05:31:07 +0000 (05:31 +0000)]
Garbage collect an unused class in Atoms.h

This will be replaced by a more generic class to handle
all the default symbols in an executable, e.g. __init_array.

Differential Revision:  http://reviews.llvm.org/D8234
Reviewed by: shankare

llvm-svn: 231906

9 years ago[OPENMP] Fix for ExprWithCleanups in 'omp atomic' constructs.
Alexey Bataev [Wed, 11 Mar 2015 04:48:56 +0000 (04:48 +0000)]
[OPENMP] Fix for ExprWithCleanups in 'omp atomic' constructs.
This patch allows using of ExprWithCleanups expressions and other complex expressions in 'omp atomic' construct
Differential Revision: http://reviews.llvm.org/D8200

llvm-svn: 231905

9 years agoDon't print labels that on ELF are never used.
Rafael Espindola [Wed, 11 Mar 2015 04:20:31 +0000 (04:20 +0000)]
Don't print labels that on ELF are never used.

llvm-svn: 231904

9 years agoCGOpenMPRuntime.h: Fix an incorrect \param on emitTaskOutlinedFunction(). [-Wdocument...
NAKAMURA Takumi [Wed, 11 Mar 2015 03:51:40 +0000 (03:51 +0000)]
CGOpenMPRuntime.h: Fix an incorrect \param on emitTaskOutlinedFunction(). [-Wdocumentation]

llvm-svn: 231903

9 years agoInstrProf: Teach llvm-cov to handle universal binaries when given -arch
Justin Bogner [Wed, 11 Mar 2015 02:30:51 +0000 (02:30 +0000)]
InstrProf: Teach llvm-cov to handle universal binaries when given -arch

llvm-svn: 231902

9 years ago[modules] Avoid accidentally completing the redeclaration chain when updating
Richard Smith [Wed, 11 Mar 2015 01:44:51 +0000 (01:44 +0000)]
[modules] Avoid accidentally completing the redeclaration chain when updating
all the existing declarations of a record-like entity with a pointer to its
definition.

llvm-svn: 231901

9 years agoFix test to specify an Itanium triple.
Richard Smith [Wed, 11 Mar 2015 01:09:01 +0000 (01:09 +0000)]
Fix test to specify an Itanium triple.

llvm-svn: 231900

9 years agoRelax label CHECK to mach COFF syntax.
Rafael Espindola [Wed, 11 Mar 2015 01:08:32 +0000 (01:08 +0000)]
Relax label CHECK to mach COFF syntax.

Should fix the cygwin bots.

I added a cygwin specific test that would have caught this on Linux.

llvm-svn: 231899

9 years agoPrint section start labels when first switching to the section.
Rafael Espindola [Wed, 11 Mar 2015 00:51:37 +0000 (00:51 +0000)]
Print section start labels when first switching to the section.

This is less brittle and avoids polluting the start of the file with every
debug section.

llvm-svn: 231898

9 years agoMove Android to the builtin rune table.
Dan Albert [Wed, 11 Mar 2015 00:51:06 +0000 (00:51 +0000)]
Move Android to the builtin rune table.

llvm-svn: 231897

9 years ago[Orc][MCJIT][RuntimeDyld] Re-apply r231726 and r231724 with fix suggested by
Lang Hames [Wed, 11 Mar 2015 00:43:26 +0000 (00:43 +0000)]
[Orc][MCJIT][RuntimeDyld] Re-apply r231726 and r231724 with fix suggested by
Dave Blaikie. Thanks Dave!

llvm-svn: 231896

9 years agoRemove a bugus test.
Rafael Espindola [Wed, 11 Mar 2015 00:28:59 +0000 (00:28 +0000)]
Remove a bugus test.

This was using the driver to test LLVM.

I checked that disabling the code path that the test was testing causes
llvm tests to fail.

llvm-svn: 231895

9 years agoFix a grammar issue I introduced.
Chandler Carruth [Wed, 11 Mar 2015 00:19:01 +0000 (00:19 +0000)]
Fix a grammar issue I introduced.

llvm-svn: 231894

9 years agoInspired by r231891, use gender neutral pronouns in the places I've
Chandler Carruth [Wed, 11 Mar 2015 00:15:44 +0000 (00:15 +0000)]
Inspired by r231891, use gender neutral pronouns in the places I've
found in LLVM.

llvm-svn: 231893

9 years agoFor PR22870: produce an error rather than asserting if a designated initializer appea...
Richard Smith [Wed, 11 Mar 2015 00:12:17 +0000 (00:12 +0000)]
For PR22870: produce an error rather than asserting if a designated initializer appears in a signature.

llvm-svn: 231892

9 years agoGender-neutralize a comment.
Nico Weber [Wed, 11 Mar 2015 00:05:26 +0000 (00:05 +0000)]
Gender-neutralize a comment.

llvm-svn: 231891

9 years ago[modules] Fix iterator invalidation issue with names being added to a module
Richard Smith [Wed, 11 Mar 2015 00:00:51 +0000 (00:00 +0000)]
[modules] Fix iterator invalidation issue with names being added to a module
while we're writing out the identifier table.

llvm-svn: 231890

9 years agoFix Value dangling reference debug output
Andrew Kaylor [Tue, 10 Mar 2015 23:55:38 +0000 (23:55 +0000)]
Fix Value dangling reference debug output

llvm-svn: 231889

9 years agoHave TargetRegisterInfo::getLargestLegalSuperClass take a
Eric Christopher [Tue, 10 Mar 2015 23:46:01 +0000 (23:46 +0000)]
Have TargetRegisterInfo::getLargestLegalSuperClass take a
MachineFunction argument so that it can look up the subtarget
rather than using a cached one in some Targets.

llvm-svn: 231888

9 years agoRemove subtarget dependence from HexagonRegisterInfo.
Eric Christopher [Tue, 10 Mar 2015 23:45:55 +0000 (23:45 +0000)]
Remove subtarget dependence from HexagonRegisterInfo.

llvm-svn: 231887

9 years agoSplit test in two to handle building without x86.
Rafael Espindola [Tue, 10 Mar 2015 23:44:12 +0000 (23:44 +0000)]
Split test in two to handle building without x86.

llvm-svn: 231886

9 years agoIf the user specifies a kernel binary that isn't correct for the current
Jason Molenda [Tue, 10 Mar 2015 23:34:52 +0000 (23:34 +0000)]
If the user specifies a kernel binary that isn't correct for the current
kernel debug session, instead of issuing a warning (which on one ever
sees), drop the user-specified kernel binary Module from the target and
try to discover the correct one dynamically.
<rdar://problem/19450329>

llvm-svn: 231885

9 years agoUpdate build instructions / coding conventions.
Zachary Turner [Tue, 10 Mar 2015 23:22:25 +0000 (23:22 +0000)]
Update build instructions / coding conventions.

This improves the instructions for checking out LLDB, adds
more links to LLVM instructions, and more explicitly calls out
when we differ from the style guide.

Also updates the clang-format configuration file to correctly
reflect a 120 column limit.

Reviewed by: Jim Ingham
Differential Revision: http://reviews.llvm.org/D8222

llvm-svn: 231884