Commit Graph

204539 Commits

Author SHA1 Message Date
Ed Maste e164ad8dfb Remove DOS line endings from LLDBStandalone.cmake
llvm-svn: 241361
2015-07-03 16:39:17 +00:00
Bruce Mitchener e86c6fa3dc [lldb-mi] Use size_t where appropriate.
Summary:
Many places should have been using size_t rather than MIuint or
MIint. This is particularly true for code that uses std::string::find(),
std::string::rfind(), std::string::size(), and related methods.

Reviewers: abidh, ki.stfu, domipheus

Subscribers: lldb-commits

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

llvm-svn: 241360
2015-07-03 15:40:44 +00:00
Bruce Mitchener 201dec7dc2 [lldb-mi] Remove unnecessary const_cast.
Summary: Remove unnecessary const_cast.

Reviewers: abidh, ki.stfu

Subscribers: lldb-commits

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

llvm-svn: 241359
2015-07-03 15:31:32 +00:00
Bruce Mitchener 44519f8608 [lldb-mi] GetVarFormatForChar needn't pass a char by const ref.
Summary: GetVarFormatForChar needn't pass a char by const ref.

Reviewers: ki.stfu, abidh

Subscribers: lldb-commits

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

llvm-svn: 241358
2015-07-03 15:30:48 +00:00
Bruce Mitchener 53be30077f [lldb-mi] Remove unnecessary members from MICmdArgContext.
Summary:
Remove unnecessary members from MICmdArgContext.

We don't need constants for these value stored in every instance
of the class.

Reviewers: ki.stfu, abidh

Subscribers: lldb-commits

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

llvm-svn: 241357
2015-07-03 15:30:38 +00:00
Benjamin Kramer bfc8413fdb StmtIterator: Put stmt and decl group pointer into a union.
Reduce the size of StmtIterator without changing behavior.

llvm-svn: 241356
2015-07-03 15:12:36 +00:00
Benjamin Kramer 973431b22f Rewrite users of Stmt::child_begin/end into for-range loops.
No functionality change intended.

llvm-svn: 241355
2015-07-03 15:12:24 +00:00
Rafael Espindola e9da9aa4f3 This reverts commit r241350 and r241352.
r241350 broke lld tests.
r241352 depends on r241350.

Original messages:
"[ELFYAML] Fix handling SHT_NOBITS sections by obj2yaml/yaml2obj tools"
"[ELFYAML] Make the Size field for .bss section optional"

llvm-svn: 241354
2015-07-03 14:54:02 +00:00
Rafael Espindola c026417420 Delete dead code.
llvm-svn: 241353
2015-07-03 14:46:17 +00:00
Simon Atanasyan d0f7b425a7 [ELFYAML] Make the Size field for .bss section optional
It's a common case to have a zero-size .bss section in an object file.

llvm-svn: 241352
2015-07-03 14:19:06 +00:00
Bruce Mitchener d0ee89d81a [lldb-mi] Typo fixes
Summary: Some more typo fixes in LLDB-MI.

Reviewers: ki.stfu, abidh

Subscribers: lldb-commits

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

llvm-svn: 241351
2015-07-03 14:09:56 +00:00
Simon Atanasyan b776eaed2e [ELFYAML] Fix handling SHT_NOBITS sections by obj2yaml/yaml2obj tools
SHT_NOBITS sections do not have content in an object file. Now yaml2obj
tool does not accept `Content` field for such sections, and obj2yaml
tool does not attempt to read the section content from a file.

llvm-svn: 241350
2015-07-03 14:07:06 +00:00
Bruce Mitchener 3b25b479bf Remove typedefs for MIchar, MIschar, MIuchar.
Summary:
This is a start on bringing lldb-mi more in line with the typical
LLDB coding style. This just removes the usage of the typedefs and
doesn't yet clean up any logic or other issues. (This is to keep
the review simple.)

Reviewers: abidh, ki.stfu, domipheus

Subscribers: lldb-commits

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

llvm-svn: 241349
2015-07-03 13:45:34 +00:00
Rafael Espindola 34375d5a4b Avoid warning about unused variable when building without assertions.
llvm-svn: 241348
2015-07-03 12:53:50 +00:00
Tamas Berghammer ff7fd90017 Fix aarch64 breakpoint PC offset
llvm-svn: 241347
2015-07-03 12:51:30 +00:00
Rafael Espindola ec57b8b9f8 Use getDynamicSymbolName/getStaticSymbolName instead of a constant argument.
llvm-svn: 241346
2015-07-03 12:50:54 +00:00
Rafael Espindola d48e54c5ea Avoid a use after free.
llvm-svn: 241345
2015-07-03 12:20:34 +00:00
Rafael Espindola 097110f590 Continue to remove the notion that ELF has dynamic and static symbols.
The ELFObjectFile now just reasons about a section/index pair, removing
one of the users that force ELF.h to maintain the difference.

