platform/upstream/llvm.git
9 years agoSimplify regex in TestDataFormatterUnordered.py for better readability.
Chaoren Lin [Thu, 28 May 2015 21:52:07 +0000 (21:52 +0000)]
Simplify regex in TestDataFormatterUnordered.py for better readability.

Summary:
Using `(match){3}` instead of `matchmatchmatch`.
This is an update to D10078.

Test Plan: no change in test behavior.

Reviewers: clayborg, sivachandra

Reviewed By: sivachandra

Subscribers: lldb-commits

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

llvm-svn: 238510

9 years agoFixing the polly build.
Chris Bieneman [Thu, 28 May 2015 21:51:52 +0000 (21:51 +0000)]
Fixing the polly build.

I broke the polly build in r238505. This fixes the failure by adding non-const iterator erase methods to cl::list_storage.

llvm-svn: 238509

9 years agoRevise test to run llc and llvm-mc separately.
Andy Ayers [Thu, 28 May 2015 21:49:50 +0000 (21:49 +0000)]
Revise test to run llc and llvm-mc separately.

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

llvm-svn: 238508

9 years agoEnable exitValue rewrite only when the cost of expansion is low.
Wei Mi [Thu, 28 May 2015 21:49:07 +0000 (21:49 +0000)]
Enable exitValue rewrite only when the cost of expansion is low.

The patch evaluates the expansion cost of exitValue in indVarSimplify pass, and only does the rewriting when the expansion cost is low or loop can be deleted with the rewriting. It provides an option "-replexitval=" to control the default aggressiveness of the exitvalue rewriting. It also fixes some missing cases in SCEVExpander::isHighCostExpansionHelper to enhance the evaluation of SCEV expansion cost.

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

llvm-svn: 238507

9 years agoRemove a trivial forwarding function. NFC.
Rafael Espindola [Thu, 28 May 2015 21:36:02 +0000 (21:36 +0000)]
Remove a trivial forwarding function. NFC.

llvm-svn: 238506

9 years agoRe-landing "Refactoring cl::list_storage from "is a" to "has a" std::vector."
Chris Bieneman [Thu, 28 May 2015 21:31:22 +0000 (21:31 +0000)]
Re-landing "Refactoring cl::list_storage from "is a" to "has a" std::vector."

Originally landed r238485

MSVC resolves identifiers differently from Clang and GCC, this resulted in build bot failures. This pach re-lands r238485 and fixes the build failures.

llvm-svn: 238505

9 years agoImprove user documentation on profiling.
Diego Novillo [Thu, 28 May 2015 21:30:04 +0000 (21:30 +0000)]
Improve user documentation on profiling.

This clarifies the relationship between instrumentation and sampling based PGO,
code coverage analysis and the different formats supported by sample
profiling.

llvm-svn: 238504

9 years ago[SelectionDAG] Scalar shift amounts may require legalization
David Majnemer [Thu, 28 May 2015 21:29:59 +0000 (21:29 +0000)]
[SelectionDAG] Scalar shift amounts may require legalization

The shift amount may be too small to cope with promoted left hand side,
make sure to promote it as well.

This fixes PR23664.

llvm-svn: 238503

9 years agoRemove debug prints from r238487
Reid Kleckner [Thu, 28 May 2015 21:23:53 +0000 (21:23 +0000)]
Remove debug prints from r238487

llvm-svn: 238501

9 years ago[omp] Loosen the driver test enough so that overriding the defaults
Chandler Carruth [Thu, 28 May 2015 21:20:14 +0000 (21:20 +0000)]
[omp] Loosen the driver test enough so that overriding the defaults
works well for folks.

This isn't terribly clean (sadly) but after chatting with both Eric and
Richard, nothing cleaner really emerged. The clean way of doing this is
a *lot* of work for extremely little benefit here.

llvm-svn: 238500

9 years agoResubmitting r238459 and r238460 with fix for Linux.
Chaoren Lin [Thu, 28 May 2015 21:19:31 +0000 (21:19 +0000)]
Resubmitting r238459 and r238460 with fix for Linux.

llvm-svn: 238499

9 years ago[omp] Fix a typo in a comment and a line I forgot to clang-format that
Chandler Carruth [Thu, 28 May 2015 21:10:31 +0000 (21:10 +0000)]
[omp] Fix a typo in a comment and a line I forgot to clang-format that
Justin pointed out in post-commit review.

llvm-svn: 238498

9 years agoRevert "Move inlined cxa_demangle.cpp to a separate file."
Ying Chen [Thu, 28 May 2015 21:06:36 +0000 (21:06 +0000)]
Revert "Move inlined cxa_demangle.cpp to a separate file."

This reverts commit 8cb47a2140f3e93a34597fc9f11c8cd96130076d.

llvm-svn: 238497

