Commit Graph

195081 Commits

Author SHA1 Message Date
Rafael Espindola 84483d247f Correctly handle -pass-remarks in the gold plugin.
llvm-svn: 231132
2015-03-03 21:11:13 +00:00
Zachary Turner af0f45f1c9 Don't #include ClangPersistentVariables.h from Process.h
Nothing from this header file was even being referenced in
Process.h anyway, so it was a completely unnecessary include.

llvm-svn: 231131
2015-03-03 21:05:17 +00:00
Paul Robinson 06a8eb8343 [X86][ELF] Correct relocation for DWARF TLS references
Previously we had only Linux using DTPOFF for these; all X86 ELF
targets should. Fixes a side issue mentioned in PR21077.

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

llvm-svn: 231130
2015-03-03 21:01:27 +00:00
Sanjay Patel 36a2dc895f remove enum value names from comments; NFC
llvm-svn: 231129
2015-03-03 20:58:35 +00:00
Eric Christopher 56d00fee88 Add support for SunOS function/data sections and associated
section gc.

Patch by Bill Rushmore.

llvm-svn: 231128
2015-03-03 20:54:29 +00:00
David Blaikie 0a756e6ad5 unique_ptrify ResourcePriorityQueue::ResourceModel
llvm-svn: 231127
2015-03-03 20:49:08 +00:00
David Blaikie b8cd65c5a2 Remove ResourcePriorityQueue::dump as it relies on copying a non-copyable type which would result in a double-delete
llvm-svn: 231126
2015-03-03 20:49:05 +00:00
Sanjoy Das 1ab99dd174 [ADT] fail-fast iterators for DenseMap
This patch was landed in r231035 and reverted because it was buggy.
This is fixed version of the same change.

Summary:
This patch is an attempt at making `DenseMapIterator`s "fail-fast".
Fail-fast iterators that have been invalidated due to insertion into
the host `DenseMap` deterministically trip an assert (in debug mode)
on access, instead of non-deterministically hitting memory corruption
issues.

Reviewers: dexonsmith, dberlin, ruiu, chandlerc

Reviewed By: chandlerc

Subscribers: yaron.keren, chandlerc, llvm-commits

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

llvm-svn: 231125
2015-03-03 20:46:45 +00:00
Sumanth Gundapaneni 3a159294d0 Fix program name in "clang -help"
With out this patch,
"clang -help" prints "USAGE: clang-3 [options] <inputs>".
It should either print
USAGE: clang [options] <inputs>
or

USAGE: clang-3.7 [options] <inputs>
With this patch, on Linux, it prints
USAGE: clang-3.7 [options] <inputs>

On Windows, it prints
USAGE: clang.exe [options] <inputs>

llvm-svn: 231124
2015-03-03 20:43:12 +00:00
Sanjay Patel 948602bd17 use bool operator shortcut; NFC
llvm-svn: 231123
2015-03-03 20:41:27 +00:00
Andrew Kaylor e07b2a06d3 Fixing problem with field initialization order
llvm-svn: 231122
2015-03-03 20:22:09 +00:00
Adrian Prantl b283815a30 Fix PR22762. When emitting a DWARF expression check whether this is the
frame register before checking if there is a DWARF register number for it.

Thanks to H.J. Lu for diagnosing this and providing the testcase!

llvm-svn: 231121
2015-03-03 20:12:52 +00:00
Chaoren Lin 6efb8bd947 [TestGlobalVariables] LD_LIBRARY_PATH should be process working directory.
Summary:
The inferior can load the library now, but the remote test is still failing
because of a module loading problem in LLDB.

Reviewers: ovyalov, sivachandra, clayborg

Subscribers: lldb-commits

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

llvm-svn: 231120
2015-03-03 20:11:48 +00:00
Eric Fiselier b3be398c67 Allow declaration of map and multimap iterator with incomplete mapped type. Patch from eugenis
llvm-svn: 231119
2015-03-03 20:10:01 +00:00
Bill Seurer 2351bec3ea [PowerPC]Activate "vector bool long long" (and alternate spellings) as a valid type for Altivec support for Power.
There are two test case updates for very basic testing. While I was editing cxx-altivec.cpp I also updated it to better match some other changes in altivec.c.

Note: "vector bool long" was not also added because its use is considered deprecated.