llvm-svn: 241344
2015-07-03 12:00:05 +00:00
Alexandros Lamprineas eb73228888 - Refactored ARMTargetInfo in order to use the API of llvm/lib/Support/TargetParser.cpp
for extracting target specific information.
- Patch for commit 241267: ShouldUseInlineAtomic was set incorrectly when subArch was
  not specified, causing regressions.

Change-Id: Iabb35d59722f4972f1a3ab4365880add5bbcfdcc
llvm-svn: 241343
2015-07-03 11:57:23 +00:00
Simon Atanasyan 47a2eafd5c [Mips] Factor out symbol type checking (PIC/non-PIC) into the separate function
No functional changes.

llvm-svn: 241342
2015-07-03 11:36:55 +00:00
Simon Atanasyan a87c17a201 [ELF] Define __start_XXX/__stop_XXX symbols where XXX is a section name
This is GNU ELF linker extension used particularly by LibC code.
If input object files contain section named XXX, and the XXX is a valid C
identifier, and there are undefined or weak symbols __start_XXX/__stop_XXX,
linker should define __start_XXX/__stop_XXX symbols point to the begin/end
of the XXX section correspondingly.

For example, without support of this extension statically linked executables
for X86_64 and Mips (maybe other) targets do not flush IO buffers at the end
of executing.

llvm-svn: 241341
2015-07-03 11:25:37 +00:00
Tamas Berghammer cec93c355a Fix 128bit register read and user register count on aarch64
llvm-svn: 241340
2015-07-03 11:17:07 +00:00
Daniel Jasper 5a3de1d0e1 clang-format: [JS] Allow line breaks after TypeScript type colons.
llvm-svn: 241339
2015-07-03 10:37:23 +00:00
Tamas Berghammer 1d793622ad Make TestDisassembleBreakpoint arm and aarch64 compatible
llvm-svn: 241338
2015-07-03 10:32:55 +00:00
Daniel Jasper 043ac05010 clang-format: [Java/JS] Properly support instanceof and its precedence.
llvm-svn: 241337
2015-07-03 10:12:53 +00:00
Alexey Bataev 81c7ea0ec3 [OPENMP 4.0] Fixed codegen for 'cancellation point' construct.
Generate the next code for 'cancellation point':
if (__kmpc_cancellationpoint()) {
  __kmpc_cancel_barrier();
  <exit construct>;
}

llvm-svn: 241336
2015-07-03 09:56:58 +00:00
Yaron Keren 40178c352e Revert r241330. It compiled with Visual C++ 2013 and gcc 4.9.1 (mingw) but now fails the bots.
llvm-svn: 241335
2015-07-03 09:30:33 +00:00
Tamas Berghammer 9383480524 Enable usage of eh_frame based unwind plan as a fallback
Previously if the instruction emulation based unwind plan failed then
we fall back to the arch default unwind plan. Change it to fall back
to the eh_frame based one even on non call sites if we have eh_frame
as that one tend to be more reliable.

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

llvm-svn: 241334
2015-07-03 09:30:22 +00:00
Tamas Berghammer 09839c33b6 Fix qMemoryRegionInfo packet to return current value for address after the last memory region
Differential revision: http://reviews.llvm.org/D10899

llvm-svn: 241333
2015-07-03 09:30:19 +00:00
Tamas Berghammer 623652a0fd Improve DWARF CFI CIE parsing and remove duplicated code
Previously we handled only a few opcode DWARF CFI opcode when we
were parsing the CIE. With this change we use mostly the same code
what we use for parsing the PDE which cover more opcode.

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

llvm-svn: 241332
2015-07-03 09:30:17 +00:00
Tamas Berghammer 49dd6d1556 Fix handling of DW_CFA_restore_state
The CFA offset shouldn't be irestored to the saved value in case
of a DW_CFA_restore_state opcode.

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

llvm-svn: 241331
2015-07-03 09:30:14 +00:00
Yaron Keren 452670165c Replace some const std::string & with llvm::StringRef or std::string
and std::move to avoid implicit std::string construction.

Patch by Eugene Kosov.

llvm-svn: 241330
2015-07-03 09:16:20 +00:00
NAKAMURA Takumi 7779f75cc8 llvm/test/CodeGen/ARM/fnattr-trap.ll: Add -mtriple, to appease targeting *-win32.
LLVM ERROR: CPU: 'generic' does not support ARM mode execution!

llvm-svn: 241329
2015-07-03 08:21:38 +00:00
NAKAMURA Takumi 24536c8b47 clang/test/CodeGenCXX/trap-fnattr.cpp: Tweak to match MS-mangled names.
llvm-svn: 241328
2015-07-03 08:21:27 +00:00
Justin Bogner 2d74ae53f2 Driver: Replace a couple of out of date terms in the docs
The Job base class was removed in r241310, so replace a couple of
references to it with Command. Also change another use of Job with
Action, since that's the term used in the source.

llvm-svn: 241327
2015-07-03 08:03:43 +00:00
Simon Pilgrim 6a8e75c735 whitespace tidyup. NFC.
llvm-svn: 241326
2015-07-03 08:02:12 +00:00
Simon Pilgrim b504263e4a [X86][SSE] Sign extension for target vector sizes less than 128 bits (pt2)
Add support for v2i8/v2i16 to v2f64 by using a sign extension to v2i32 before conversion to v2f64.

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