9 years agoRevert "Allow both MSVC and Itanium mangling schemes."
Ying Chen [Thu, 28 May 2015 21:06:33 +0000 (21:06 +0000)]
Revert "Allow both MSVC and Itanium mangling schemes."
Cause build break.

This reverts commit 6d986061393f2863fec739e04412281148acc1f3.

llvm-svn: 238496

9 years agoSkip ThreadStateTestCase.test_state_after_continue_with_dwarf on Darwin
Ying Chen [Thu, 28 May 2015 21:03:26 +0000 (21:03 +0000)]
Skip ThreadStateTestCase.test_state_after_continue_with_dwarf on Darwin

Summary:
- This test cause Python crash randomly on darwin builder
- Tracked by bug 'llvm.org/pr23669'

Test Plan: ./dotest.py -m --executable /Users/lldb_build/testSlave/buildDir/lldb.src/build/Debug/lldb --framework /Users/lldb_build/testSlave/buildDir/lldb.src/build/Debug/LLDB.framework -A x86_64 -C clang -p TestThreadStates.py

Reviewers: chaoren, vharron

Subscribers: lldb-commits

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

llvm-svn: 238495

9 years ago[llvm] Adding vdtor to fix warning.
Colin LeMahieu [Thu, 28 May 2015 20:59:08 +0000 (20:59 +0000)]
[llvm] Adding vdtor to fix warning.

llvm-svn: 238494

9 years agoFix the Xcode build after the recent new demangling files were added.
Greg Clayton [Thu, 28 May 2015 20:57:55 +0000 (20:57 +0000)]
Fix the Xcode build after the recent new demangling files were added.

llvm-svn: 238493

9 years agoInline trivial method. NFC.
Rafael Espindola [Thu, 28 May 2015 20:53:09 +0000 (20:53 +0000)]
Inline trivial method. NFC.

llvm-svn: 238492

9 years agoRevert "Refactoring cl::list_storage from "is a" to "has a" std::vector."
Chris Bieneman [Thu, 28 May 2015 20:47:02 +0000 (20:47 +0000)]
Revert "Refactoring cl::list_storage from "is a" to "has a" std::vector."

This reverts commit 117715ca0613d3db144241499401f2ec5398f1d5.

llvm-svn: 238491

9 years agoDisable x86 tail call optimizations that jump through GOT
Reid Kleckner [Thu, 28 May 2015 20:44:28 +0000 (20:44 +0000)]
Disable x86 tail call optimizations that jump through GOT

For x86 targets, do not do sibling call optimization when materializing
the callee's address would require a GOT relocation. We can still do
tail calls to internal functions, hidden functions, and protected
functions, because they do not require this kind of relocation. It is
still possible to get GOT relocations when the user explicitly asks for
it with musttail or -tailcallopt, both of which are supposed to
guarantee TCO.

Based on a patch by Chih-hung Hsieh.

Reviewers: srhines, timmurray, danalbert, enh, void, nadav, rnk

Subscribers: joerg, davidxl, llvm-commits

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

llvm-svn: 238487

9 years agoCOFF: Return an error_code directly.
Rui Ueyama [Thu, 28 May 2015 20:39:29 +0000 (20:39 +0000)]
COFF: Return an error_code directly.

llvm-svn: 238486

9 years agoRefactoring cl::list_storage from "is a" to "has a" std::vector.
Chris Bieneman [Thu, 28 May 2015 20:38:12 +0000 (20:38 +0000)]
Refactoring cl::list_storage from "is a" to "has a" std::vector.

Summary: This isn't necessarily an ideal change, and I want to at least reduce the API surface area, but for the new API we really shouldn't be relying on cl::list being a std::vector.

Reviewers: chandlerc

Reviewed By: chandlerc

Subscribers: llvm-commits

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

llvm-svn: 238485

9 years ago[asan] Add new(unsigned int) to ASan interface list.
Evgeniy Stepanov [Thu, 28 May 2015 20:37:50 +0000 (20:37 +0000)]
[asan] Add new(unsigned int) to ASan interface list.

Also, sized-delete with size_t == unsigned int.
These guys appear when building for Android with gnu-stl.

Fixes a number of ASan tests in that particular configuration.

llvm-svn: 238484

9 years agoRevert r238427 - [mips] Make TTypeEncoding indirect to allow .eh_frame to be read...
Daniel Sanders [Thu, 28 May 2015 20:30:32 +0000 (20:30 +0000)]
Revert r238427 - [mips] Make TTypeEncoding indirect to allow .eh_frame to be read-only.

It caused a smaller number of failures than the previous attempt at committing but still caused a couple on the llvm-linux-mips builder. Reverting while I investigate the remainder.

llvm-svn: 238483