http://reviews.llvm.org/D7235

llvm-svn: 231118
2015-03-03 20:08:43 +00:00
Andrew Kaylor f0f5e46e07 Outline cleanup handlers for native Windows C++ exception handling
Differential Revision: http://reviews.llvm.org/D7865

llvm-svn: 231117
2015-03-03 20:00:16 +00:00
Kit Barton 0cfa7b7ad0 Add the following 64-bit vector integer arithmetic instructions added in POWER8:
vaddudm
vsubudm
vmulesw
vmulosw
vmuleuw
vmulouw
vmuluwm
vmaxsd
vmaxud
vminsd
vminud
vcmpequd
vcmpequd.
vcmpgtsd
vcmpgtsd.
vcmpgtud
vcmpgtud.
vrld
vsld
vsrd
vsrad

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

llvm-svn: 231115
2015-03-03 19:55:45 +00:00
David Blaikie e4080e7f2a DeltaAlgorithm: Provide protected default copy ctor for use by test derived class.
Without this, use of this copy ctor is deprecated in C++11 due to the
presence of a user-declared dtor.

Marking the class final is just a little extra security that there are
no further derived classes that may then end up using the intermediate
base class's copy assignment operator and cause slicing to occur.

I didn't bother marking the other (non-test) base class final, since it
has reference members so it won't have any implicit assignment operators
anyway. Open to ideas on that, though.

We probably want a warning about use of a slicing assignment operator,
then I wouldn't worry so much about marking the class as final.

llvm-svn: 231114
2015-03-03 19:53:04 +00:00
David Blaikie ca199cbf9b Remove explicit no-op dtor in favor of the implicit dtor so as not to disable/deprecate the copy operations.
llvm-svn: 231113
2015-03-03 19:53:02 +00:00
David Blaikie 6695b09e55 Remove no-op dtor so that use of the implicit copy ctor/assignment operator are not deprecated.
llvm-svn: 231112
2015-03-03 19:52:59 +00:00
Eric Christopher 720ab84ba2 Add a comment above findRepresentativeClass explaining why it's
where it is so that future generations can understand.

llvm-svn: 231111
2015-03-03 19:47:14 +00:00
David Blaikie af16cda10d Remove explicit copy ctor in favor of the implicit one so that the use of the copy assignment operator is not deprecated.
llvm-svn: 231110
2015-03-03 19:29:14 +00:00
David Blaikie 3bf8b304fc Remove explicit copy assignment operator in favor of the implicit/default to avoid disabling/deprecating the implicit copy ctor.
llvm-svn: 231109
2015-03-03 19:29:13 +00:00
David Blaikie 8f655ef041 Remove explicit copy ctor in favor of the default so as not to disable/deprecate the implicit copy assignment operator
llvm-svn: 231108
2015-03-03 19:29:11 +00:00
Zachary Turner 32abc6edac Reduce header footprint of Target.h
This continues the effort to reduce header footprint and improve
build speed by removing clang and other unnecessary headers
from Target.h.  In one case, some headers were included solely
for the purpose of declaring a nested class in Target, which was
not needed by anybody outside the class.  In this case the
definition and implementation of the nested class were isolated
in the .cpp file so the header could be removed.

llvm-svn: 231107
2015-03-03 19:23:09 +00:00
Reid Kleckner fff8e7f6ba Split catch IRgen into ItaniumCXXABI and MicrosoftCXXABI
Use llvm.eh.begincatch for Microsoft-style catches.

This moves lots of CGException code into ItaniumCXXABI. Sorry for the
blame pain.

llvm-svn: 231105
2015-03-03 19:21:04 +00:00
David Blaikie 5b240485b7 unique_ptrify FullDependenceAnalysis::DV
Making this type a little harder to abuse (see workaround relating to
use of the implicit copy ctor in the prior commit)

llvm-svn: 231104
2015-03-03 19:20:18 +00:00
David Blaikie c5771c214e FullDependenceAnalysis: Avoid using the (deprecated in C++11) copy ctor
llvm-svn: 231103
2015-03-03 19:20:16 +00:00
David Blaikie 9107a1bc27 Remove some explicit copy assignment operators is favor of implicit ones, as their presence makes the use of the implicit copy ctor deprecated in C++11
llvm-svn: 231102
2015-03-03 19:20:13 +00:00
Chaoren Lin d9c054d001 Fix TestQuoting on remote targets.
Summary: Needed to transfer stdout.txt to host before reading.

