Commit Graph

18850 Commits

Author SHA1 Message Date
Tyler Nowicki
8a0925cb62 Append options for floating-point commutivity when related diagnostics are produced.
With this patch clang appends the command line options that would allow vectorization when floating-point commutativity is required. Specifically those are enabling fast-math or specifying a loop hint. 

llvm-svn: 244492
2015-08-10 19:56:40 +00:00
Mark Heffernan
397a98d86d Add new llvm.loop.unroll.enable metadata for use with "#pragma unroll".
This change adds the new unroll metadata "llvm.loop.unroll.enable" which directs
the optimizer to unroll a loop fully if the trip count is known at compile time, and
unroll partially if the trip count is not known at compile time. This differs from
"llvm.loop.unroll.full" which explicitly does not unroll a loop if the trip count is not
known at compile time

With this change "#pragma unroll" generates "llvm.loop.unroll.enable" rather than
"llvm.loop.unroll.full" metadata. This changes the semantics of "#pragma unroll" slightly
to mean "unroll aggressively (fully or partially)" rather than "unroll fully or not at all".

The motivating example for this change was some internal code with a loop marked
with "#pragma unroll" which only sometimes had a compile-time trip count depending
on template magic. When the trip count was a compile-time constant, everything works
as expected and the loop is fully unrolled. However, when the trip count was not a
compile-time constant the "#pragma unroll" explicitly disabled unrolling of the loop(!).
Removing "#pragma unroll" caused the loop to be unrolled partially which was desirable
from a performance perspective.

llvm-svn: 244467
2015-08-10 17:29:39 +00:00
Roman Kashitsyn
291f64fd03 Add WebKit brace style configuration option.
Summary:
Add brace style `BS_WebKit` as described on https://www.webkit.org/coding/coding-style.html:

* Function definitions: place each brace on its own line.
* Other braces: place the open brace on the line preceding the code block; place the close brace on its own line.

Set brace style used in `getWebKitStyle()` to the newly added `BS_WebKit`.

Reviewers: djasper, klimek

Subscribers: klimek, cfe-commits

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

llvm-svn: 244446
2015-08-10 13:43:19 +00:00
Richard Smith
86cc82906f [modules] Remove now-dead code for lazy loading of files specified by -fmodule-file=.
llvm-svn: 244417
2015-08-09 08:58:36 +00:00
Richard Smith
0f99d6a441 [modules] PR22534: Load files specified by -fmodule-file= eagerly. In particular, this avoids the need to re-parse module map files when using such a module.
llvm-svn: 244416
2015-08-09 08:48:41 +00:00
Richard Smith
2a6edb30d9 [modules] When building a dependency file, include module maps parsed in the
current compilation, not just those from imported modules.

llvm-svn: 244413
2015-08-09 04:46:57 +00:00
Richard Smith
2bb3c34ed4 [modules] When loading a template specialization, re-canonicalize its template
arguments because the reloaded form might have become non-canonical across the
serialization/deserialization step (this particularly happens when the
canonical form of the type involves an expression).

llvm-svn: 244409
2015-08-09 01:05:31 +00:00
Eric Christopher
e173314d39 Move the cpu validating virtual method down to the feature routines
where it belongs.

llvm-svn: 244342
2015-08-07 18:31:25 +00:00
Michael Wong
e710d5459e This patch commits OpenMP 4 target device clauses
This is committed on behalf of Kelvin Li
http://reviews.llvm.org/D11469?id=31227

llvm-svn: 244325
2015-08-07 16:16:36 +00:00
Richard Smith
ca3156ac77 [modules] Remove unused ModuleManager::visitDepthFirst function.
llvm-svn: 244289
2015-08-06 22:14:35 +00:00
Eric Christopher
b6dfd9490b Continue the work from r243908 by adding a Features field to Builtin::Info
so that we can populate it on a per-target basis with required features.

Future commits will start using this information for warnings.