9 years agoCOFF: Split Driver.cpp to Driver.cpp and DriverUtils.cpp. NFC.
Rui Ueyama [Thu, 28 May 2015 20:30:06 +0000 (20:30 +0000)]
COFF: Split Driver.cpp to Driver.cpp and DriverUtils.cpp. NFC.

The previous implementation's driver file is cluttered by lots of
small functions, and it was hard to find important functions.
Make a separate file to prevent that issue.

llvm-svn: 238482

9 years agoObject, ELF: Use error code instead of calling report_fatal_error()
Alexey Samsonov [Thu, 28 May 2015 20:25:42 +0000 (20:25 +0000)]
Object, ELF: Use error code instead of calling report_fatal_error()

Make createELFObjectFile() return object_error::parse_failed on
encountering invalid ELF file, instead of crashing the program.

llvm-svn: 238481

9 years agoRemove structure field that can be computed just before use.
Rafael Espindola [Thu, 28 May 2015 20:25:29 +0000 (20:25 +0000)]
Remove structure field that can be computed just before use.

llvm-svn: 238480

9 years agoAvoid warnings when building without asserts.
Rafael Espindola [Thu, 28 May 2015 20:19:31 +0000 (20:19 +0000)]
Avoid warnings when building without asserts.

llvm-svn: 238479

9 years agoRename InputFile::Name -> InputFile::Filename.
Rui Ueyama [Thu, 28 May 2015 20:16:25 +0000 (20:16 +0000)]
Rename InputFile::Name -> InputFile::Filename.

Other local variables shadowed the member variable.
Rename to make that a bit longer.

llvm-svn: 238478

9 years agoMove these vectors to the only function where they are used.
Rafael Espindola [Thu, 28 May 2015 20:11:34 +0000 (20:11 +0000)]
Move these vectors to the only function where they are used.

llvm-svn: 238477

9 years agoIf we see an external function in the symbols, make
Sean Callanan [Thu, 28 May 2015 20:07:44 +0000 (20:07 +0000)]
If we see an external function in the symbols, make
it an extern "C" function instead of a C++ function
so that Clang doesn't emit a mangled function reference.

Also removed the hack in ClangExpressionDeclMap that
works around this.

llvm-svn: 238476

9 years agoDon't crash if we don't have a process and need
Sean Callanan [Thu, 28 May 2015 20:06:40 +0000 (20:06 +0000)]
Don't crash if we don't have a process and need
to check for alternate manglings.

llvm-svn: 238475

9 years agoFix non-debug build.
Rui Ueyama [Thu, 28 May 2015 20:04:51 +0000 (20:04 +0000)]
Fix non-debug build.

llvm-svn: 238474

9 years agoThumb2: Modify codegen for memcpy intrinsic to prefer LDM/STM.
Peter Collingbourne [Thu, 28 May 2015 20:02:45 +0000 (20:02 +0000)]
Thumb2: Modify codegen for memcpy intrinsic to prefer LDM/STM.

We were previously codegen'ing these as regular load/store operations and
hoping that the register allocator would allocate registers in ascending order
so that we could apply an LDM/STM combine after register allocation. According
to the commit that first introduced this code (r37179), we planned to teach
the register allocator to allocate the registers in ascending order. This
never got implemented, and up to now we've been stuck with very poor codegen.

A much simpler approach for achiveing better codegen is to create LDM/STM
instructions with identical sets of virtual registers, let the register
allocator pick arbitrary registers and order register lists when printing an
MCInst. This approach also avoids the need to repeatedly calculate offsets
which ultimately ought to be eliminated pre-RA in order to decrease register
pressure.

This is implemented by lowering the memcpy intrinsic to a series of SD-only
MCOPY pseudo-instructions which performs a memory copy using a given number
of registers. During SD->MI lowering, we lower MCOPY to LDM/STM. This is a
little unusual, but it avoids the need to encode register lists in the SD,
and we can take advantage of SD use lists to decide whether to use the _UPD
variant of the instructions.

Fixes PR9199.

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

llvm-svn: 238473

9 years ago[WinEH] Remove debugging dump() call
Reid Kleckner [Thu, 28 May 2015 20:02:05 +0000 (20:02 +0000)]
[WinEH] Remove debugging dump() call

llvm-svn: 238472

9 years agoMerge redundant loops. NFC.
Rafael Espindola [Thu, 28 May 2015 20:00:13 +0000 (20:00 +0000)]
Merge redundant loops. NFC.

llvm-svn: 238471

9 years agoRemove unused #includes of ScriptInterpreterPython.h
Zachary Turner [Thu, 28 May 2015 19:57:03 +0000 (19:57 +0000)]
Remove unused #includes of ScriptInterpreterPython.h

llvm-svn: 238470