Reviewers: ovyalov, clayborg

Subscribers: tberghammer, lldb-commits

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

llvm-svn: 231101
2015-03-03 19:10:39 +00:00
Dario Domizioli 5f7008a688 Fix PR22750: non-determinism causes assertion failure in DWARF generation
The cause of the issue is the interaction of two factors:
1) When generating a DW_TAG_imported_declaration DIE which imports another 
   imported declaration, the code in AsmPrinter/DwarfCompileUnit.cpp 
   asserts that the second imported declaration must already have a DIE.
2) There is a non-determinism in the order in which imported declarations
   within the same scope are processed.
Because of the non-determinism (2), it is possible that an imported 
declaration is processed before another one it depends on, breaking the 
assumption in (1).

The source of the non-determinism is that the imported declaration 
DIDescriptors are sorted by scope in DwarfDebug::beginModule(); however that
sort is not a stable_sort, therefore the order of the declarations within 
the same scope is not preserved. The attached patch changes the std::sort to
a std::stable_sort and it fixes the problem.

Test omitted due to it being non-deterministic and depending on the
implementation of std::sort.

llvm-svn: 231100
2015-03-03 18:40:53 +00:00
David Blaikie e6c4eda5dd [Small]BitVector::reference: Explicitly default copy construction as it is deprecated in C++11 in the presence of explicit copy assignment.
I tried making these private & friended to the BitVector, but that
didn't work - there's one use of BitVector::reference in Clang that
actually copies it into a local variable & uses it from there, rather
than just using the result of op[] in a temporary expression.

Whether or not this is desired is debatable (we could just fix that one
use in Clang) & it's not clear which way the C++ standard falls on this
for std::bitset's reference type (it has the same bug at least in
libstdc++, but Clang's -Wdeprecated doesn't flag it, because it's in a
standard header)

While it was only BitVector::reference's copy ctor that was referenced
by user code, I made SmallBitVector::reference's copy ctor public too,
for consistency.

llvm-svn: 231099
2015-03-03 18:39:00 +00:00
Reid Kleckner f7e1e75828 Disable the right RUN line
llvm-svn: 231098
2015-03-03 18:36:38 +00:00
Zachary Turner 88c6b62e9c Don't #include ClangASTContext.h from Module.h
This is part of a larger effort to reduce header file footprints.
Combined, these patches reduce the build time of LLDB locally by
over 30%.  However, they touch many files and make many changes,
so will be submitted in small incremental pieces.

Reviewed By: Greg Clayton
Differential Revision: http://reviews.llvm.org/D8022

llvm-svn: 231097
2015-03-03 18:34:26 +00:00
Filipe Cabecinhas a96989dc8d Disabled the other test from r231086 (like in r231087) since it also had problems
llvm-svn: 231096
2015-03-03 18:32:38 +00:00
David Blaikie 5c519485dc Avoid explicitly declaring the copy assignment operator, as this unnecessarily makes the copy ctor deprecated in C++11
llvm-svn: 231095
2015-03-03 18:29:27 +00:00
David Blaikie d36b63077f Twine: Explicitly default the copy ctor as it's otherwise deprecated in C++11 by the presence of a user-declared copy assignment operator.
llvm-svn: 231094
2015-03-03 18:29:25 +00:00
David Blaikie 700d9c3073 DenseMapIterator: Avoid explicitly declaring the copy ctor as this makes the copy assignment operator deprecated in C++11
llvm-svn: 231093
2015-03-03 18:29:23 +00:00
Dan Albert 84aee012ea Support __attribute__((availability)) on Android.
Reviewers: srhines

Reviewed By: srhines

Subscribers: cfe-commits

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

llvm-svn: 231092
2015-03-03 18:28:38 +00:00
Dan Albert 77214a4498 Don't force -pie for Android.
Summary:
There is no -no-pie flag that can override this, so making it default
to being on for Android means it is no longer possible to create
non-PIE executables on Android. While current versions of Android
support (and the most recent requires) PIE, ICS and earlier versions
of Android cannot run PIE executables, so this needs to be optional.

Reviewers: srhines

Reviewed By: srhines

Subscribers: thakis, volkalexey, cfe-commits

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

