Commit Graph

59817 Commits

Author SHA1 Message Date
Duncan P. N. Exon Smith 31d38f70ea DI: Clarify meaning of createTempFunctionFwdDecl() arg, NFC
I stared at `false /*declaration*/` for quite some time before giving up
and checking the actual function to see what it meant.  Replacing with
`/* isDefinition = */ false` to save myself effort later.

llvm-svn: 246095
2015-08-26 22:21:09 +00:00
Ahmed Bougacha 5946ca4fc4 [ARM] Mark mcr/mrc builtin operands as required-immediate.
An early error message is better than the "cannot select" alternative.

llvm-svn: 246094
2015-08-26 22:21:07 +00:00
Charles Li 2af8f46030 Corrected 3 typos. NFC
llvm-svn: 246093
2015-08-26 22:13:30 +00:00
Reid Kleckner 14e96b4930 [ms-inline-asm] Add field access to MS inline asm identifier lookup
Now we can parse code like this:
  struct A {
    int field;
  };
  int f(A o) {
    __asm mov eax, o.field
  }

Fixes PR19117.

llvm-svn: 246088
2015-08-26 21:57:20 +00:00
Simon Pilgrim 5aba9925c0 [X86][SSE] Add _mm_undefined_* intrinsics
Added missing SSE/AVX 'undefined' intrinsics (PR24040):

_mm_undefined_pd, _mm_undefined_ps + _mm_undefined_si128
_mm256_undefined_pd, _mm256_undefined_ps + _mm256_undefined_si256
_mm512_undefined, _mm512_undefined_ps, _mm512_undefined_pd + _mm512_undefined_epi32

Added builtin intrinsicss:

__builtin_ia32_undef128, __builtin_ia32_undef256 + __builtin_ia32_undef512

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

llvm-svn: 246083
2015-08-26 21:17:12 +00:00
Akira Hatanaka 9d99bb50c4 [ARM] Error out if float-ab=hard and abi=apcs-gnu on macho platforms.
Error out if -mfloat-abi=hard or -mhard-float is specified on the command
line and the target ABI is APCS. Previously clang issued no warnings or
errors and just passed the option to the backend, which had no effect on
code generation for targets using APCS.

This commit corrects the patch commited in r245866, which didn't take into
account the fact that not all darwin targets use APCS.

rdar://problem/22257950

http://reviews.llvm.org/D12344

llvm-svn: 246054
2015-08-26 19:00:11 +00:00
Derek Schuff 9afb05024d Change Native Client x86 usr include and link path to match SDK expectations
GNU multilib style uses x86_64-nacl/include and x86_64-nacl/usr/include
but the SDK expects i686-nacl/usr/include for its files. Change the driver
to use this.

Fixes https://code.google.com/p/nativeclient/issues/detail?id=4108

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

llvm-svn: 246040
2015-08-26 17:14:08 +00:00
Samuel Benzaquen f8ec454f7d [ASTMatchers] Add type matcher for SubstTemplateTypeParmType.
llvm-svn: 246037
2015-08-26 16:15:59 +00:00
Eric Christopher 610fe11ad1 Convert a bunch of loops to ranged-for and clean up accordingly.
llvm-svn: 246027
2015-08-26 08:21:55 +00:00
Yaron Keren 8dec46cf5a Make FileManager::getFileSystemOptions consistent with CompilerInstance::getFileSystemOpts
and CompilerInvocation::getFileSystemOpts by renaming it to getFileSystemOpts,
marking the const-returning access method const and adding a non-const version,
making the function prototypes identical to CompilerInstance::getFileSystemOpts.

llvm-svn: 246026
2015-08-26 08:10:22 +00:00
Eric Christopher c6adfa1f3a Group some of the inline assembly related function prototypes near
each other.

llvm-svn: 246024
2015-08-26 07:29:58 +00:00
Eric Christopher d50e2e6397 Remove dead code associated with parsing and setting ABI based on
string name.

llvm-svn: 246021
2015-08-26 07:01:33 +00:00
Eric Christopher 1d3cbfa1c1 Remove a TODO that isn't going to get fixed in this way.
llvm-svn: 246020
2015-08-26 07:01:30 +00:00
David Majnemer d39bcaed21 [Sema] Don't assume CallExpr::getDirectCallee will succeed
We tried to provide a very nice diagnostic when diagnosing an assignment
to a const int & produced by a function call.  However, we cannot always
determine what function was called.

This fixes PR24568.