llvm-svn: 244286
2015-08-06 22:11:54 +00:00
Richard Smith
82f8fcda9f [modules] Stop walking all modules when looking for lexical decls for a
DeclContext. These only ever come from the owning module file for the Decl.

llvm-svn: 244285
2015-08-06 22:07:25 +00:00
James Y Knight
6a84cefd03 Fix alignment of TemplateArgumentList.
llvm-svn: 244280
2015-08-06 21:22:02 +00:00
Richard Smith
73a7d7d4b8 [modules] Remove now-unused MergedLookups map.
llvm-svn: 244277
2015-08-06 21:09:44 +00:00
James Y Knight
7a22b24961 Convert a few classes over to use the new TrailingObjects helper.
This initial commit serves as an example -- the remainder of the
classes using pointer arithmetic for trailing objects will be
converted in subsequent changes.

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

llvm-svn: 244262
2015-08-06 20:26:32 +00:00
James Y Knight
7d708db0cb Remove unused 'Owned' flag from TemplateArgumentList.
llvm-svn: 244261
2015-08-06 20:26:18 +00:00
Alexey Bataev
a889917493 [OPENMP 4.1] Allow references in init expression for loop-based constructs.
OpenMP 4.1 allows to use variables with reference types in private clauses and, therefore, in init expressions of the cannonical loop forms.

llvm-svn: 244209
2015-08-06 12:30:57 +00:00
Alex Denisov
5dfac81c60 [ObjC] Circular containers: add support of subclasses
llvm-svn: 244193
2015-08-06 04:51:14 +00:00
Richard Smith
0f4e2c4d0f [modules] Defer setting up the lookup table for a DeclContext until we can
determine the primary context, rather than sometimes registering the lookup
table on the wrong context.

This exposed a couple of bugs:
 * the odr violation check didn't deal properly with mergeable declarations
   if the declaration retained by name lookup wasn't in the canonical
   definition of the class
 * the (broken) RewriteDecl mechanism would emit two name lookup tables for
   the same DeclContext into the same module file (one as part of the
   rewritten declaration and one as a visible update for the old declaration)
These are both fixed too.

llvm-svn: 244192
2015-08-06 04:23:48 +00:00
Eric Christopher
02d5d86b4e Rename the non-coding style conformant functions in namespace Builtins
to match the rest of their brethren and reformat the bits that need it.

llvm-svn: 244186
2015-08-06 01:01:12 +00:00
Eric Christopher
964a5f3b5c Rename DescriptionString -> DataLayoutString as it matches the actual
use of the string.

llvm-svn: 244178
2015-08-05 23:48:05 +00:00
Diego Novillo
c4b94da00e Add -fno-coverage-mapping flag.
This new flag allows the user to disable a previous instance of
-fcoverage-mapping, if needed.

llvm-svn: 244170
2015-08-05 23:27:40 +00:00
Richard Smith
3cb15729af function_ref-ize ExternalASTSource::FindExternalLexicalDecl and remove its
useless return value. Switch to using it directly when completing the
redeclaration chain for an anonymous declaration, and reduce the set of
declarations that we load in the process to just those of the right kind.

llvm-svn: 244161
2015-08-05 22:41:45 +00:00
Diego Novillo
758f3f542a Add flags to disable profile generation.
This patch adds flags -fno-profile-instr-generate and
-fno-profile-instr-use, and the GCC aliases -fno-profile-generate and
-fno-profile-use.

These flags are used in situations where users need to disable profile
generation or use for specific files in a build, without affecting other
files.

llvm-svn: 244153
2015-08-05 21:49:51 +00:00
Douglas Katzman
44f5d18587 Reword a comment about IncludeDirGroup. NFC
Referring to the groups by mixing the enumerated name
with the command-line flag was not as clear as could be.