llvm-svn: 231091
2015-03-03 18:24:57 +00:00
Dan Albert 675cffcb91 Make Triple::getOSVersion make sense for Android.
Reviewers: srhines

Reviewed By: srhines

Subscribers: llvm-commits

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

llvm-svn: 231090
2015-03-03 18:23:51 +00:00
David Blaikie 23f94dfdf4 Update Polly tests for the great metadata schema change
llvm-svn: 231089
2015-03-03 18:17:26 +00:00
Eric Christopher 43768e311c 80-column fixup.
llvm-svn: 231088
2015-03-03 17:54:39 +00:00
Reid Kleckner 1859025df8 Disable a Clang test until the begincatch change lands
llvm-svn: 231087
2015-03-03 17:51:26 +00:00
Reid Kleckner 2f05d4c91f Make llvm.eh.begincatch use an outparam
Ultimately, __CxxFrameHandler3 needs us to put a stack offset in a
table, and it will take responsibility for copying the exception object
into that slot. Modelling the exception object as an SSA value returned
by begincatch isn't going to work in general, so make it use an output
parameter.

Reviewers: andrew.w.kaylor

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

llvm-svn: 231086
2015-03-03 17:41:09 +00:00
Chad Rosier 8e38f30e49 [AArch64] When combining constant mul of -3, prefer (sub x, (shl x, N)).
This change only effects codegen when the constant is -3.

llvm-svn: 231085
2015-03-03 17:31:01 +00:00
Hans Wennborg e292262e59 Migrate clang-format-vs plugin project to VS 2013
The plugin still works fine in versions starting from 2010,
but this was needed to make the project _build_ in VS 2013, which
is the blessed version for building LLVM projects these days.

http://reviews.llvm.org/D8021

llvm-svn: 231084
2015-03-03 17:30:50 +00:00
Duncan P. N. Exon Smith f04be1fb3a DebugInfo: Move new hierarchy into place (clang)
Update testcases for LLVM change in r231082 to use the new debug info
hierarchy.

llvm-svn: 231083
2015-03-03 17:25:55 +00:00
Duncan P. N. Exon Smith e274180f0e DebugInfo: Move new hierarchy into place
Move the specialized metadata nodes for the new debug info hierarchy
into place, finishing off PR22464.  I've done bootstraps (and all that)
and I'm confident this commit is NFC as far as DWARF output is
concerned.  Let me know if I'm wrong :).

The code changes are fairly mechanical:

  - Bumped the "Debug Info Version".
  - `DIBuilder` now creates the appropriate subclass of `MDNode`.
  - Subclasses of DIDescriptor now expect to hold their "MD"
    counterparts (e.g., `DIBasicType` expects `MDBasicType`).
  - Deleted a ton of dead code in `AsmWriter.cpp` and `DebugInfo.cpp`
    for printing comments.
  - Big update to LangRef to describe the nodes in the new hierarchy.
    Feel free to make it better.

Testcase changes are enormous.  There's an accompanying clang commit on
its way.

If you have out-of-tree debug info testcases, I just broke your build.

  - `upgrade-specialized-nodes.sh` is attached to PR22564.  I used it to
    update all the IR testcases.
  - Unfortunately I failed to find way to script the updates to CHECK
    lines, so I updated all of these by hand.  This was fairly painful,
    since the old CHECKs are difficult to reason about.  That's one of
    the benefits of the new hierarchy.

This work isn't quite finished, BTW.  The `DIDescriptor` subclasses are
almost empty wrappers, but not quite: they still have loose casting
checks (see the `RETURN_FROM_RAW()` macro).  Once they're completely
gutted, I'll rename the "MD" classes to "DI" and kill the wrappers.  I
also expect to make a few schema changes now that it's easier to reason
about everything.

llvm-svn: 231082
2015-03-03 17:24:31 +00:00
Juergen Ributzka 9baa03fc07 Lower _mm256_broadcastsi128_si256 directly to a vector shuffle.
Originally we were using the same GCC builtins to lower this AVX2 vector
intrinsic. Instead we will now lower it directly to a vector shuffle.

This will not only allow LLVM to generate better code, but it will also allow us
to remove the GCC intrinsics.

Reviewed by Andrea

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

llvm-svn: 231081
2015-03-03 17:22:53 +00:00