9 years agoIncluding <thread> with MSVC is buggy, use a workaround here.
Zachary Turner [Thu, 28 May 2015 19:56:43 +0000 (19:56 +0000)]
Including <thread> with MSVC is buggy, use a workaround here.

llvm-svn: 238469

9 years agoAsmPrinter: Stop exposing underlying DIE children list, NFC
Duncan P. N. Exon Smith [Thu, 28 May 2015 19:56:34 +0000 (19:56 +0000)]
AsmPrinter: Stop exposing underlying DIE children list, NFC

Update `DIE` API to hide the implementation of `DIE::Children` so we can
swap it out.

llvm-svn: 238468

9 years agoRefactor test runner to print sub-test-case pass/fail rate.
Zachary Turner [Thu, 28 May 2015 19:56:26 +0000 (19:56 +0000)]
Refactor test runner to print sub-test-case pass/fail rate.

llvm-svn: 238467

9 years ago[Format] Skip creating temporary std::strings when filling another string.
Benjamin Kramer [Thu, 28 May 2015 19:55:49 +0000 (19:55 +0000)]
[Format] Skip creating temporary std::strings when filling another string.

No functional change intended.

llvm-svn: 238466

9 years agoSimplify LastLocalSymbolIndex computation. NFC.
Rafael Espindola [Thu, 28 May 2015 19:46:36 +0000 (19:46 +0000)]
Simplify LastLocalSymbolIndex computation. NFC.

llvm-svn: 238465

9 years agoCOFF: Teach Chunk to write to a mmap'ed output file.
Rui Ueyama [Thu, 28 May 2015 19:45:43 +0000 (19:45 +0000)]
COFF: Teach Chunk to write to a mmap'ed output file.

Previously Writer directly handles writes to a file.
Chunks needed to give Writer a continuous chunk of memory.
That was inefficent if you construct data in chunks because
it would require two memory copies (one to construct a chunk
and the other is to write that to a file).

This patch teaches chunk to write directly to a file.
From readability point of view, this is also good because
you no longer have to call hasData() before calling getData().

llvm-svn: 238464

9 years agoUse range loops. NFC.
Rafael Espindola [Thu, 28 May 2015 19:43:20 +0000 (19:43 +0000)]
Use range loops. NFC.

llvm-svn: 238463

9 years agoAdd BranchProbabilityInfo::releaseMemory to clear the Weights field.
Pete Cooper [Thu, 28 May 2015 19:43:06 +0000 (19:43 +0000)]
Add BranchProbabilityInfo::releaseMemory to clear the Weights field.

BranchProbabilityInfo was leaking 3MB of memory when running 'opt -O2 verify-uselistorder.lto.bc'.  This was due to the Weights member not being cleared once the pass is no longer needed.

This adds the releaseMemory override to clear that field.  The other fields are cleared at the end of runOnFunction so can stay there.

llvm-svn: 238462

9 years agoRemove temporary FileSymbolData. NFC.
Rafael Espindola [Thu, 28 May 2015 19:29:15 +0000 (19:29 +0000)]
Remove temporary FileSymbolData. NFC.

llvm-svn: 238461

9 years agoAllow both MSVC and Itanium mangling schemes.
Chaoren Lin [Thu, 28 May 2015 19:15:31 +0000 (19:15 +0000)]
Allow both MSVC and Itanium mangling schemes.

Summary:
LLDB on Windows should now be able to demangle Linux/Android symbols.

Also updated CxaDemangle.cpp to be compatible with MSVC.

Depends on D9949, D9954, D10048.

Reviewers: zturner, emaste, clayborg

Reviewed By: clayborg

Subscribers: tberghammer, lldb-commits

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

llvm-svn: 238460

9 years agoMove inlined cxa_demangle.cpp to a separate file.
Chaoren Lin [Thu, 28 May 2015 19:15:15 +0000 (19:15 +0000)]
Move inlined cxa_demangle.cpp to a separate file.

Summary: In preparation for some changes to make this compatible with MSVC.

Reviewers: emaste, zturner, clayborg

Reviewed By: clayborg

Subscribers: lldb-commits

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

llvm-svn: 238459

9 years agoCOFF: Add a new PE/COFF port.
Rui Ueyama [Thu, 28 May 2015 19:09:30 +0000 (19:09 +0000)]
COFF: Add a new PE/COFF port.

This is an initial patch for a section-based COFF linker.

The patch has 2300 lines of code including comments and blank lines.
Before diving into details, you want to start from reading README
because it should give you an overview of the design.

All important things are written in the README file, so I write
summary here.

- The linker is already able to self-link on Windows.

- It's significantly faster than the existing implementation.
  The existing one takes 5 seconds to link LLD on my machine,
  while the new one only takes 1.2 seconds, even though the new
  one is not multi-threaded yet. (And a proof-of-concept multi-
  threaded version was able to link it in 0.5 seconds.)