llvm-svn: 244150
2015-08-05 21:31:54 +00:00
Eric Christopher
53645350e2 Remove unused header includes.
llvm-svn: 244131
2015-08-05 21:11:56 +00:00
Eric Christopher
35869a26cd Rename builtin_lang -> Langs to match the rest of the code a bit better.
llvm-svn: 244126
2015-08-05 21:04:28 +00:00
Eric Christopher
b20d7700cc Remove unused function GetBuiltinNames.
llvm-svn: 244125
2015-08-05 21:04:24 +00:00
James Dennett
7ab178a29a Documentation: fix another typo, "arrays types" -> "array types".
Thanks to Kim Gräsman <kim.grasman@gmail.com> for pointing this out.

llvm-svn: 244124
2015-08-05 20:58:23 +00:00
Eric Christopher
27fbefde07 Remove unused comparison operators from the Builtin Info struct.
llvm-svn: 244111
2015-08-05 20:11:04 +00:00
James Dennett
2a02557b4e Documentation: fix a typo, "This flag is determines" -> "This flag determines".
No functional change.

llvm-svn: 244104
2015-08-05 19:44:47 +00:00
Reid Kleckner
124955aade Add -gcodeview and -gdwarf to control which type Clang emits
Summary:
By default, 'clang' emits dwarf and 'clang-cl' emits codeview.  You can
force emission of one or both by passing -gcodeview and -gdwarf to
either driver.

Reviewers: dblaikie, hans

Subscribers: cfe-commits

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

llvm-svn: 244097
2015-08-05 18:51:13 +00:00
Aaron Ballman
1ca258e6a8 Add AST matchers for narrowing constructors that are default, copy, or move constructors, as well as functionality to determine whether a ctor initializer is a base initializer.
llvm-svn: 244036
2015-08-05 12:11:30 +00:00
Benjamin Kramer
9cc21065b4 [AST] ArrayRefize template param list info setters. No functionality change intended.
llvm-svn: 244028
2015-08-05 09:40:49 +00:00
Benjamin Kramer
b40e4af845 [AST] ArrayRefize BlockDecl::setCaptures. No functionality change intended.
llvm-svn: 244027
2015-08-05 09:40:35 +00:00
Benjamin Kramer
cce6347be5 [AST] ArrayRefize template argument packs. No functionality change intended.
llvm-svn: 244026
2015-08-05 09:40:22 +00:00
Benjamin Kramer
1f11d45a3f [Comments] Replace custom ArrayRef copying with ArrayRef::copy. NFC.
llvm-svn: 244025
2015-08-05 09:40:04 +00:00
Benjamin Kramer
2ab0d88b91 [ASTContext] Add a templated convenience wrapper for Allocate.
This brings ASTContext closer to LLVM's Allocator concept. Ideally we
would just derive ASTContext from llvm::AllocatorBase, but that does
not work because ASTContext's allocator is mutable and we allocate using
const ASTContext& everywhere.

llvm-svn: 243972
2015-08-04 12:34:23 +00:00
Alexey Bataev
54acd40591 [OPENMP 4.1] Support for 'linear' clause in loop directives.
OpenMP 4.1 allows 'linear' clause in loop directives. Patch adds support for it.

llvm-svn: 243969
2015-08-04 11:18:19 +00:00
Benjamin Kramer
323dc2d064 [Edit] Use StringRef's copy method. No functional change intended.
llvm-svn: 243968
2015-08-04 11:18:09 +00:00
Chandler Carruth
d96e877788 [UB] Fix two cases of UB in copy/pasted code from SmallVector.
We should really stop copying and pasting code around. =/

Found by UBSan.

llvm-svn: 243945
2015-08-04 03:52:52 +00:00
Richard Smith
8cbd895947 [modules] Make IndirectFieldDecl mergeable to avoid lookup ambiguity when the same anonymous union is defined across multiple modules.
llvm-svn: 243940
2015-08-04 02:05:09 +00:00
Justin Bogner
5ff020a6b6 X86: Teach X86 builtins which target features they require
This adds the required target feature names to x86 builtins that need
particular features. Most have exactly one ("avx", "aes", etc), but some
of the avx512 features have multiple requirements, eg "avx512vl,avx512bw".