llvm-svn: 241325
2015-07-03 08:01:36 +00:00
Yaron Keren 5dbf346c52 Initialize booleans CallsUnwindInit and CallsEHReturn with false instead of 0.
llvm-svn: 241324
2015-07-03 07:56:24 +00:00
Simon Pilgrim 385bf00ea2 [X86][SSE] Sign extension for target vector sizes less than 128 bits (pt1)
This patch adds support for sign extension for sub 128-bit vectors, such as to v2i32. It concatenates with UNDEF subvectors up to 128-bits, performs the sign extension (i.e. as v4i32) and then extracts the target subvector.

Patch 1/2 of D10589 - the second patch covers the conversion of v2i8/v2i16 to v2f64.

llvm-svn: 241323
2015-07-03 07:51:01 +00:00
Bruce Mitchener 68dc553fda Fix type signature for CMIUtilString::IsAllValidAlphaAndNumeric.
This should take a "const char*" not a "char &".

Summary:
Fix type signature for CMIUtilString::IsAllValidAlphaAndNumeric.

This passes the MI tests on Mac OS X.

Reviewers: ki.stfu, abidh, domipheus

Subscribers: lldb-commits-list

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

llvm-svn: 241322
2015-07-03 07:28:11 +00:00
Yaron Keren d30f5ffddc Revert r241319, investigating.
llvm-svn: 241321
2015-07-03 05:31:54 +00:00
Rui Ueyama a51ce71fdf COFF: Call exit(0) on success to not call destructors.
This change cut the link time of chrome.dll from 24 seconds
to 22 seconds (5% gain). When the control reaches end of link(),
all output files have already been written. All in-memory
objects can just vanish. There is no use to call their dtors.

llvm-svn: 241320
2015-07-03 05:31:35 +00:00
Yaron Keren 25bb2e4709 Replace some const std::string & with llvm::StringRef or std::string
and std::move to avoid implicit std::string construction.

Part 1/2.

Patch by Eugene Kosov.

llvm-svn: 241319
2015-07-03 05:09:59 +00:00
Rui Ueyama d8111f2c2e COFF: Fix ordinal-only delay-imported symbols.
DLLs can export symbols only by ordinal, and DLLs are also able to be
delay-loaded. The combination of the two is valid. I didn't expect
that combination. This patch implements that feature.

With this patch, LLD is now able to link a working executable of Chrome
for 64-bit debug build. The browser seemed to be working fine. Chrome is
good for testing because of its variety and size. It contains various
open-source libraries written by various people. The largest file in
Chrome is chrome.dll whose size is 496MB. LLD can link it in 24 seconds.
MSVC linker takes 48 seconds. So it is exactly 2x faster. (I measured
that with debug info and ICF being turned off.)

With this achievement, I think I can say that the new COFF linker is
now mostly feature complete for x86-64 Windows. I believe there are
still many lingering bugs, though.

llvm-svn: 241318
2015-07-03 04:32:49 +00:00
Bruce Mitchener cb30079f41 Typo fixes.
Summary: Some typo fixes in comments in lldb-mi.

Reviewers: abidh, ki.stfu

Subscribers: lldb-commits-list

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

llvm-svn: 241317
2015-07-03 03:54:17 +00:00
Rui Ueyama 7a247ee242 COFF: Fix a bug that /delayload was case-sensitive.
llvm-svn: 241316
2015-07-03 01:40:14 +00:00
Akira Hatanaka 6f9cfaf85b Make corrections to r241314.
The return type of a function follows the signext attribute.

llvm-svn: 241315
2015-07-03 01:05:19 +00:00
Akira Hatanaka 5720be5e34 Fix test case to appease buildbot.
Test case trap-fnattr.cpp was failng on clang-ppc64-elf-linux2 because ppc64
sign-extends the i32 return value.
 
This is a follow-up to r241306.

llvm-svn: 241314
2015-07-03 00:50:30 +00:00
Rui Ueyama 49d6cd35ad COFF: Fix /base option.
Previously, __ImageBase symbol got a different value than the one
specified by /base:<number> because the symbol was created in the
SymbolTable's constructor. When the constructor is called,
no command line options are processed yet, so the symbol was
created always with the initial value. This caused wrong relocations
and thus caused mysterious crashes of some executables linked by LLD.

llvm-svn: 241313
2015-07-03 00:02:19 +00:00
Nadav Rotem 754eb7c563 Fix an overly aggressive assertion in getCopyFromPartsVector.
The assertion in getCopyFromPartsVector assumed that the vector 'part' must
match the type of argument (arguments are potentially split into multiple
parts). However, in some cases the targets return a 'part' of the right size
but with a different type. We already handle this case correctly later on
and generate a bitcast. This commit just makes sure that we are actually
checking the property that we care about.

llvm-svn: 241312
2015-07-02 23:23:52 +00:00