- It uses much less memory (250MB vs. 2GB virtual memory space
  to self-host).

- IMHO the new code is much simpler and easier to read than
  the existing PE/COFF port.

http://reviews.llvm.org/D10036

llvm-svn: 238458

9 years ago[Objdump] Allow instruction pretty printing to be specialized by the target triple.
Colin LeMahieu [Thu, 28 May 2015 19:07:14 +0000 (19:07 +0000)]
[Objdump] Allow instruction pretty printing to be specialized by the target triple.

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

llvm-svn: 238457

9 years agoAsmPrinter: Rename begin_values() => values_begin(), NFC
Duncan P. N. Exon Smith [Thu, 28 May 2015 18:55:38 +0000 (18:55 +0000)]
AsmPrinter: Rename begin_values() => values_begin(), NFC

llvm-svn: 238456

9 years ago[CodeGen] Update a test-case affected by folding IntToPtr/PtrToInt into Loads
David Majnemer [Thu, 28 May 2015 18:51:36 +0000 (18:51 +0000)]
[CodeGen] Update a test-case affected by folding IntToPtr/PtrToInt into Loads

Folding IntToPtr or PtrToInt into Loads, due to r238452,
perturbs the mips-varargs test-case.

Patch by Philip Pfaffe!

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

llvm-svn: 238455

9 years agoXTIMEOUT new TestChangeProcessGroup.py on FreeBSD
Ed Maste [Thu, 28 May 2015 18:45:30 +0000 (18:45 +0000)]
XTIMEOUT new TestChangeProcessGroup.py on FreeBSD

llvm-svn: 238454

9 years ago[llvm] Parameterizing the output stream for dumpbytes and outputting directly to...
Colin LeMahieu [Thu, 28 May 2015 18:39:50 +0000 (18:39 +0000)]
[llvm] Parameterizing the output stream for dumpbytes and outputting directly to stream.

llvm-svn: 238453

9 years ago[InstCombine] Fold IntToPtr and PtrToInt into preceding loads.
David Majnemer [Thu, 28 May 2015 18:39:17 +0000 (18:39 +0000)]
[InstCombine] Fold IntToPtr and PtrToInt into preceding loads.

Currently we only fold a BitCast into a Load when the BitCast is its
only user.

Do the same for any no-op cast.

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

llvm-svn: 238452

9 years agoAdd llvm-dwarfdump-fuzzer that uses LibFuzzer to fuzz llvm-dwarfdump tool.
Alexey Samsonov [Thu, 28 May 2015 18:35:18 +0000 (18:35 +0000)]
Add llvm-dwarfdump-fuzzer that uses LibFuzzer to fuzz llvm-dwarfdump tool.

The fuzzer is very simple, but not quite useful at the moment: it's unable
to discover "interesting" examples, as LLVMObject library is terrible at
error recovery, calling "report_fatal_error()" far too often.

llvm-svn: 238451

9 years agoAdd support for the convergent flag at the MC and MachineInstr levels.
Owen Anderson [Thu, 28 May 2015 18:33:39 +0000 (18:33 +0000)]
Add support for the convergent flag at the MC and MachineInstr levels.

llvm-svn: 238450

9 years agoReuse Loc variable. NFC.
Chad Rosier [Thu, 28 May 2015 18:18:21 +0000 (18:18 +0000)]
Reuse Loc variable. NFC.

llvm-svn: 238448

9 years agoAsmPrinter: Suppress warnings on GCC from r238362, NFC
Duncan P. N. Exon Smith [Thu, 28 May 2015 18:09:13 +0000 (18:09 +0000)]
AsmPrinter: Suppress warnings on GCC from r238362, NFC

GCC seems to have some overzealous warnings about strict aliasing.
Rafael reports that this patch suppresses them on GCC 4.9, and I'm
hoping this will work for GCC 4.7 as well.  I'll watch [1] and iterate
if necessary.

[1]: http://bb.pgr.jp/builders/clang-3stage-x86_64-linux/builds/8597

llvm-svn: 238447

9 years agoUse range loops for accessing file names. NFC.
Rafael Espindola [Thu, 28 May 2015 18:03:20 +0000 (18:03 +0000)]
Use range loops for accessing file names. NFC.

llvm-svn: 238446

9 years agoExpand the Flags field of MCInstrDesc to 64 bits, while simultaneously
Owen Anderson [Thu, 28 May 2015 18:03:07 +0000 (18:03 +0000)]
Expand the Flags field of MCInstrDesc to 64 bits, while simultaneously
shrinking the Size and NumDefs fields to offset the size growth, and
reordering the fields to preserve a good packing.

This is necessary in the short term for adding a convergent flag, and
simultaneously future-proofs us against more flags being added in the
future.