llvm-svn: 243908
2015-08-03 22:26:06 +00:00
Nathan Wilson
8567a000b9 [CONCEPTS] Add concept to VarDecl and diagnostic for uninitialized variable concept
Summary: Add IsConcept bit to VarDecl::NonParmVarDeclBitfields and associated isConcept/setConcept member functions. Set IsConcept to true when 'concept' specifier is in variable declaration. Create diagnostic when variable concept is not initialized.

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

Subscribers: aemerson, cfe-commits

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

llvm-svn: 243876
2015-08-03 14:25:45 +00:00
Andrey Bokhanko
d9eab9cc13 Additional fix for PR14269: Crash on vector elements / global register vars in inline assembler.
Compiler crashed when vector elements / global register vars were used in inline assembler with "m" restriction. This patch fixes this.

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

llvm-svn: 243870
2015-08-03 10:38:10 +00:00
Asaf Badouh
c68e347c25 [X86][AVX512VLBW] add pack, cvt, mulhi and madd intrinsics
Differential Revision: http://reviews.llvm.org/D11642

llvm-svn: 243867
2015-08-03 07:51:00 +00:00
Asaf Badouh
73b639f650 [X86][AVX512VLDQ] add reduce/range/cvt intrinsics
add 128 & 256 width intrinsic versions of reduce/range and cvt i64 to FP and vice versa

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

llvm-svn: 243848
2015-08-02 12:43:08 +00:00
David Majnemer
dbf1045ad7 [MS ABI] Hook clang up to the new EH instructions
The new EH instructions make it possible for LLVM to generate .xdata
tables that the MSVC personality routines will be happy about.  Because
this is experimental, hide it behind a -cc1 flag (-fnew-ms-eh).

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

llvm-svn: 243767
2015-07-31 17:58:45 +00:00
Alexey Bataev
05c25d64c1 Outline function Parser::ParseCXXClassMemberDeclarationWithPragmas(), NFC.
Parsing of pragmas followed by a class member declaration is outlined into a separate function Parser::ParseCXXClassMemberDeclarationWithPragmas().

llvm-svn: 243739
2015-07-31 08:42:25 +00:00
Argyrios Kyrtzidis
c56419ed00 [modules] Fix issue where building a module from a relative path when -working-directory option is set, results in error.
The error was "module '<name>' was built in directory '<path>' but now resides in directory '<path>'
rdar://21330027

llvm-svn: 243718
2015-07-31 00:58:32 +00:00
Hubert Tong
a67833bb35 [Concepts] Add diagnostic: non template declaration
Summary:
Adding diagnostic for concepts declared as non template (function
or variable)

Reviewers: faisalv, fraggamuffin, rsmith, hubert.reinterpretcast

Subscribers: nwilson, cfe-commits

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

Patch by Nathan Wilson!

llvm-svn: 243690
2015-07-30 21:20:55 +00:00
Ulrich Weigand
3c5038a535 Add support for System z vector language extensions
The z13 vector facility has an associated language extension,
closely modeled on AltiVec/VSX.  The main differences are:

- vector long, vector float and vector pixel are not supported

- vector long long and vector double are supported (like VSX)

- comparison operators return a vector rather than a scalar integer

- shift operators behave like the OpenCL shift operators

- vector bool is only supported as argument to certain operators;
  some operators allow mixing a bool with a non-bool vector 

This patch adds clang support for the extension.  It is closely modelled
on the AltiVec support.  Similarly to the -faltivec option, there's a
new -fzvector option to enable the extensions (as well as an -mzvector
alias for compatibility with GCC).  There's also a separate LangOpt.