llvm-svn: 246014
2015-08-26 05:13:19 +00:00
Eric Christopher b39156d068 Update file comment to more accurately describe what's implemented.
llvm-svn: 246006
2015-08-26 04:23:11 +00:00
Nathan Wilson e23a9a4514 Modify DeclaratorChuck::getFunction to be passed an Exception Specification SourceRange
Summary:
- Store the exception specification range's begin and end SourceLocation in DeclaratorChuck::FunctionTypeInfo. These SourceLocations can be used in a FixItHint Range.
- Add diagnostic; function concept having an exception specification.


Reviewers: hubert.reinterpretcast, fraggamuffin, faisalv, aaron.ballman, rsmith

Subscribers: cfe-commits

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

llvm-svn: 246005
2015-08-26 04:19:36 +00:00
Ted Kremenek 9589caf04d Add missing newline.
llvm-svn: 246003
2015-08-26 03:11:31 +00:00
Ahmed Bougacha beb3a9a970 [Headers] Require x86-registered for r245987 codegen tests.
llvm-svn: 245992
2015-08-25 23:42:55 +00:00
Ahmed Bougacha e9abaad105 [Headers][X86] Add -O0 assembly tests for avx2 intrinsics.
We agreed for r245605 that, as long as we don't affect -O0 codegen
too much, it's OK to use native constructs rather than intrinsics.
Let's test that, starting with AVX2 here.

See PR24580.

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

llvm-svn: 245987
2015-08-25 23:09:05 +00:00
Nick Lewycky e283c5529e Make sure that we evaluate __attribute__((enable_if)) on a method with no overloads. Patch by Ettore Speziale!
llvm-svn: 245985
2015-08-25 22:33:16 +00:00
Nick Lewycky 08426e2098 Clarify the error message when the reason the conversion is not viable is because the returned value does not match the function return type.
llvm-svn: 245979
2015-08-25 22:18:46 +00:00
Simon Pilgrim fbb8904411 [X86] Remove unnecessary MMX declarations from Intrin.h
As discussed in PR23648 - the intrinsics _m_from_int, _m_to_int and _m_prefetch are defined in mmintrin.h and prfchwintrin.h so we don't need to in Intrin.h

Added tests for _m_from_int and _m_to_int

D11338 already added a test for _m_prefetch

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

llvm-svn: 245975
2015-08-25 21:27:46 +00:00
Nico Weber 8cdb3f90ef Revert r245879. Speculative, might have caused crbug.com/524604
llvm-svn: 245965
2015-08-25 18:43:32 +00:00
David Majnemer a94e7b6acf [Sema] Handle leading and trailing __ for GNU attributes
GNU attributes can have a leading and trailing __ appended/prepended to
the attribute name.  While the parser and AttributeList::getKind did the
right thing, AttributeList::getAttributeSpellingListIndex did not.

This fixes PR24565.

llvm-svn: 245953
2015-08-25 16:44:38 +00:00
Gabor Horvath 03dc473385 [Static Analyzer] Fix tests to reflect the change in the diagnostic message.
llvm-svn: 245951
2015-08-25 16:38:05 +00:00
Gabor Horvath 3240cd3421 [Static Analyzer] Fixed a typo in a diagnostic message.
llvm-svn: 245949
2015-08-25 16:27:03 +00:00
Diego Novillo d3ef1083c3 Convert SampleProfile pass into a Module pass.
Eventually, we will need sample profiles to be incorporated into the
inliner's cost models.  To do this, we need the sample profile pass to
be a module pass.

This patch makes no functional changes beyond the mechanical adjustments
needed to run SampleProfile as a module pass.

llvm-svn: 245941
2015-08-25 15:25:13 +00:00
Alexey Bataev 627cbd31d1 Fix possible crash on null base or type for array elements.
llvm-svn: 245939
2015-08-25 15:15:12 +00:00
Alexey Bataev 1a3320e463 [OPENMP 4.0] Initial support for array sections.
Adds parsing/sema analysis/serialization/deserialization for array sections in OpenMP constructs (introduced in OpenMP 4.0).
Currently it is allowed to use array sections only in OpenMP clauses that accepts list of expressions.
Differential Revision: http://reviews.llvm.org/D10732

llvm-svn: 245937
2015-08-25 14:24:04 +00:00
Eric Christopher f0c2dd07ea Rewrite the PPC target feature handling to more resemble other targets.
This involved specializing handleUserFeatures so that we could perform
diagnostics on -only- user supplied features and migrating the rest of
the initialization functions to set features based on enabling and disabling
full feature sets. No functional change intended.

llvm-svn: 245936
2015-08-25 13:45:28 +00:00
Eric Christopher 6b45437f6f Extract handling of user defined features into a function so we can
specialize it on the targets.

llvm-svn: 245935
2015-08-25 13:45:24 +00:00
Daniel Jasper af642c6927 clang-format: Add space before member function reference qualifiers.
Before:
  SomeType MemberFunction(const Deleted &)&;