llvm-svn: 238445

9 years agoMerge computeSymbolTable and writeSymbolTable.
Rafael Espindola [Thu, 28 May 2015 17:54:01 +0000 (17:54 +0000)]
Merge computeSymbolTable and writeSymbolTable.

For now this just saves a few loops, but it will allow more simplifications
in the future.

llvm-svn: 238444

9 years agoGet the dll storage class right for structors of classes exported/imported via explic...
Hans Wennborg [Thu, 28 May 2015 17:44:56 +0000 (17:44 +0000)]
Get the dll storage class right for structors of classes exported/imported via explicit instantiation (PR23667)

This is a follow-up to r238266. It turned out structors are codegened through a different path,
and didn't get the storage class set in EmitGlobalFunctionDefinition.

llvm-svn: 238443

9 years agoRefactor AdbClient and make PlatformAndroid::GetFile to use "adb pull".
Oleksiy Vyalov [Thu, 28 May 2015 17:42:48 +0000 (17:42 +0000)]
Refactor AdbClient and make PlatformAndroid::GetFile to use "adb pull".

http://reviews.llvm.org/D10082

llvm-svn: 238442

9 years agoAdd explicit dependency on headers to swig wrapper (cmake build)
Ed Maste [Thu, 28 May 2015 17:25:34 +0000 (17:25 +0000)]
Add explicit dependency on headers to swig wrapper (cmake build)

This should avoid issues like that described in llvm.org/pr23686

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

llvm-svn: 238441

9 years agoMake FileSpec::Dump use FileSpec::GetPath(), not the other way around.
Chaoren Lin [Thu, 28 May 2015 17:02:45 +0000 (17:02 +0000)]
Make FileSpec::Dump use FileSpec::GetPath(), not the other way around.

Summary:
Fix FileSpec::Dump() to output denormalized path.

See D9942 for previous discussions.

Reviewers: zturner

Reviewed By: zturner

Subscribers: lldb-commits

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

llvm-svn: 238440

9 years ago[mips] Add new format for dmtc2/dmfc2 for Octeon CPUs.
Kai Nacke [Thu, 28 May 2015 16:23:16 +0000 (16:23 +0000)]
[mips] Add new format for dmtc2/dmfc2 for Octeon CPUs.

Octeon CPUs use dmtc2 rt,imm16 and dmfcp2 rt,imm16 for the crypto coprocessor.
E.g. dmtc2 rt,0x4057 starts calculation of sha-1.

I had to introduce a new deconding namespace to avoid a decoding conflict.

Reviewed By: dsanders

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

llvm-svn: 238439

9 years agoAdd a comment explaining the eCommandRequiresTarget test
Ed Maste [Thu, 28 May 2015 16:06:48 +0000 (16:06 +0000)]
Add a comment explaining the eCommandRequiresTarget test

llvm.org/pr23686

llvm-svn: 238438

9 years agoRevert r238425, it undoes the purpose of the test
Ed Maste [Thu, 28 May 2015 15:58:10 +0000 (15:58 +0000)]
Revert r238425, it undoes the purpose of the test

llvm.org/pr23686

llvm-svn: 238437

9 years ago[ARM] Be less specific about the error message expected.
Ranjeet Singh [Thu, 28 May 2015 15:55:34 +0000 (15:55 +0000)]
[ARM] Be less specific about the error message expected.

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

llvm-svn: 238436

9 years ago[ARMTargetParser] FIXME MachO arch names. NFC
Renato Golin [Thu, 28 May 2015 15:49:28 +0000 (15:49 +0000)]
[ARMTargetParser] FIXME MachO arch names. NFC

llvm-svn: 238435

9 years agoDebugInfo: .debug_line DWARF64 support
Ed Maste [Thu, 28 May 2015 15:38:17 +0000 (15:38 +0000)]
DebugInfo: .debug_line DWARF64 support

This adds support for the 64-bit DWARF format, but is still limited to
less than 4GB of debug data by the DataExtractor class.  Some versions
of the GNU MIPS toolchain generate 64-Bit DWARF even though it isn't
actually necessary.

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

llvm-svn: 238434

9 years agoFix THUMB function detection when function name is not prefixed.
Aidan Dodds [Thu, 28 May 2015 15:37:01 +0000 (15:37 +0000)]
Fix THUMB function detection when function name is not prefixed.

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

llvm-svn: 238433

9 years agoDon't create an unused _GLOBAL_OFFSET_TABLE_.
Rafael Espindola [Thu, 28 May 2015 15:20:00 +0000 (15:20 +0000)]
Don't create an unused _GLOBAL_OFFSET_TABLE_.

This was a bug for bug compatibility with gas that is completely unnecessary.
If a _GLOBAL_OFFSET_TABLE_ symbol is used, it will already be created by
the time we get to the ELF writer.

