Reid Kleckner [Tue, 17 Mar 2015 16:50:20 +0000 (16:50 +0000)]
Use an underlying enum type of unsigned to silence a -Wmicrosoft warning about being unable to put (unsigned)-1 into the default underyling type of int
llvm-svn: 232498
Shankar Easwaran [Tue, 17 Mar 2015 16:40:14 +0000 (16:40 +0000)]
[ELF][ARM] Place gotSymbol in an anonymous namespace
Address comments from Espindola.
llvm-svn: 232497
Hans Wennborg [Tue, 17 Mar 2015 16:38:58 +0000 (16:38 +0000)]
Revert r232454 and r232456: "Fix the LLVM type used when lowering initializer list reference temporaries to global variables."
This caused PR22940.
llvm-svn: 232496
Daniel Sanders [Tue, 17 Mar 2015 16:16:14 +0000 (16:16 +0000)]
[systemz] Distinguish the 'Q', 'R', 'S', and 'T' inline assembly memory constraints.
Summary:
But still handle them the same way since I don't know how they differ on
this target.
No functional change intended.
Reviewers: uweigand
Reviewed By: uweigand
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D8251
llvm-svn: 232495
Shankar Easwaran [Tue, 17 Mar 2015 15:44:20 +0000 (15:44 +0000)]
[Object][ELF] ELFEntityIterator : Add operators for random access
Fix review comments from djasper.
llvm-svn: 232494
Marshall Clow [Tue, 17 Mar 2015 15:30:22 +0000 (15:30 +0000)]
Define a new macro: _LIBCPP_HAS_NO_VARIABLE_TEMPLATES and use it. No functionality change.
llvm-svn: 232493
Eric Fiselier [Tue, 17 Mar 2015 15:08:03 +0000 (15:08 +0000)]
[libcxx] Move tuple_size and tuple_element overloads for pair and array out of !defined(_LIBCPP_HAS_NO_VARIADICS) block.
Summary:
There is no reason to guard `tuple_size`, `tuple_element` and `get<I>(...)` for pair and array inside of `<__tuple>` so that they are only available when we have variadic templates.
This requires there be redundant declarations and definitions. It also makes it easy to get things wrong.
For example the following code should compile (and does in c++11).
```
#define _LIBCPP_HAS_NO_VARIADICS
#include <array>
int main()
{
static_assert((std::tuple_size<std::array<int, 10> volatile>::value == 10), "");
}
```
This patch lifts the non-variadic parts of `tuple_size`, `tuple_types`, and `get<I>(...)` to the top of `<__tuple>` where they don't require variadic templates. This patch also removes `<__tuple_03>` because there is no longer a need for it.
Reviewers: danalbert, K-ballo, mclow.lists
Reviewed By: mclow.lists
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D7774
llvm-svn: 232492
Tamas Berghammer [Tue, 17 Mar 2015 15:05:31 +0000 (15:05 +0000)]
Change reinterpret_casts to static_casts in NativeProcessLinux
llvm-svn: 232491
Tamas Berghammer [Tue, 17 Mar 2015 15:05:28 +0000 (15:05 +0000)]
Remove obsolate rdar comment from TestSetValues.py
llvm-svn: 232490
Tamas Berghammer [Tue, 17 Mar 2015 15:05:25 +0000 (15:05 +0000)]
Fix signature of ProcessInfo::SetArchitecture
llvm-svn: 232489
Tamas Berghammer [Tue, 17 Mar 2015 15:05:23 +0000 (15:05 +0000)]
Remove unused handler registreation from GDBRemoteCommunicationServerLLGS
llvm-svn: 232488
Rafael Espindola [Tue, 17 Mar 2015 15:02:17 +0000 (15:02 +0000)]
Remove the error prone GetTempSymbol API.
llvm-svn: 232487
Samuel Antao [Tue, 17 Mar 2015 15:00:57 +0000 (15:00 +0000)]
Fix R0 use in PowerPC VSX store for FastIsel.
The VSX stores are sometimes generated with a undefined index register, causing %noreg to be used and R0 to be emitted later on. The semantics of the VSX store (e.g. stdsdx) requires R0 to be used as base if we want zero to be used in the computation of the effective address instead of the content of R0. This patch checks if no index register was generated and forces R0 to be used as base address.
llvm-svn: 232486
Rafael Espindola [Tue, 17 Mar 2015 14:58:47 +0000 (14:58 +0000)]
Convert the last 4 users of GetTempSymbol to createTempSymbol.
Despite using the same name these are unrelated.
llvm-svn: 232485
Rafael Espindola [Tue, 17 Mar 2015 14:54:43 +0000 (14:54 +0000)]
Switch two simple uses of GetTempSymbol to createTempSymbol.
llvm-svn: 232484
Rafael Espindola [Tue, 17 Mar 2015 14:50:32 +0000 (14:50 +0000)]
Use createTempSymbol to avoid collisions instead of an ad hoc method.
llvm-svn: 232483
Tamas Berghammer [Tue, 17 Mar 2015 14:40:57 +0000 (14:40 +0000)]
Report stopped by trace if none of the watchpoint was hit
Some linux kernel reports a watchpoint hit after single stepping even
when no watchpoint was hit. This CL looks for a watchpoint which was hit
and reports a stop by trace if it haven't found any.
Differential revision: http://reviews.llvm.org/D8081
llvm-svn: 232482
Rafael Espindola [Tue, 17 Mar 2015 14:38:30 +0000 (14:38 +0000)]
Make EmitFunctionHeader a private helper.
llvm-svn: 232481
Daniel Sanders [Tue, 17 Mar 2015 14:37:39 +0000 (14:37 +0000)]
Re-commit: [hexagon] Distinguish the 'o', 'v', and 'm' inline assembly memory constraints.
Summary:
But still handle them the same way since I don't know how they differ on
this target.
No functional change intended.
Reviewers: kparzysz, adasgupt
Reviewed By: kparzysz, adasgupt
Subscribers: colinl, llvm-commits
Differential Revision: http://reviews.llvm.org/D8204
Like for the PowerPC target, I've had to add 'i' to the constraint mappings in
order to pass 2007-12-17-InvokeAsm.ll. It's not clear why 'i' has historically
been treated as a memory constraint.
llvm-svn: 232480
Rafael Espindola [Tue, 17 Mar 2015 14:34:42 +0000 (14:34 +0000)]
Call EmitFunctionHeader just before EmitFunctionBody.
This avoids switching to .AMDGPU.config and back and hardcoding the
section it switches back to.
llvm-svn: 232479
Rafael Espindola [Tue, 17 Mar 2015 14:22:31 +0000 (14:22 +0000)]
Convert the easy cases of GetTempSymbol to createTempSymbol.
In these cases no code was depending on GetTempSymbol finding an existing
symbol.
llvm-svn: 232478
Hafiz Abid Qadeer [Tue, 17 Mar 2015 14:12:03 +0000 (14:12 +0000)]
Cleanup the MIReadMe.txt after the recent changes in lldb-mi.
This commit removed the redundant and out of date stuff from the file.
llvm-svn: 232477
Rafael Espindola [Tue, 17 Mar 2015 14:06:24 +0000 (14:06 +0000)]
Don't duplicate comment from the .h. NFC.
llvm-svn: 232476
Rafael Espindola [Tue, 17 Mar 2015 13:57:48 +0000 (13:57 +0000)]
Move the EH symbol to the asm printer and use it for the SJLJ case too.
llvm-svn: 232475
Denis Protivensky [Tue, 17 Mar 2015 13:51:32 +0000 (13:51 +0000)]
[ARM] Read initial addend for REL32 and PREL31 relocs
llvm-svn: 232474
Toma Tabacu [Tue, 17 Mar 2015 13:17:44 +0000 (13:17 +0000)]
[mips] [IAS] Add support for the XOR $reg,imm pseudo-instruction.
Summary:
This adds a MipsInstAlias which expands to XORi $reg,$reg,imm. For example, "xor $6, 0x3A" should be expanded to "xori $6, $6, 58".
This should work for all MIPS ISAs.
Reviewers: dsanders
Reviewed By: dsanders
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D8284
llvm-svn: 232473
Rafael Espindola [Tue, 17 Mar 2015 13:09:01 +0000 (13:09 +0000)]
Remove dead code. NFC.
llvm-svn: 232472
Rafael Espindola [Tue, 17 Mar 2015 12:54:04 +0000 (12:54 +0000)]
Replace a use of GetTempSymbol with createTempSymbol.
This is cleaner and avoids a crash in a corner case.
llvm-svn: 232471
Daniel Sanders [Tue, 17 Mar 2015 12:00:04 +0000 (12:00 +0000)]
Fix r232466 by adding 'i' to the mappings for inline assembly memory constraints.
It's not completely clear why 'i' has historically been treated as a memory
constraint. According to the documentation, it represents a constant immediate.
llvm-svn: 232470
Renato Golin [Tue, 17 Mar 2015 11:55:43 +0000 (11:55 +0000)]
[ARM] Add support for ARMV6K subtarget (Clang)
ARMv6K is another layer between ARMV6 and ARMV6T2. This is the Clang
side of the changes.
ARMV6 family LLVM implementation.
+-------------------------------------+
| ARMV6 |
+----------------+--------------------+
| ARMV6M (thumb) | ARMV6K (arm,thumb) | <- From ARMV6K and ARMV6M processors
+----------------+--------------------+ have support for hint instructions
| ARMV6T2 (arm,thumb,thumb2) | (SEV/WFE/WFI/NOP/YIELD). They can
+-------------------------------------+ be either real or default to NOP.
| ARMV7 (arm,thumb,thumb2) | The two processors also use
+-------------------------------------+ different encoding for them.
Patch by Vinicius Tinti.
llvm-svn: 232469
Renato Golin [Tue, 17 Mar 2015 11:55:28 +0000 (11:55 +0000)]
[ARM] Add support for ARMV6K subtarget (LLVM)
ARMv6K is another layer between ARMV6 and ARMV6T2. This is the LLVM
side of the changes.
ARMV6 family LLVM implementation.
+-------------------------------------+
| ARMV6 |
+----------------+--------------------+
| ARMV6M (thumb) | ARMV6K (arm,thumb) | <- From ARMV6K and ARMV6M processors
+----------------+--------------------+ have support for hint instructions
| ARMV6T2 (arm,thumb,thumb2) | (SEV/WFE/WFI/NOP/YIELD). They can
+-------------------------------------+ be either real or default to NOP.
| ARMV7 (arm,thumb,thumb2) | The two processors also use
+-------------------------------------+ different encoding for them.
Patch by Vinicius Tinti.
llvm-svn: 232468
Mohit K. Bhakkad [Tue, 17 Mar 2015 11:43:56 +0000 (11:43 +0000)]
[MIPS] - Register Context for MIPS64
Patch by Jaydeep Patil
Summery:
1. Add MIPS variants by parsing e_flags of the ELF
2. Create RegisterInfoInterface and RegisterContext for MIPS64 and MIPS64EL
Reviewers: clayborg
Subscribers: tberghammer, bhushan, mohit.bhakkad, sagar
Differential Revision: http://reviews.llvm.org/D8166
llvm-svn: 232467
Daniel Sanders [Tue, 17 Mar 2015 11:09:13 +0000 (11:09 +0000)]
[ppc] Distinguish the 'es', 'o', 'm', 'Q', 'Z', and 'Zy' inline assembly memory constraints.
Summary:
But still handle them the same way since I don't know how they differ on
this target.
Of these, 'es', and 'Q' do not have backend tests but are accepted by
clang.
No functional change intended. Depends on D8173.
Reviewers: hfinkel
Reviewed By: hfinkel
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D8213
llvm-svn: 232466
Yaron Keren [Tue, 17 Mar 2015 09:51:17 +0000 (09:51 +0000)]
Teach Twine to support SmallString.
Enable removing .str() member calls for these frequent cases.
http://reviews.llvm.org/D6372
llvm-svn: 232465
Denis Protivensky [Tue, 17 Mar 2015 09:18:24 +0000 (09:18 +0000)]
[ARM] Implement relocations: R_ARM_REL32, R_ARM_THM_JUMP11, R_ARM_PREL31
Test case for every relocation is added.
Differential Revision: http://reviews.llvm.org/D7565
llvm-svn: 232464
David Blaikie [Tue, 17 Mar 2015 05:49:45 +0000 (05:49 +0000)]
Recommit simplification first attempted in r232309 (fixed a bit in r232312, with fixes in r232314)
Messed it up because I didn't realize there were two different iterators
here (& clearly didn't build any of this... ) - still seems easier to
just use the injected class name than introduce a self typedef.
llvm-svn: 232462
David Blaikie [Tue, 17 Mar 2015 03:32:21 +0000 (03:32 +0000)]
Fix the clang -Werror build & make the unit tests link under Linux
The order of libraries passed to the linker didn't work under linux (you
need the llvm libraries first, then the lldb libraries). I modelled this
after clang's setup here. Seemed simple enough to just be consistent.
llvm-svn: 232461
Shankar Easwaran [Tue, 17 Mar 2015 03:29:32 +0000 (03:29 +0000)]
[ELF] Use parallel_for_each for writing.
This changes improves performance of lld, when self-hosting lld, when compared
with the bfd linker. BFD linker on average takes 8 seconds in elapsed time.
lld takes 3 seconds elapased time average. Without this change, lld takes ~5
seconds average. The runtime comparisons were done on a release build and
measured by running linking thrice.
lld self-host without the change
----------------------------------
real 0m3.196s
user 0m4.580s
sys 0m0.832s
lld self-host with lld
-----------------------
user 0m3.024s
user 0m3.252s
sys 0m0.796s
time taken to build lld with bfd
--------------------------------
real 0m8.419s
user 0m7.748s
sys 0m0.632s
llvm-svn: 232460
Ahmed Bougacha [Tue, 17 Mar 2015 03:23:09 +0000 (03:23 +0000)]
[AArch64] Use intermediate step for concat_vectors of illegal truncs.
Optimize concat_vectors of truncated vectors, where the intermediate
type is illegal, to avoid said illegality, e.g.,
(v4i16 (concat_vectors (v2i16 (truncate (v2i64))),
(v2i16 (truncate (v2i64)))))
->
(v4i16 (truncate (v4i32 (concat_vectors (v2i32 (truncate (v2i64))),
(v2i32 (truncate (v2i64)))))))
This isn't really target-specific, and, as such, would best go in the
DAGCombiner. However, ISD::TRUNCATE legality isn't keyed on both input
and result type, so we might generate worse code when we don't know
better. On AArch64 we know it's fine for v2i64->v4i16 and v4i32->v8i8.
rdar://
20022387
llvm-svn: 232459
Ahmed Bougacha [Tue, 17 Mar 2015 03:19:18 +0000 (03:19 +0000)]
[AArch64] Factor out N->getOperand()s; format. NFCI.
llvm-svn: 232458
Richard Smith [Tue, 17 Mar 2015 02:36:51 +0000 (02:36 +0000)]
Fix ODR violations caused by putting anonymous namespaces in header files (and
then using the symbols from those anonymous namespaces from outside the
anonymous namespace).
This was "detected" by causing the modules selfhost to fail in some cases.
The corresponding Clang bug was fixed in r232455.
llvm-svn: 232457
Nick Lewycky [Tue, 17 Mar 2015 02:31:46 +0000 (02:31 +0000)]
Fix test in release mode.
llvm-svn: 232456
Richard Smith [Tue, 17 Mar 2015 02:23:11 +0000 (02:23 +0000)]
[modules] Fix bug where an anonymous namespace could cause the containing
namespace to not merge properly.
We have an invariant here: after a declaration reads its canonical declaration,
it can assume the canonical declaration is fully merged. This invariant can be
violated if deserializing some declaration triggers the deserialization of a
later declaration, because that later declaration can in turn deserialize a
redeclaration of that first declaration before it is fully merged.
The anonymous namespace for a namespace gets stored with the first declaration
of that namespace, which may be before its parent namespace, so defer loading
it until after we've finished merging the surrounding namespace.
llvm-svn: 232455
Nick Lewycky [Tue, 17 Mar 2015 02:21:31 +0000 (02:21 +0000)]
Fix the LLVM type used when lowering initializer list reference temporaries to global variables.
llvm-svn: 232454
Shankar Easwaran [Tue, 17 Mar 2015 02:12:35 +0000 (02:12 +0000)]
[Object][ELF] ELFEntityIterator : Add operators for random access
Add operators add/subtract for random access. This is essentially used by
lld.
llvm-svn: 232453
Sanjoy Das [Tue, 17 Mar 2015 01:40:24 +0000 (01:40 +0000)]
[IRCE] Re-commit tests cases.
Re-commit the test cases added in r232444. These now use
-irce-print-changed-loops and -irce-print-range-checks so they run
correctly on a without asserts build of llvm.
llvm-svn: 232452
Sanjoy Das [Tue, 17 Mar 2015 01:40:22 +0000 (01:40 +0000)]
[IRCE] Add a -irce-print-range-checks option.
-irce-print-range-checks prints out the set of range checks recognized
by IRCE.
llvm-svn: 232451
Duncan P. N. Exon Smith [Tue, 17 Mar 2015 01:19:01 +0000 (01:19 +0000)]
CodeGenCXX: Test that linetables work with variadic virtual thunks
Add a frontend test for PR22929, which was fixed by LLVM r232449.
Besides the crash test, check that the `!dbg` attachment is sane since
its presence was the trigger.
llvm-svn: 232450
Duncan P. N. Exon Smith [Tue, 17 Mar 2015 01:14:40 +0000 (01:14 +0000)]
MapMetadata: Allow unresolved metadata if it won't change
Allow unresolved nodes through the `MapMetadata()` if
`RF_NoModuleLevelChanges`, since there's no remapping to do anyway.
This fixes PR22929. I'll add a clang test as a follow-up.
llvm-svn: 232449
Rui Ueyama [Tue, 17 Mar 2015 01:10:12 +0000 (01:10 +0000)]
Make it compile with MSVC 2013.
MSVC 2013 cannot compile this code because of C1001 "internal error".
Stop using initializer list without type name.
llvm-svn: 232448
Sanjoy Das [Tue, 17 Mar 2015 00:54:50 +0000 (00:54 +0000)]
[IRCE] Delete two tests.
I accidentally checked in two tests that used -debug-only -- these fail
on a release LLVM build. Temporarily delete these from the repo to keep
the bots green while I fix this locally.
llvm-svn: 232446
Sanjoy Das [Tue, 17 Mar 2015 00:42:16 +0000 (00:42 +0000)]
[IRCE] Add comments, NFC.
This change adds some comments that justify why a potentially
overflowing operation is safe.
llvm-svn: 232445
Sanjoy Das [Tue, 17 Mar 2015 00:42:13 +0000 (00:42 +0000)]
[IRCE] Support half-range checks.
This change to IRCE gets it to recognize "half" range checks. Half
range checks are range checks that only either check if the index is
`slt` some positive integer ("length") or if the index is `sge` `0`.
The range solver does not try to be clever / aggressive about solving
half-range checks -- it transforms "I < L" to "0 <= I < L" and "0 <= I"
to "0 <= I < INT_SMAX". This is safe, but not always optimal.
llvm-svn: 232444
Justin Bogner [Tue, 17 Mar 2015 00:18:51 +0000 (00:18 +0000)]
llvm-cov: Warn instead of error if a .gcda has arcs from an exit block
Patch by Vanderson M. Rosario. Thanks!
llvm-svn: 232443
Duncan P. N. Exon Smith [Tue, 17 Mar 2015 00:16:35 +0000 (00:16 +0000)]
AsmWriter: Assert on unresolved metadata nodes
Assert that `MDNode::isResolved()`. While in theory the `Verifier`
should catch this, it doesn't descend into all debug info, and the
`DebugInfoVerifier` doesn't call into the `Verifier`. Besides, this
helps to catch bugs when `-disable-verify=true`.
Note that I haven't come across a place where this fails with clang
today, so no testcase.
llvm-svn: 232442
Vince Harron [Tue, 17 Mar 2015 00:10:51 +0000 (00:10 +0000)]
XFAIL flaky tests
llvm-svn: 232441
Justin Bogner [Tue, 17 Mar 2015 00:04:57 +0000 (00:04 +0000)]
Fix typo in previous commit
llvm-svn: 232440
Justin Bogner [Mon, 16 Mar 2015 23:52:21 +0000 (23:52 +0000)]
GCOV: Expose the -coverage-exit-block-before-body flag in clang -cc1
This exposes the optional exit block placement logic from r232438 as a
clang -cc1 option. There is a test on the llvm side, but there isn't
really a way to inspect the gcov options from clang to test it here as
well.
llvm-svn: 232439
Justin Bogner [Mon, 16 Mar 2015 23:52:03 +0000 (23:52 +0000)]
GCOV: Make the exit block placement from r223193 optional
By default we want our gcov emission to stay 4.2 compatible, which
means we need to continue emit the exit block last by default. We add
an option to emit it before the body for users that need it.
llvm-svn: 232438
Oleksiy Vyalov [Mon, 16 Mar 2015 23:44:30 +0000 (23:44 +0000)]
Make ModuleList::GetSharedModule to use module_search_paths parameter.
http://reviews.llvm.org/D8365
llvm-svn: 232437
Rui Ueyama [Mon, 16 Mar 2015 23:43:11 +0000 (23:43 +0000)]
PECOFF: Make FileCOFF:findAtomAt from O(n) to O(1).
I knew I cut corners when I wrote this. Turned out that it is
actually slow when a file being read has many symbols. This patch
is to stop doing linear search and instead do map lookup.
llvm-svn: 232436
Peter Collingbourne [Mon, 16 Mar 2015 23:36:24 +0000 (23:36 +0000)]
LowerBitSets: do not use private aliases at all on Darwin.
LLVM currently turns these into linker-private symbols, which can be dead
stripped by the Darwin linker.
llvm-svn: 232435
Siva Chandra [Mon, 16 Mar 2015 23:02:03 +0000 (23:02 +0000)]
Cleanup implementation of formatter for std::vector from libstdc++.
Summary: Removed unused variables and methods.
Test Plan: dotest.py -p TestDataFormatterStdVector
Reviewers: vharron
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D8368
llvm-svn: 232434
Jim Ingham [Mon, 16 Mar 2015 22:47:38 +0000 (22:47 +0000)]
Report an error for line number values that don't convert to integers during argument
parsing so that we can give a more accurate error message.
<rdar://problem/
20145563>
llvm-svn: 232433
Siva Chandra [Mon, 16 Mar 2015 22:45:05 +0000 (22:45 +0000)]
Enable TestDataFormatterStdMap on linux (libstdc++) with clang.
Summary:
This test should have been enabled along with
7181dae1248cc1b03505cca1b7c6e3dfeffefc0a, but since the test was
actually crashing, I thought it was a much deeper problem. Turns out,
all I had to do was to add "-fno-limit-debug-info" when compiling
the test case.
The test is still skipped when the testcase is compiled with GCC.
Test Plan: dotest.py -p TestDataFormatterStdMap
Reviewers: vharron
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D8364
llvm-svn: 232432
Alexander Kornienko [Mon, 16 Mar 2015 22:31:16 +0000 (22:31 +0000)]
[clang-tidy] Move google-readability-function check to readability-named-parameter.
Summary: The relevant style rule is going to be removed, thus the check is no longer needed in the Google module. Leaving the check in readability/ in case someone needs it.
Reviewers: djasper
Reviewed By: djasper
Subscribers: curdeius, cfe-commits
Differential Revision: http://reviews.llvm.org/D8261
llvm-svn: 232431
Rafael Espindola [Mon, 16 Mar 2015 22:30:13 +0000 (22:30 +0000)]
Update for llvm API change.
llvm-svn: 232430
Rafael Espindola [Mon, 16 Mar 2015 22:29:29 +0000 (22:29 +0000)]
Pass in a "const Triple &T" instead of a raw StringRef.
llvm-svn: 232429
Rafael Espindola [Mon, 16 Mar 2015 22:06:15 +0000 (22:06 +0000)]
Remove unused argument. NFC.
llvm-svn: 232428
David Blaikie [Mon, 16 Mar 2015 22:03:50 +0000 (22:03 +0000)]
Add testing for mismatched explicit type on a gep operator when loading from bitcode
llvm-svn: 232427
Peter Collingbourne [Mon, 16 Mar 2015 22:00:04 +0000 (22:00 +0000)]
CFI: Make check-cfi depend on libLTO on Darwin.
llvm-svn: 232426
Richard Trieu [Mon, 16 Mar 2015 21:49:43 +0000 (21:49 +0000)]
Take the non-reference type when constructing a dummy expression.
Otherwise, Expr will assert during construction with a reference type.
llvm-svn: 232425
David Blaikie [Mon, 16 Mar 2015 21:48:46 +0000 (21:48 +0000)]
Add testing for mismatched explicit type on a load instruction when loading from bitcode
llvm-svn: 232424
Rafael Espindola [Mon, 16 Mar 2015 21:43:42 +0000 (21:43 +0000)]
There is only one Asm streamer, there is no need for targets to register it.
Instead, have the targets register a TargetStreamer to be use with the
asm streamer (if any).
llvm-svn: 232423
Justin Bogner [Mon, 16 Mar 2015 21:40:18 +0000 (21:40 +0000)]
InstrProf: Fix CoverageMappingReader on big endian
This makes the reader check the endianness of the object file its
given and behave appropriately. For the test I dug up a really old
linker and created a ppc-apple-darwin file for llvm-cov to read.
llvm-svn: 232422
David Majnemer [Mon, 16 Mar 2015 21:36:38 +0000 (21:36 +0000)]
CodeGen: @llvm.eh.typeid.for replaced @llvm.eh.typeid.for.i32
We removed @llvm.eh.typeid.for.i32 and replaced it with
@llvm.eh.typeid.for quite some time ago. Fix up some test cases which
never got updated.
llvm-svn: 232421
David Blaikie [Mon, 16 Mar 2015 21:35:48 +0000 (21:35 +0000)]
Test bitcode parsing error-handling for incorrect explicit type
(turns out I had regressed this when sinking handling of this type down
into GetElementPtrInst::Create - since that asserted before the error
handling was performed)
llvm-svn: 232420
Shankar Easwaran [Mon, 16 Mar 2015 21:27:32 +0000 (21:27 +0000)]
[Core] Add parallel_for_each
This adds a parallel_for_each similar to functionality in MSVC concurrency
library.
This was very patiently reviewed by Rui and credits go to him for this patch.
Differential Revision: http://reviews.llvm.org/D8348
llvm-svn: 232419
Duncan P. N. Exon Smith [Mon, 16 Mar 2015 21:23:56 +0000 (21:23 +0000)]
Verifier: Don't call debug info verifier if the module is broken
If `Verifier` has already found a failure, don't call
`DebugInfoVerifier`. The latter sometimes crashes in `DebugInfoFinder`
when the former would give a nice message. The only two cases I found
it crashing are explicit verifier tests I've added:
- test/Verifier/llvm.dbg.declare-expression.ll
- test/Verifier/llvm.dbg.value-expression.ll
However, I assume frontends with bugs will create invalid IR as well.
IMO, the `DebugInfoVerifier` should never crash (instead, it should fail
to verify), but subtleties like that will be easier to work out once
it's enabled again.
This is part of PR22777.
llvm-svn: 232418
Duncan P. N. Exon Smith [Mon, 16 Mar 2015 21:21:10 +0000 (21:21 +0000)]
AsmWriter: Handle broken metadata nodes
Print out temporary `MDNode`s so we don't crash in the verifier (or
during `dump()` output).
llvm-svn: 232417
Duncan P. N. Exon Smith [Mon, 16 Mar 2015 21:10:12 +0000 (21:10 +0000)]
DebugInfo: Fix testcases that fail -verify-debug-info=true
As part of PR22777, fix testcases that fail the debug info verifier.
The changes fall into the following categories:
- Empty `filename:` fields in `MDFile`s. Compile units and some types
require non-empty filenames. A number of testcases have empty
filenames, probably due to hand-reduction of testcases.
- Not-quite empty arrays: `!{i32 0}`. This used to be equivalent in
the debug info schema to `!{}`. They cause problems for
`!MDSubroutineType`'s `types:` array, since it requires all operands
to be valid types. (Note that `!{null}` is the correct type array
for functions that take no arguments and return `void`.)
- Significantly bitrotted testcases. Nodes got left behind a few
upgrades ago because of missing or invalid tags.
llvm-svn: 232415
Simon Atanasyan [Mon, 16 Mar 2015 21:07:46 +0000 (21:07 +0000)]
[ELF] Use pcrel format for eh_frame_ptr field encoding
The `eh_frame_ptr` field in the `.eh_frame_hdr` section contains an address
of the `.eh_frame` section. Using an absolute 32-bit format for encoding
of this field does not work for 64-bit targets. It is better to use a
relative format because it covers both 32-bit and 64-bit cases. Sure
this work if a distance between `.eh_frame_hdr` and `.eh_frame` sections
is less than 4 Gb but it is a rather correct assumption.
http://reviews.llvm.org/D8352
llvm-svn: 232414
Duncan P. N. Exon Smith [Mon, 16 Mar 2015 21:05:33 +0000 (21:05 +0000)]
Verifier: Simplify logic in processCallInst(), NFC
No need for local variables here.
llvm-svn: 232413
Duncan P. N. Exon Smith [Mon, 16 Mar 2015 21:03:55 +0000 (21:03 +0000)]
IR: Take advantage of -verify checks for MDExpression
Now that we check `MDExpression` during `-verify` (r232299), make
the `DIExpression` wrapper more strict:
- remove redundant checks in `DebugInfoVerifier`,
- overload `get()` to `cast_or_null<MDExpression>` (superseding
`getRaw()`),
- stop checking for null in any accessor, and
- remove `DIExpression::Verify()` entirely in favour of
`MDExpression::isValid()`.
There is still some logic in this class, mostly to do with high-level
iterators; I'll defer cleaning up those until the rest of the wrappers
are similarly strict.
llvm-svn: 232412
Richard Smith [Mon, 16 Mar 2015 20:54:07 +0000 (20:54 +0000)]
[modules] If we find more formerly-canonical declarations of an entity while
building its redecl chains, make sure we pull in the redeclarations of those
canonical declarations.
It's pretty difficult to reach a situation where we can find more canonical
declarations of an entity while building its redecl chains; I think the
provided testcase (4 modules and 7 declarations) cannot be reduced further.
llvm-svn: 232411
Duncan P. N. Exon Smith [Mon, 16 Mar 2015 20:46:27 +0000 (20:46 +0000)]
DebugInfo: Simplify logic in DIType::Verify(), NFC
Clarify the logic in `DIType::Verify()` by checking `isBasicType()`
earlier, by skipping `else` after `return`s, and by documenting an
otherwise opaque check.
No functionality change.
llvm-svn: 232410
Rafael Auler [Mon, 16 Mar 2015 20:39:07 +0000 (20:39 +0000)]
[LinkerScript] Handle symbols defined in linker scripts
Puts symbols defined in linker script expressions in a runtime file that is
added as input to the resolver, making the input object files see symbols
defined in linker scripts.
http://reviews.llvm.org/D8263
llvm-svn: 232409
Duncan P. N. Exon Smith [Mon, 16 Mar 2015 20:24:02 +0000 (20:24 +0000)]
Verifier: Remove unnecessary double-checks
Turns out `visitIntrinsicFunctionCall()` descends into all operands
already, so explicitly descending in `visitDbgIntrinsic()` (part of
r232296) isn't useful.
Updating a testcase that doesn't really need `-verify-debug-info` (since
r231082) as confirmation.
llvm-svn: 232408
Richard Smith [Mon, 16 Mar 2015 20:11:03 +0000 (20:11 +0000)]
Lambdaify some helper functions. No functionality change.
llvm-svn: 232407
Kevin Enderby [Mon, 16 Mar 2015 20:08:09 +0000 (20:08 +0000)]
Add the options, -dylibs-used and -dylib-id to llvm-objdump used with -macho
to print the Mach-O dynamic shared libraries used by a linked image or the
library id of a shared library.
llvm-svn: 232406
Rafael Espindola [Mon, 16 Mar 2015 20:02:28 +0000 (20:02 +0000)]
Don't repeat names in comments. Remove unused default value.
llvm-svn: 232405
Rafael Auler [Mon, 16 Mar 2015 19:56:42 +0000 (19:56 +0000)]
[LinkerScript] Adding test cases for SECTIONS semantics
llvm-svn: 232404
Siva Chandra [Mon, 16 Mar 2015 19:56:36 +0000 (19:56 +0000)]
Skip TestDataFormatterStdMap on linux instead of xfailing.
Summary:
After
7181dae1248cc1b03505cca1b7c6e3dfeffefc0a, this test progresses
much further but crashes. Will skip this test while I fix this properly.
Test Plan: dotest.py -p TestDataFormatterStdMap
Reviewers: vharron
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D8361
llvm-svn: 232403
Rafael Auler [Mon, 16 Mar 2015 19:55:15 +0000 (19:55 +0000)]
[LinkerScript] Implement semantics for simple sections mappings
This commit implements the behaviour of the SECTIONS linker script directive,
used to not only define a custom mapping between input and output sections, but
also order input sections in the output file. To do this, we modify
DefaultLayout with hooks at important places that allow us to re-order input
sections according to a custom order. We also add a hook in SegmentChunk to
allow us to calculate linker script expressions while assigning virtual
addresses to the input sections that live in a segment.
Not all SECTIONS constructs are currently supported, but only the ones that do
not use special sort orders. It adds two LIT test as practical examples of
which sections directives are currently supported.
In terms of high-level changes, it creates a new class "script::Sema" that owns
all linker script ASTs and the logic for linker script semantics as well.
ELFLinkingContext owns a single copy of Sema, which will be used throughout
the object file writing process (to layout sections as proposed by the linker
script).
Other high-level change is that the writer no longer uses a "const" copy of
the linking context. This happens because linker script expressions must be
calculated *while* calculating final virtual addresses, which is a very late
step in object file writing. While calculating these expressions, we need to
update the linker script symbol table (inside the semantics object), and, thus,
we are "modifying our context" as we prepare to write the file.
http://reviews.llvm.org/D8157
llvm-svn: 232402
Greg Clayton [Mon, 16 Mar 2015 19:54:22 +0000 (19:54 +0000)]
Added an Python operating system plug-in test to verify that python can be used to add threads to an existing process.
The test does the following:
1 - runs a program to main without the OS plug-in and verifies no OS threads are in the process
2 - loads the OS plug-in and verifies the 3 OS plug-in threads are now in the current process
3 - verify the register contents of each thread that shows up
4 - unload the python OS plug-in and verify that the OS threads are gone.
llvm-svn: 232401
Duncan P. N. Exon Smith [Mon, 16 Mar 2015 19:01:54 +0000 (19:01 +0000)]
AsmParser: Stop requiring 'name:' when it's not printed
r230877 optimized which fields are written out for `CHECK`-ability, but
apparently missed changing some of them to optional in `LLParser`.
Fixes PR22921.
llvm-svn: 232400
Siva Chandra [Mon, 16 Mar 2015 19:01:33 +0000 (19:01 +0000)]
Handle PyLong return values in LLDBSwigPython_CalculateNumChildren.
Summary:
Also, change its return type to size_t to match the return types of
its callers.
With this change, std::vector and std::list data formatter tests
pass on Linux (when using libstdc++) with clang as well as with gcc.
These tests have also been enabled in this patch.
Test Plan: dotest.py -p <TestDataFormatterStdVector|TestDataFormatterStdList>
Reviewers: vharron, clayborg
Reviewed By: clayborg
Subscribers: zturner, lldb-commits
Differential Revision: http://reviews.llvm.org/D8337
llvm-svn: 232399
Sanjay Patel [Mon, 16 Mar 2015 18:24:28 +0000 (18:24 +0000)]
fixed to test feature, not CPU
llvm-svn: 232398
David Blaikie [Mon, 16 Mar 2015 18:18:32 +0000 (18:18 +0000)]
Remove dead file (was only used by the C backend)
llvm-svn: 232397
Hafiz Abid Qadeer [Mon, 16 Mar 2015 18:18:18 +0000 (18:18 +0000)]
Remove redundant comments from lldb-mi source files.
Most of lldb-mi files have comments about environement, copyright etc which were neither needed nor uptodate.
This commit removes those comments.
llvm-svn: 232396