The extension as implemented here is intended to be compatible with
the -mzvector extension recently implemented by GCC.

Based on a patch by Richard Sandiford.

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

llvm-svn: 243642
2015-07-30 14:08:36 +00:00
Alexey Bataev
10e775f4a8 [OPENMP 4.1] Initial support for extended 'ordered' clause.
OpenMP 4.1 introduces optional argument '(n)' for 'ordered' clause, where 'n' is a number of loops that immediately follow the directive.
'n' must be constant positive integer expressions and it must be less or equal than the number of the loops in the resulting loop nest.
Patch adds parsing and semantic analysis for this optional argument.

llvm-svn: 243635
2015-07-30 11:36:16 +00:00
Sean Silva
3e36e507ec Attempt to make clang-x64-ninja-win7 happy.
It looks like we were somehow relying somewhere on removing 'foo/./bar'
but *not* 'foo/../foo/bar'. Currently investigating.

llvm-svn: 243600
2015-07-30 00:52:32 +00:00
Asaf Badouh
1998eb2077 [X86][AVX512BW] add convert i16 to i8 and unpack intrinsics
Differential Revision: http://reviews.llvm.org/D11564

llvm-svn: 243514
2015-07-29 12:34:20 +00:00
Richard Trieu
97c45b6588 Use an iterative method instead of recursion for printing macro backtraces.
Store the locations for a macro expansion in a vector, then iterate over them
instead of using recursion.  This simplifies the logic around the backtrace
limit and gives easier access to the source locations.  No functionality change.

Patch by Zhengkai Wu.

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

llvm-svn: 243477
2015-07-28 20:53:46 +00:00
Nico Weber
5672e67b14 Rename -Wmsvc-include to -Wmicrosoft-include, now that -Wmicrosoft is split up.
(Keep -Wmsvc-include around as an alias.)

While here, also replace the one other mention of "MSVC" in diagnostics with
"Microsoft", for consistency.

llvm-svn: 243444
2015-07-28 16:48:12 +00:00
Chih-Hung Hsieh
2c656c9417 Add -femulated-tls flag to select the emulated TLS model.
This will be used for old targets like Android that do not
support ELF TLS models.

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

llvm-svn: 243441
2015-07-28 16:27:56 +00:00
Benjamin Kramer
9938310ab3 [CodeGen] Simplify creation of shuffle masks.
No functional change intended.

llvm-svn: 243439
2015-07-28 16:25:32 +00:00
Adhemerval Zanella
3916c910d1 [AArch64] Implement __builtin_thread_pointer
This path add the aarch64 __builtin_thread_pointer support.  It will be
lowered to llvm.aarch64.thread.pointer.

llvm-svn: 243413
2015-07-28 13:10:10 +00:00
Asaf Badouh
93aa4c808a [X86][AVX512VL] add AVX512VL intrinsics 4 out of 4
Differential Revision: http://reviews.llvm.org/D11526

llvm-svn: 243409
2015-07-28 12:04:40 +00:00
Asaf Badouh
b7cf71b63d [X86][AVX512VL] add AVX512VL intrinsics 3 out of 4
http://reviews.llvm.org/D11526

llvm-svn: 243406
2015-07-28 11:14:09 +00:00
Asaf Badouh
78ee5cc8e1 [X86][AVX512VL] add AVX512VL intrinsics 2 out of 4
http://reviews.llvm.org/D11526

llvm-svn: 243402
2015-07-28 10:30:56 +00:00
Asaf Badouh
74da38706e [X86][AVX512VL] add AVX512VL intrinsics 1 out of 4
http://reviews.llvm.org/D11526

llvm-svn: 243394
2015-07-28 08:26:14 +00:00
Nico Weber
cee4d85faf Split -Wmicrosoft into many specific warnings.
Also move "pragma comment" warning from -Wmicrosoft to -Wignored-pragmas.