llvm-svn: 238432

9 years agoFix write register context in EmulateInstructionARM::EmulateMOVRdRm
Tamas Berghammer [Thu, 28 May 2015 15:09:45 +0000 (15:09 +0000)]
Fix write register context in EmulateInstructionARM::EmulateMOVRdRm

llvm-svn: 238431

9 years ago[ARMTargetParser] FIXME on getLLVMArchSuffixForARM. NFC
Renato Golin [Thu, 28 May 2015 15:05:53 +0000 (15:05 +0000)]
[ARMTargetParser] FIXME on getLLVMArchSuffixForARM. NFC

llvm-svn: 238430

9 years ago[ARMTargetParser] Adding sub-arch information for Clang. NFC
Renato Golin [Thu, 28 May 2015 15:05:18 +0000 (15:05 +0000)]
[ARMTargetParser] Adding sub-arch information for Clang. NFC

llvm-svn: 238429

9 years agoUse /usr/bin/env to find python
Ed Maste [Thu, 28 May 2015 14:53:14 +0000 (14:53 +0000)]
Use /usr/bin/env to find python

Python may not be /usr/bin/python on some systems. For example, on
FreeBSD it will be /usr/local/bin/python.

Reviewers: samsonov
Differential Revision: http://reviews.llvm.org/D9914

llvm-svn: 238428

9 years ago[mips] Make TTypeEncoding indirect to allow .eh_frame to be read-only.
Daniel Sanders [Thu, 28 May 2015 14:52:15 +0000 (14:52 +0000)]
[mips] Make TTypeEncoding indirect to allow .eh_frame to be read-only.

Summary:
Following on from r209907 which made personality encodings indirect, do the
same for TType encodings. This fixes the case where a try/catch block needs
to generate references to, for example, std::exception in the
.gcc_except_table.

Reviewers: petarj

Reviewed By: petarj

Subscribers: srhines, joerg, tberghammer, llvm-commits

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

llvm-svn: 238427

9 years ago[ASan] Disable alloca tests on ARM targets due to flakiness.
Yury Gribov [Thu, 28 May 2015 14:29:12 +0000 (14:29 +0000)]
[ASan] Disable alloca tests on ARM targets due to flakiness.

llvm-svn: 238426

9 years agoFix TestCommandScript: return an error if target executable is not set
Ed Maste [Thu, 28 May 2015 14:22:57 +0000 (14:22 +0000)]
Fix TestCommandScript: return an error if target executable is not set

The test invokes the 'targetname' test command before setting a
target executable, which caused Python to raise TypeError: cannot
concatenate 'str' and 'NoneType' objects.

llvm.org/pr23686

llvm-svn: 238425

9 years ago[Mips64] Add support for MCJIT for MIPS64r2 and MIPS64r6
Petar Jovanovic [Thu, 28 May 2015 13:48:41 +0000 (13:48 +0000)]
[Mips64] Add support for MCJIT for MIPS64r2 and MIPS64r6

Add support for resolving MIPS64r2 and MIPS64r6 relocations in MCJIT.

Patch by Vladimir Radosavljevic.

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

llvm-svn: 238424

9 years agoFix race in IOHandlerProcessSTDIO
Pavel Labath [Thu, 28 May 2015 13:41:08 +0000 (13:41 +0000)]
Fix race in IOHandlerProcessSTDIO

Summary:
IOHandlerProcessSTDIO::Run() was opening the pipe for interrupt requests lazily. This was racing
with another thread executing IOHandlerProcessSTDIO::Cancel() simultaneously. I fix this by
opening the pipe in the object constructor. The pipe will be automatically closed when the object
is destroyed.

Test Plan: Tests pass on linux.

Reviewers: clayborg, ribrdb

Subscribers: lldb-commits

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

llvm-svn: 238423

9 years agoUpdate isl to 93b8e43d
Tobias Grosser [Thu, 28 May 2015 13:32:11 +0000 (13:32 +0000)]
Update isl to 93b8e43d

This update brings mostly interface cleanups, but also fixes two bugs in
imath (a memory leak, some undefined behavior).

llvm-svn: 238422

9 years agoCleanup the forked child in TestChangeProcessGroup
Pavel Labath [Thu, 28 May 2015 13:12:48 +0000 (13:12 +0000)]
Cleanup the forked child in TestChangeProcessGroup

if the test fails for some reason, we can end up leaking a process. This has a tendency to
confuse the buildbots. I have added a cleanup hook to make sure we cleanup the child.

llvm-svn: 238421

9 years agoAdd thumb breakpoint for FreeBSD (currently disabled)
Ed Maste [Thu, 28 May 2015 13:06:09 +0000 (13:06 +0000)]
Add thumb breakpoint for FreeBSD (currently disabled)