After:
  SomeType MemberFunction(const Deleted &) &;

Seems to be much more common.

llvm-svn: 245934
2015-08-25 13:40:51 +00:00
Michael Kuperstein b62c5bc64d Revert r245923 since it breaks mingw.
llvm-svn: 245929
2015-08-25 11:42:31 +00:00
Michael Kuperstein 2c8f9c2c23 [X86] Expose the various _rot intrinsics on non-MS platforms
_rotl, _rotwl and _lrotl (and their right-shift counterparts) are official x86
intrinsics, and should be supported regardless of environment. This is in contrast
to _rotl8, _rotl16, and _rotl64 which are MS-specific.

Note that the MS documentation for _lrotl is different from the Intel 
documentation. Intel explicitly documents it as a 64-bit rotate, while for MS,
since sizeof(unsigned long) for MSVC is always 4, a 32-bit rotate is implied.

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

llvm-svn: 245923
2015-08-25 07:21:33 +00:00
Ahmed Bougacha 0aacc46220 [ARM NEON] Remove the old AArch64 vset_lane tests. NFC.
They are now properly tested, since r245901.

llvm-svn: 245915
2015-08-25 01:00:05 +00:00
Eric Christopher 02c33354f0 Reimplement the PPC explicit option checking to be a bit more obvious
that we're looking for conflicting options and give an explanation.

llvm-svn: 245914
2015-08-25 00:59:11 +00:00
David Majnemer 7ab76f2d71 [clang-cl] Only respect /Oy- for x86_32
The /Oy- flag should have no effect for 64-bit X86, it has reliable
unwind tables.

llvm-svn: 245913
2015-08-25 00:46:45 +00:00
Derek Schuff ac88796387 Revert "broken test. uses system ld.gold"
We should check in a basic_nacl_tree that works and also fix --sysroot

llvm-svn: 245910
2015-08-24 23:53:30 +00:00
Derek Schuff 98cd57379c broken test. uses system ld.gold
llvm-svn: 245909
2015-08-24 23:53:28 +00:00
Derek Schuff ef465d7745 Use GetLinkerPath utility function to find linker for NaCl toolchain
Summary:
This is more consistent with other targets and also makes the -fuse-ld
flag work.

Reviewers: jvoung

Subscribers: llvm-commits

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

llvm-svn: 245908
2015-08-24 23:53:25 +00:00
Ahmed Bougacha 40882bb9f8 [ARM NEON] Use CGF cached Types instead of llvm::Type::get. NFC.
llvm-svn: 245906
2015-08-24 23:47:29 +00:00
Ahmed Bougacha 774b5e296f [ARM NEON] Replace redundant code with a new GetFloatNeonType. NFC.
llvm-svn: 245904
2015-08-24 23:41:31 +00:00
Ahmed Bougacha 8fbd95306d [ARM NEON] Add missing AArch64 vget tests.
llvm-svn: 245901
2015-08-24 23:34:25 +00:00
Richard Smith d8879c85f6 [modules] Remove unnecessary deserialization of fully-external HeaderFileInfos for all files we've seen in this compilation.
llvm-svn: 245881
2015-08-24 21:59:32 +00:00
David Majnemer 3cbfb65a52 [MS ABI] Don't emit stackrestore in cleanups
The stackrestore intrinsic isn't meaningful inside of a cleanup funclet.

llvm-svn: 245879
2015-08-24 21:34:21 +00:00
Akira Hatanaka 44a6184a6d Revert r245866.
This commit was causing buildbot failures.

llvm-svn: 245871
2015-08-24 20:30:57 +00:00
Argyrios Kyrtzidis 6c61288716 [libclang] For convenience to clients, make sure that nullability and __kindof annotations do not hide
the underlying type.

rdar://22063577

llvm-svn: 245867
2015-08-24 19:50:45 +00:00
Akira Hatanaka bbede731a5 [ARM] Error out on apple darwin platforms if float-abi is "hard".
Error out if the user tries to use float-abi="hard" since it isn't
supported on darwin platforms. Previously clang issued no warnings or
erros and just passed the option to the backend, which had no effect on
code generation for targets using apcs.

rdar://problem/22257950

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

llvm-svn: 245866
2015-08-24 19:50:35 +00:00
Aaron Ballman 6ca7e64d5f Fixing some copy-pasta comments; NFC.
llvm-svn: 245861
2015-08-24 18:50:01 +00:00
Daniel Jasper 788ffd71c6 clang-format: Always allow break after leading annotations.
Before:
  DEPRECATED("Use NewClass::NewFunction instead.") int OldFunction(
  const string &parameter) {}

Could not be formatted at all, as clang-format would both require and
disallow the break before "int".

llvm-svn: 245846
2015-08-24 15:10:01 +00:00