-Wmicrosoft currently covers many different areas, some more useful than
others.  Split it into many targeted flags, so that projects can choose to
enable only a subset of these warnings.  This is also useful for incrementally
fixing and turning on these warnings.

-Wno-microsoft still disables all these warnings, and -Wmicrosoft still enables
them all.  After this change, it's possible to pass `-Wno-microsoft
-Wmicrosoft-unqualified-friend` to only enable -Wmicrosoft-unqualified-friend,
and `-Wmicrosoft -Wno-microsoft-unqualified-friend` to enable all other
Microsoft warnings.

I put all the template-related warnings behind -Wmicrosoft-template; if that
turns out to be too coarse we can make that finer later on. (In practice, I
haven't seen the template-related warnings fire frequently.)

Reviewed at http://reviews.llvm.org/D11504

llvm-svn: 243371
2015-07-28 02:37:37 +00:00
Aaron Ballman
a99369862d Removing unused function declaration with no definition; NFC.
llvm-svn: 243311
2015-07-27 19:34:46 +00:00
Aaron Ballman
f133e8cb7f Correcting a typo in a comment; NFC.
llvm-svn: 243292
2015-07-27 17:58:32 +00:00
David Majnemer
015ce0f68f [clang-cl] Handle -O correctly
We had multiple bugs here:
- We didn't support multiple optimization options in one argument.
  e.g. -O2y-
- We didn't correctly expand -O[12dx] to their respective options.
- We treated -O1 as clang -O1 instead of clang -Os.
- We treated -Ox as clang -O3 instead of clang -O2.  In fact, cl's -Ox
  option is *less* powerful than cl's -O2 option despite -Ox described
  as "Full Optimization".

This fixes PR24003.

llvm-svn: 243261
2015-07-27 07:32:11 +00:00
Richard Smith
9b88a4cdf4 [modules] Add an assert for redeclarations that we never added to their redecl
chain and fix the cases where it fires.

 * Handle the __va_list_tag as a predefined decl. Previously we failed to merge
   sometimes it because it's not visible to name lookup. (In passing, remove
   redundant __va_list_tag typedefs that we were creating for some ABIs. These
   didn't affect the mangling or representation of the type.)

 * For Decls derived from Redeclarable that are not in fact redeclarable
   (implicit params, function params, ObjC type parameters), remove them from
   the list of expected redeclarable decls.

llvm-svn: 243259
2015-07-27 05:40:23 +00:00
David Majnemer
3b1c990dcc [AST] Rename RecordLayoutBuilder to ItaniumRecordLayoutBuilder
RecordLayoutBuilder is an inaccruate name because it does not build all
records.  It only builds layouts for targets using the Itanium C++ ABI.

llvm-svn: 243225
2015-07-25 20:18:14 +00:00
Benjamin Kramer
6e4f6e1f06 [AST] Turn the callbacks of lookupInBases and forallBases into a function_ref
This lets us pass functors (and lambdas) without void * tricks. On the
downside we can't pass CXXRecordDecl's Find* members (which are now type
safe) to lookupInBases directly, but a lambda trampoline is a small
price to pay. No functionality change intended.

llvm-svn: 243217
2015-07-25 15:07:25 +00:00
Benjamin Kramer
9a9efbafa7 [Modules] Wrap the main ModuleManager visitor in a function_ref.
Avoids the awkward passing of an opaque void *UserData argument. No
functional change intended.

llvm-svn: 243213
2015-07-25 12:14:04 +00:00
Aaron Ballman
f0248a0e7d Replacing some diagnostic string literals with tablegen equivalents because the wording is identical; NFC.
llvm-svn: 243169
2015-07-24 21:49:29 +00:00
Mehdi Amini
ca3cf9e6ff LLVM API Change: the Module always owns the DataLayout
From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 243115
2015-07-24 16:04:29 +00:00
Aaron Ballman
3ba6fd294e Correcting some comments. (1) the function is named throughUsingDecl() and not throughUsingDeclaration(). (2) Testing shows that this does work for shadowed variables as well as shadowed functions. I could not find an example where this matcher was failing. NFC.
llvm-svn: 243111
2015-07-24 15:47:32 +00:00
Aaron Ballman
9177c0e47c Visual Studio is more permissive than other compilers; amends r243107 to fix a compile error.
llvm-svn: 243108
2015-07-24 12:44:02 +00:00
Aaron Ballman
41143bb573 Add an AST matcher, isFinal(), for testing whether a method or class declaration are marked final.
llvm-svn: 243107
2015-07-24 12:35:41 +00:00
David Majnemer
e2afb47d1e [clang-cl] Implement support for the /Zl flag
The flag allows users to specify that they do not want the object file
to have any implicit /defaultlib directives.

This fixes PR24236.

llvm-svn: 243097
2015-07-24 06:49:13 +00:00
Alex Denisov
b7d8563973 Cleanup ObjCInterfaceDecl lookup for ObjC literals
llvm-svn: 243092
2015-07-24 05:09:40 +00:00
Piotr Padlewski
a68a78751f Generating available_externally vtables for outline virtual functions
Generating available_externally vtables for optimizations purposes.
Unfortunatelly ItaniumABI doesn't guarantee that we will be able to
refer to virtual inline method by name.
But when we don't have any inline virtual methods, and key function is
not defined in this TU, we can generate that there will be vtable and
mark it as available_externally.

This is patch will help devirtualize better.
Differential Revision: http://reviews.llvm.org/D11441

llvm-svn: 243090
2015-07-24 04:04:49 +00:00
John McCall
1c78f085c3 Fix the equal-vector-size rule for reinterpret_casts in C++
to consider the storage size of the vector instead of its
sizeof.  In other words, ban <3 x int> to <4 x int> casts,
which produced invalid IR anyway.

Also, attempt to be a little more rigorous, or at least
explicit, about when enums are allowed in these casts.

rdar://21901132

llvm-svn: 243069
2015-07-23 23:54:07 +00:00
Alex Denisov
3cf8efd969 Add documentation for the objc_boxable attribute
llvm-svn: 243048
2015-07-23 21:53:13 +00:00
Aaron Ballman
3f07e7b063 Updating the documentation for the hasAttr AST matcher, which behaves somewhat differently when used within clang-query. Fixes PR24217.
llvm-svn: 243029
2015-07-23 17:54:59 +00:00
Asaf Badouh
f6a58b6dff [X86][AVX512F] Add FP scalar intrinsics
intrinsics for: add/sub/mul/div/min/max in their FP scalar versions

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

llvm-svn: 243009
2015-07-23 12:13:32 +00:00
Asaf Badouh
7d99966e91 [X86][AVX512BW] add madd and maddubs intrinsics
Differential Revision: http://reviews.llvm.org/D11420

llvm-svn: 242986
2015-07-23 07:07:25 +00:00
Richard Smith
787c0e42e0 ArrayRef-ize a pointer/length pair.
llvm-svn: 242977
2015-07-23 00:53:59 +00:00
David Majnemer
51fd8a020b [MS Compat] Allow _Atomic(Type) and 'struct _Atomic' to coexist
MSVC 2013 ships, as part of its STL implementation, a class named
'_Atomic'.  This is unfortunate because this keyword is in conflict with
the C11 keyword with the same name.  Our solution was to disable this
keyword when targeting MSVC 2013 and reenable it for 2015.

However, this makes it impossible for clang's headers to make use of
_Atomic.  This is problematic in the case of libc++ as it makes heavy
use of this keyword.

Let the keywordness of _Atomic float under certain circumstances:
the body of a class named _Atomic, or a class with a base specifier
named _Atomic, will not have the keyword variant of _Atomic for the
duration of the class body.  This is sufficient to allow us to correctly
handle _Atomic in the STL while permitting us to use _Atomic as a
keyword everywhere else.

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

llvm-svn: 242970
2015-07-22 23:46:18 +00:00
Hans Wennborg
4afe504980 Fix -Wextra-semi warnings.
Patch by Eugene Zelenko!

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

llvm-svn: 242931
2015-07-22 20:46:26 +00:00
Aaron Ballman
079d3e152d Something was unbalanced, and it wasn't the parentheses. ;-) Reverts r242915.
llvm-svn: 242927
2015-07-22 20:02:00 +00:00
Aaron Ballman
cd1646823b Balancing parenthesis in comments and documentation; NFC.
llvm-svn: 242915
2015-07-22 17:51:42 +00:00
Hubert Tong
27f0697308 [CONCEPTS] Add diagnostics: non-defining function; non-namespace scope
Summary:
Create diagnostic for function concept declaration which is not a
definition.

Create diagnostic for concept declaration which isn't in namespace
scope.

Create associated tests.

Reviewers: rsmith, faisalv, fraggamuffin, hubert.reinterpretcast

Subscribers: cfe-commits

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

Patch by Nathan Wilson!

llvm-svn: 242899
2015-07-22 13:32:36 +00:00
NAKAMURA Takumi
7da34f1549 StmtOpenMP.h: Fix a couple of \param(s) in r242785. [-Wdocumentation]
llvm-svn: 242898
2015-07-22 12:38:10 +00:00
Richard Smith
33e0f7ef94 [modules] Stop performing PCM lookups for all identifiers when building with C++ modules. Instead, serialize a list of interesting identifiers and mark those ones out of date on module import. Avoiding the identifier lookups here gives a 20-30% speedup in builds with large numbers of modules. No functionality change intended.
llvm-svn: 242868
2015-07-22 02:08:40 +00:00
Richard Smith
a534a31c5e [modules] In C++, stop serializing and deserializing a list of declarations in
the identifier table. This is redundant, since the TU-scope lookups are also
serialized as part of the TU DeclContext, and wasteful in a number of ways. We
still emit the decls for PCH / preamble builds, since for those we want
identical results, not merely semantically equivalent ones.

llvm-svn: 242855
2015-07-21 23:54:07 +00:00
David Blaikie
f05779e21c Pass an iterator range to EmitCallArgs
llvm-svn: 242824
2015-07-21 18:37:18 +00:00
Bob Wilson
13fd00d7c4 Update the documentation for "novtable" to match r242730.
llvm-svn: 242800
2015-07-21 16:40:03 +00:00
Asaf Badouh
ffeb624483 [X86][AVX512F] add FP arithmetic intrinsics
add/div/mul/sub include rounding versions


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

llvm-svn: 242790
2015-07-21 15:27:28 +00:00
Michael Wong
65f367fcbb Commit for http://reviews.llvm.org/D10765
for OpenMP 4 target data directive parsing and sema.
This commit is on behalf of Kelvin Li.

llvm-svn: 242785
2015-07-21 13:44:28 +00:00
Aaron Ballman
61a992439d Removing attribute documentation headings that are not required and do not add clarity; NFC.
llvm-svn: 242774
2015-07-21 12:20:53 +00:00
Bob Wilson
7c73083bd3 Ignore the "novtable" declspec when not using the Microsoft C++ ABI.
Clang used to silently ignore __declspec(novtable). It is implemented
now, but leaving the vtable uninitialized does not work when using the
Itanium ABI, where the class layout for complex class hierarchies is
stored in the vtable. It might be possible to honor the novtable
attribute in some simple cases and either report an error or ignore
it in more complex situations, but it’s not clear if that would be
worthwhile. There is also value in having a simple and predictable
behavior, so this changes clang to simply ignore novtable when not using
the Microsoft C++ ABI.

llvm-svn: 242730
2015-07-20 22:57:31 +00:00