Patch by Tom Rix, with additional changes to sync whitespace/style with
PlatformLinux.cpp.

It is currently disabled pending kernel support.

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

llvm-svn: 238420

9 years agoSilencing two signed/unsigned mismatch warnings; NFC.
Aaron Ballman [Thu, 28 May 2015 12:55:59 +0000 (12:55 +0000)]
Silencing two signed/unsigned mismatch warnings; NFC.

llvm-svn: 238419

9 years ago[AsmPrinter] Destroy allocated DIEAbbrevs on teardown.
Benjamin Kramer [Thu, 28 May 2015 12:55:43 +0000 (12:55 +0000)]
[AsmPrinter] Destroy allocated DIEAbbrevs on teardown.

DIEAbbrev contains a SmallVector that can leak for overly large abbrevs. They
used to be owned by the DIE, but after the recent refactoring DWARFFile
allocates its own abbrevs.

Leak found by asan.

llvm-svn: 238418

9 years agoDon't check breakpoint location count in TestChangeProcessGroup
Pavel Labath [Thu, 28 May 2015 12:46:13 +0000 (12:46 +0000)]
Don't check breakpoint location count in TestChangeProcessGroup

apparently, we get two locations for the breakpoint on android.

llvm-svn: 238417

9 years ago[ARMTargetParser] Removing string parsing from getCPUDefineSuffix. NFC.
Renato Golin [Thu, 28 May 2015 12:11:11 +0000 (12:11 +0000)]
[ARMTargetParser] Removing string parsing from getCPUDefineSuffix. NFC.

Yet another FIXME from ARMTargetParser.

llvm-svn: 238416

9 years ago[ARMTargetParser] Adding a few more CPUs for Clang CPU detection. NFC.
Renato Golin [Thu, 28 May 2015 12:10:37 +0000 (12:10 +0000)]
[ARMTargetParser] Adding a few more CPUs for Clang CPU detection. NFC.

llvm-svn: 238415

9 years ago[MC] Replace custom string join function with the one from StringExtras.
Benjamin Kramer [Thu, 28 May 2015 11:45:32 +0000 (11:45 +0000)]
[MC] Replace custom string join function with the one from StringExtras.

NFC.

llvm-svn: 238414

9 years agoFix PPC failure. Adjust CHECK pattern.
Diego Novillo [Thu, 28 May 2015 11:25:52 +0000 (11:25 +0000)]
Fix PPC failure. Adjust CHECK pattern.

llvm-svn: 238413

9 years agoDon't call utostr in Twine/raw_ostream contexts.
Benjamin Kramer [Thu, 28 May 2015 11:24:24 +0000 (11:24 +0000)]
Don't call utostr in Twine/raw_ostream contexts.

Creating temporary std::strings there is unnecessary.

llvm-svn: 238412

9 years agoFix breakpoint setting in gdb remote test cases on arm
Tamas Berghammer [Thu, 28 May 2015 10:55:01 +0000 (10:55 +0000)]
Fix breakpoint setting in gdb remote test cases on arm

llvm-svn: 238411

9 years agoFix write register context in EmulateInstructionARM::EmulateADDRdSPImm
Tamas Berghammer [Thu, 28 May 2015 10:38:32 +0000 (10:38 +0000)]
Fix write register context in EmulateInstructionARM::EmulateADDRdSPImm

llvm-svn: 238410

9 years ago[ASan] XFAIL VLA tests on ARM and PowerPC. Patch by Max Ostapenko!
Yury Gribov [Thu, 28 May 2015 10:30:46 +0000 (10:30 +0000)]
[ASan] XFAIL VLA tests on ARM and PowerPC. Patch by Max Ostapenko!

llvm-svn: 238409

9 years agoMove prctl call in TestChangeProcessGroup to the child
Pavel Labath [Thu, 28 May 2015 10:28:34 +0000 (10:28 +0000)]
Move prctl call in TestChangeProcessGroup to the child

I was hoping the enable-tracing flag will be inherited from the parent. It is not.

llvm-svn: 238408

9 years ago[ASan] Add new interceptors to asan_win_dll_thunk.cc to fix build errors on Windows.
Yury Gribov [Thu, 28 May 2015 10:21:59 +0000 (10:21 +0000)]
[ASan] Add new interceptors to asan_win_dll_thunk.cc to fix build errors on Windows.
Patch by Maria Guseva!

llvm-svn: 238407

9 years ago[sanitizer] More string interceptors: strstr, strcasestr, strspn, strcspn, strpbrk.
Yury Gribov [Thu, 28 May 2015 09:24:33 +0000 (09:24 +0000)]
[sanitizer] More string interceptors: strstr, strcasestr, strspn, strcspn, strpbrk.
Patch by Maria Guseva.

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

llvm-svn: 238406