Commit Graph

63468 Commits

Author SHA1 Message Date
George Burgess IV a17674b7cc [Docs] Fix indentation error introduced by r267447.
llvm-svn: 267501
2016-04-26 00:31:29 +00:00
Jacques Pienaar e74d91314a [lanai] Update handling of structs in arguments to be passed in registers.
Previously aggregate types were passed byval, change the ABI to pass these in registers instead.

llvm-svn: 267496
2016-04-26 00:09:29 +00:00
Nico Weber 47bf505775 driver: Add a `--rsp-quoting` flag to pick response file quoting.
Currently, clang-cl always uses Windows style for unquoting, and clang always
uses POSIX style for unquoting.

With this flag, it's possible to change these defaults.

In general, response file quoting should match the shell the response file is
used in.  On Windows, it's possible to run clang-cl in a bash shell, or clang in
cmd.exe, so a flag for overriding the default behavior is natural there.

On non-Windows, Windows quoting probably never makes sense (except maybe in
Wine), but having clang-cl behave differently based on the host OS seems
strange too.  So require that people who want to use posix-style response
files with clang-cl on non-Windows pass --rsp-quoting=posix.

http://reviews.llvm.org/D19425

llvm-svn: 267474
2016-04-25 21:15:49 +00:00
Adrian Prantl 05fefa4a85 Module Debugging: Fix the condition for determining whether a template
instantiation is in a module.

This patch fixes the condition for determining whether the debug info for a
template instantiation will exist in an imported clang module by:

- checking whether the ClassTemplateSpecializationDecl is complete and
- checking that the instantiation was in a module by looking at the first field.

I also added a negative check to make sure that a typedef to a forward-declared
template (with the definition outside of the module) is handled correctly.

http://reviews.llvm.org/D19443
rdar://problem/25553724

llvm-svn: 267464
2016-04-25 20:52:40 +00:00
Richard Smith 2414bcabd2 Implement support for conditional between xvalues of reference-compatible
types. Patch by Erik Pilkington!

llvm-svn: 267454
2016-04-25 19:30:37 +00:00
Richard Smith 2eba90e0db Refactor traversal of bases in deduction of template parameters from base
classes of an argument to use CXXRecordDecl::forallBases. Fix forallBases to
only visit each base class once.

llvm-svn: 267453
2016-04-25 19:28:08 +00:00
George Burgess IV 58ebc66e98 [Docs] Clarify what the object-size sanitizer does.
Currently, the UBSan docs make it sound like the object-size sanitizer
will only detect out-of-bounds reads/writes. It also catches some
operations that don't necessarily access memory (invalid downcasts,
calls of methods on invalid pointers, ...). This patch adds a note
about this behavior in the docs.

llvm-svn: 267447
2016-04-25 19:21:45 +00:00
Richard Smith 9b296e3fd8 When deducing template parameters from base classes of an argument type, don't
preserve any deduced types from a failed deduction to a subsequent attempt at
deduction. Patch by Erik Pilkington!

llvm-svn: 267444
2016-04-25 19:09:05 +00:00
Michael Zuckerman fa508e8b6d [Clang][Builtin][AVX512]Adding k-register logic intrinsics KAND, KANDN, KOR, KORTEST, KXNOR, KXOR, KUNPACK instruction set.
Differential Revision: http://reviews.llvm.org/D19466

llvm-svn: 267425
2016-04-25 16:42:29 +00:00
Eric Liu 4cfb88a936 Added Fixer implementation and fix() interface in clang-format for removing redundant code.
Summary:
After applying replacements, redundant code like extra commas or empty namespaces
might be introduced. Fixer can detect and remove any redundant code introduced by replacements.
The current implementation only handles redundant commas.

Reviewers: djasper, klimek

Subscribers: ioeric, mprobst, klimek, cfe-commits

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

llvm-svn: 267416
2016-04-25 15:09:22 +00:00
Michael Zuckerman edc82fe3ef [Clang][Builtin][AVX512]Adding intrinsics for vfpclass{sd|ss} vfpclass{pd|ps} instruction set
Differential Revision: http://reviews.llvm.org/D19476

llvm-svn: 267414
2016-04-25 14:48:23 +00:00
Artem Dergachev 70247e69b1 [analyzer] Let TK_PreserveContents span across the whole base region.
If an address of a field is passed through a const pointer,
the whole structure's base region should receive the
TK_PreserveContents trait and avoid invalidation.

Additionally, include a few FIXME tests shown up during testing.

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

llvm-svn: 267413
2016-04-25 14:44:25 +00:00
Michael Zuckerman fcf32c2f00 [Clang][AVX512][BUILTIN] Adding intrinsics for VSCATTERPF{1|0}{DPS|QPS|DPD|QPD} instruction set
Differential Revision: http://reviews.llvm.org/D19313

llvm-svn: 267398
2016-04-25 13:01:40 +00:00
Alexey Bataev 7292c29bb5 [OPENMP 4.5] Codegen for 'taskloop' directive.
The taskloop construct specifies that the iterations of one or more associated loops will be executed in parallel using OpenMP tasks. The iterations are distributed across tasks created by the construct and scheduled to be executed.
The next code will be generated for the taskloop directive:
    #pragma omp taskloop num_tasks(N) lastprivate(j)
        for( i=0; i<N*GRAIN*STRIDE-1; i+=STRIDE ) {
          int th = omp_get_thread_num();
          #pragma omp atomic
            counter++;
          #pragma omp atomic
            th_counter[th]++;
          j = i;
    }

Generated code:
task = __kmpc_omp_task_alloc(NULL,gtid,1,sizeof(struct
task),sizeof(struct shar),&task_entry);
psh = task->shareds;
psh->pth_counter = &th_counter;
psh->pcounter = &counter;
psh->pj = &j;
task->lb = 0;
task->ub = N*GRAIN*STRIDE-2;
task->st = STRIDE;
__kmpc_taskloop(
NULL,             // location
gtid,             // gtid
task,             // task structure
1,                // if clause value
&task->lb,        // lower bound
&task->ub,        // upper bound
STRIDE,           // loop increment
0,                // 1 if nogroup specified
2,                // schedule type: 0-none, 1-grainsize, 2-num_tasks
N,                // schedule value (ignored for type 0)
(void*)&__task_dup_entry // tasks duplication routine
);

llvm-svn: 267395
2016-04-25 12:22:29 +00:00
Michael Zuckerman 8938e836c4 [Clang][AVX512][BuiltIn] Adding support to intrinsics of VPERMD and VPERMW instruction set
Differential Revision: http://reviews.llvm.org/D19195

llvm-svn: 267380
2016-04-25 05:32:35 +00:00
Adrian Prantl 1858c664de Debug info: Apply an empty debug location for global OpenMP destructors.
LLVM really wants a debug location on every inlinable call in a function
with debug info, because it otherwise cannot set up inlining debug info.

This change applies an artificial line 0 debug location (which is how
DWARF marks automatically generated code that has no corresponding
source code) to the .__kmpc_global_dtor_. functions to avoid the
LLVM Verifier complaining.

llvm-svn: 267369
2016-04-24 22:22:29 +00:00
Martin Probst 5f8445b32a clang-format: [JS] generator and async functions.
For generators, see:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Iterators_and_generators
async functions are not quite in the spec yet, but stage 3 and already widely used:
http://tc39.github.io/ecmascript-asyncawait/

Reviewers: djasper

Subscribers: klimek

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

llvm-svn: 267368
2016-04-24 22:05:09 +00:00
Aaron Ballman 1de59c5d92 Improve diagnostic checking for va_start to also warn on other instances of undefined behavior, such as a parameter declared with the register keyword in C, or a parameter of a type that undergoes default argument promotion.
This helps cover some more of the CERT secure coding rule EXP58-CPP. Pass an object of the correct type to va_start (https://www.securecoding.cert.org/confluence/display/cplusplus/EXP58-CPP.+Pass+an+object+of+the+correct+type+to+va_start).

llvm-svn: 267338
2016-04-24 13:30:21 +00:00
Mehdi Amini 5655795bf4 Make thinlto clang test more robust against LLVM changes.
We should just test the effect of the clang level option here, i.e.
that a summary is correctly emitted with -flto=thin

From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 267321
2016-04-24 03:44:55 +00:00
Craig Topper 0da2076ba1 Fix a couple assertions that can never fire because the condition ANDed with the string is just true or 1.
llvm-svn: 267313
2016-04-24 02:08:22 +00:00
Duncan P. N. Exon Smith 0d7f43ea7c DebugInfo: DIGlobalVariables became 'distinct' in LLVM r267301
Update testcases due to DIBuilder change.

llvm-svn: 267302
2016-04-23 22:29:26 +00:00
Duncan P. N. Exon Smith 383f8413cf DebugInfo: Adapt to loss of DITypeRef in LLVM r267296
LLVM stopped using MDString-based type references, and DIBuilder no
longer fills 'retainedTypes:' with every DICompositeType that has an
'identifier:' field.   There are just minor changes to keep the same
behaviour in CFE.

Leaving 'retainedTypes:' unfilled has a dramatic impact on the output
order of the IR though.  There are a huge number of testcase changes,
which were unfortunately not really scriptable.

llvm-svn: 267297
2016-04-23 21:08:27 +00:00
Sean Silva 70e2766fb4 [profile] Fix another use of the driver.
Follow-on to r267262.

llvm-svn: 267263
2016-04-23 02:13:48 +00:00
Sean Silva 1e51ac29b1 [profile] Use cc1 in these tests instead of the driver.
I ran into this when seeing what tests would break if we make a
driver-level decision about whether FEPGO or IRPGO is the default.

llvm-svn: 267262
2016-04-23 02:11:16 +00:00
Richard Trieu 891f0f176c Revert the bool portion of r267054
Remove the floating point to bool conversion warnings.  Some of these
conversions will be caught by -Wliteral-conversion and -Wfloat-conversion

llvm-svn: 267234
2016-04-22 22:14:32 +00:00
Rong Xu f932f54254 PGO] PGOFuncName meta data if PGOFuncName is different from function's raw name
Write out the PGOFuncName meta data if PGOFuncName is different from function's
raw name. This should only apply to internal linkage functions. This is to be
consumed by indirect-call promotion when called in LTO optimization pass.

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

llvm-svn: 267224
2016-04-22 21:19:05 +00:00
Reid Kleckner ea53dba78b Fix a bug involving deferred decl emission and PCH
For various reasons, involving dllexport and class linkage compuations,
we have to wait until after the semicolon after a class declaration to
emit inline methods. These are "deferred" decls. Before this change,
finishing the tag decl would trigger us to deserialize some PCH so that
we could make a "pretty" IR-level type. Deserializing the PCH triggered
calls to HandleTopLevelDecl, which, when done, checked the deferred decl
list, and emitted some dllexported decls that weren't ready.

Avoid this re-entrancy. Deferred decls should not get emitted when a tag
is finished, they should only be emitted after a real top level decl in
the main file.

llvm-svn: 267186
2016-04-22 18:46:33 +00:00
Krzysztof Parzyszek 4dde0e352a [Hexagon] Add definitions for circular and bit-reverse loads/stores
llvm-svn: 267159
2016-04-22 14:58:46 +00:00
Michael Zuckerman 743d68c3cb [clang][AVX512][Builtin] adding intrinsics for vf{n}madd{ss|sd} and vf{n}sub{ss|sd} instruction set
Differential Revision: http://reviews.llvm.org/D19320

llvm-svn: 267135
2016-04-22 10:56:24 +00:00
Michael Zuckerman a1ceca20b6 [Clang][AVX512][BUILTIN] Adding scalar intrinsics for rsqrt14 ,rcp14, getexp and getmant instruction set
Differential Revision: http://reviews.llvm.org/D19326

llvm-svn: 267129
2016-04-22 10:06:10 +00:00
Alexey Bataev feddd64bff [OPENMP] Fix for PR27463: Privatizing struct fields with array type
causes code generation failure.

The codegen part of firstprivate clause for member decls used type of
original variable without skipping reference type from
OMPCapturedExprDecl. Patch fixes this problem.

llvm-svn: 267125
2016-04-22 09:05:03 +00:00
Argyrios Kyrtzidis 0642a21f1d [index] Add SymbolSubKinds for ObjC IB annotations.
llvm-svn: 267118
2016-04-22 07:21:16 +00:00
Argyrios Kyrtzidis f30c8c621f [index] Add a SymbolSubKind for an ObjC unit test.
llvm-svn: 267117
2016-04-22 07:21:10 +00:00
Argyrios Kyrtzidis f2142cbca8 [index] Change SymbolCXXTemplateKind to a 'SymbolSubKinds' bitset.
This provides a more general and flexible way to annotate special symbols.

llvm-svn: 267116
2016-04-22 07:21:04 +00:00
Alexey Bataev 5dff95c04d [OPENMP] Fix for LCV in simd directives in explicit clauses.
If loop control variable for simd-based directives is explicitly marked
as linear/lastprivate in clauses, codegen for such construct would
crash. Patch fixes this problem.

llvm-svn: 267101
2016-04-22 03:56:56 +00:00
Nico Weber 379609329d Try to get test passing on OS X (see comment at top of file).
llvm-svn: 267089
2016-04-22 00:38:09 +00:00
Artem Belevich c34a519407 [CUDA] removed unneeded __nvvm_reflect_anchor()
Since r265060 LLVM infers correct __nvvm_reflect attributes, so
explicit declaration of __nvvm_reflect() is no longer needed.

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

llvm-svn: 267062
2016-04-21 21:40:27 +00:00
Derek Bruening 256c2e14c7 [esan] EfficiencySanitizer driver flags
Summary:
Adds a framework to enable the instrumentation pass for the new
EfficiencySanitizer ("esan") family of tools.  Adds a flag for esan's
cache fragmentation tool via -fsanitize=efficiency-cache-frag.
Adds appropriate tests for the new flag.

Reviewers: eugenis, vitalybuka, aizatsky, filcab

Subscribers: filcab, kubabrecka, llvm-commits, zhaoqin, kcc

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

llvm-svn: 267059
2016-04-21 21:32:04 +00:00
Richard Trieu be234c30ad Split interesting warnings off from -Wfloat-conversion
Restructure the implict floating point to integer conversions so that
interesting sub-groups are under different flags.  Breakdown of warnings:

No warning:
Exact conversions from floating point to integer:
int x = 10.0;
int x = 1e10;

-Wliteral-conversion - Floating point literal to integer with rounding:
int x = 5.5;
int x = -3.4;

-Wfloat-conversion - All conversions not covered by the above two:
int x = GetFloat();
int x = 5.5 + 3.5;

-Wfloat-zero-conversion - The expression converted has a non-zero floating
point value that gets converted to a zero integer value, excluded the cases
falling under -Wliteral-conversion.  Subset of -Wfloat-conversion.
int x = 1.0 / 2.0;

-Wfloat-overflow-conversion - The floating point value is outside the range
of the integer type, exluding cases from -Wliteral conversion.  Subset of
-Wfloat-conversion.
char x = 500;
char x = -1000;

-Wfloat-bool-conversion - Any conversion of a floating point type to bool.
Subset of -Wfloat-conversion.
if (GetFloat()) {}
bool x = 5.0;

-Wfloat-bool-constant-conversion - Conversion of a compile time evaluatable
floating point value to bool.  Subset of -Wfloat-bool-conversion.
bool x = 1.0;
bool x = 4.0 / 20.0;

Also add EvaluateAsFloat to Sema, which is similar to EvaluateAsInt, but for
floating point values.

llvm-svn: 267054
2016-04-21 21:04:55 +00:00
Nico Weber ad2d8f3dfd clang-cl: Don't assert on using /Yc with non-source files, PR27450
Move phase handling after input type validation.

llvm-svn: 267040
2016-04-21 19:59:10 +00:00
Renato Golin 1f04213e98 [x86] Force mixes asm syntax test to check for x86
llvm-svn: 266993
2016-04-21 14:40:06 +00:00
Krzysztof Parzyszek a58ff5117a [Hexagon] Define architecture version macros for hexagonv55
llvm-svn: 266989
2016-04-21 14:30:04 +00:00
Aaron Ballman 1978f7fe29 Clarify memory ownership semantics; NFC.
Patch by Clement Courbet

llvm-svn: 266986
2016-04-21 13:51:07 +00:00
Michael Zuckerman 4fa96af4db [Clang][AVX512][BuiltIn] Adding intrinsics of VGATHER{DPS|DPD} , VPGATHER{QD|QQ|DD|DQ} and VGATHERPF{0|1}{DPS|QPS|DPD|QPD} instruction set .
Differential Revision: http://reviews.llvm.org/D19224

llvm-svn: 266983
2016-04-21 12:47:27 +00:00
Denis Zobnin 628b022a0e Correctly parse GCC-style asm line following MS-style asm line.
Quit parsing MS-style inline assembly if the following statement has GCC style.
Enables compilation of code like

void f() {
  __asm mov ebx, ecx
  __asm__("movl %ecx, %edx");
}

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

llvm-svn: 266976
2016-04-21 10:59:18 +00:00
Benjamin Kramer 023ef1bd13 Back out the test case for r266973 for now.
It breaks on windows, need to investigate. It's not testing the
important part of that change anyways.

llvm-svn: 266975
2016-04-21 10:46:14 +00:00
Benjamin Kramer b5737c1491 [Tooling] Inject -resource-dir instead of overwriting argv[0].
This allows using a different standard library (the one from argv[0] in
the compilation database) with the correct builtins.

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

llvm-svn: 266973
2016-04-21 10:18:18 +00:00
Andrey Turetskiy 6a8b91df64 Compilation for Intel MCU (Part 1/3)
Add -miamcu option which:
  * Sets IAMCU triple
  * Sets IAMCU ABI
  * Enforces static compilation

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

llvm-svn: 266972
2016-04-21 10:16:48 +00:00
Richard Smith e0fa4c83b2 [modules] Make the tweak to avoid circular inclusion of emmintrin.h and
xmmintrin.h a bit more directed. If for whatever reason modules are enabled but
we textually include one of these headers, don't deploy the special case for
modules. To make this work cleanly, extend __building_module to be defined
even when modules is disabled.

llvm-svn: 266945
2016-04-21 01:46:37 +00:00
Bob Wilson 410ae489b4 Remove the (ignored) -Wreceived-is-weak diagnostic.
We kept this around for a while since Xcode 6 and earlier had a build
setting for this warning. It was removed in Xcode 7 so there should be
no need for this warning now.

llvm-svn: 266938
2016-04-21 00:11:24 +00:00
Adrian Prantl 50fd1a87c4 Module Debugging: Emit the canonical debug info for Objective-C classes
in the compile unit that contains their implementation even if their
interface is declared in a module.

The private @implementation of an @interface may have additional
hidden ivars so we should not defer to the public version of the
type that is found in the module.

<rdar://problem/25541798>

llvm-svn: 266937
2016-04-20 23:59:32 +00:00
Chaoren Lin e6f04f3553 [Tooling] Fix getting fully qualified names of template alias types.
Reviewers: rsmith, rnk

Subscribers: cfe-commits, klimek

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

llvm-svn: 266925
2016-04-20 22:12:07 +00:00
Adrian McCarthy 02d0a635d6 Add warning about CR+LF line endings on Windows.
s/checkout/check out/ when used as a verb.

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

llvm-svn: 266887
2016-04-20 16:43:34 +00:00
Alexey Bataev 48591dd98c [OPENMP] Codegen for untied tasks.
If the untied clause is present on a task construct, any thread in the
team can resume the task region after a suspension. Patch adds proper
codegen for untied tasks.

llvm-svn: 266853
2016-04-20 04:01:36 +00:00
Teresa Johnson b10474903c Enable ODR uniquing of DITypes for ThinLTO backends
Summary:
This is a follow-on to apply Duncan's new DIType ODR uniquing from
r266549 and r266713 in more places.

When invoking ThinLTO backend compiles via clang (for a distributed
build), invoke enableDebugTypeODRUniquing() before parsing the module.

Reviewers: dexonsmith, joker.eph

Subscribers: llvm-commits, joker.eph

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

llvm-svn: 266852
2016-04-20 02:23:52 +00:00
Mandeep Singh Grang d9d3b21c32 [Clang] Remove unwanted --check-prefix=CHECK from unit tests. NFC.
Summary:
    Removed unwanted --check-prefix=CHECK from the following unit tests:
      test/CXX/special/class.copy/implicit-move-def.cpp
      test/CodeGen/cleanup-destslot-simple.c
      test/CodeGen/inline-asm-immediate-ubsan.c
      test/CodeGen/mips-interrupt-attr.c
      test/CodeGenCXX/cfi-stats.cpp
      test/CodeGenCXX/copy-constructor-elim.cpp
      test/CodeGenCXX/microsoft-templ-uuidof.cpp
      test/CodeGenCXX/vtable-linkage.cpp
      test/CodeGenObjC/messages-2.m
      test/Driver/noinline.c
      test/Index/remap-load.c
      test/Index/retain-comments-from-system-headers.c
      test/OpenMP/task_if_codegen.cpp
      test/Preprocessor/comment_save_macro.c

Patch by:  Mandeep Singh Grang (mgrang)

Reviewers: rafael, ABataev, rengolin

Projects: #clang-c

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

llvm-svn: 266843
2016-04-20 01:02:18 +00:00
Stephen Hines a978a076a9 MarkEOLs should only be true for clang-cl.exe.
Summary:
https://llvm.org/bugs/show_bug.cgi?id=27396

This fixes an issue in response files where "\r\n" was being interpreted
as two EOL markers (i.e. we consumed the '\r' as terminating the
previous token, and then parsed the '\n' as a significant EOL). This
breaks response files where joined arguments get split across multiple
lines (like "-x\r\nc"). I also fixed an accidental issue in the
response-file.c test, where the response file is appended to, instead of
being overwritten.

Reviewers: rnk

Subscribers: danalbert, llvm-commits

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

llvm-svn: 266840
2016-04-20 00:33:06 +00:00
Adam Nemet b4b6a94dd7 [Parse] Reuse OptionUnroll rather than matching it again. NFC
llvm-svn: 266829
2016-04-19 22:29:24 +00:00
Adam Nemet 50de4e8346 [Parse] Use StringSwitch to improve readability. NFC
A subsequent patch will propose a "distribute" loop hint.  Similarly to
unroll, this does not have a "assume_safety" argument either so this
condition will get more complex.

llvm-svn: 266827
2016-04-19 22:17:45 +00:00
Marcin Koscielnicki 4005070e1b [AArch64] Fix D19098 fallout.
The intrinsic is now called llvm.thread.pointer, not
llvm.aarch64.thread.pointer.  Also, the code handling it in CGBuiltin.cpp
is dead - it's already covered by GCCBuiltin.  Remove it.

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

llvm-svn: 266817
2016-04-19 20:51:00 +00:00
Adrian Prantl ae39ccc49f cc1as: Don't crash when CIE is requested and no DWARF version is specified.
This patch changes the default DWARF version for cc1as from invalid 0 to 2,
which should be the lowest common denominator on all platforms.

rdar://problem/24735813

llvm-svn: 266814
2016-04-19 20:31:19 +00:00
Ahmed Bougacha 1d9de10130 [ARM NEON] Define vfms_f32 on ARM, and all vfms using vfma.
r259537 added vfma/vfms to armv7, but the builtin was only lowered
on the AArch64 side. Instead of supporting it on ARM, get rid of it.

The vfms builtin lowered to:
  %nb = fsub float -0.0, %b
  %r = @llvm.fma.f32(%a, %nb, %c)

Instead, define the operation in terms of vfma, and swap the
multiplicands. It now lowers to:
  %na = fsub float -0.0, %a
  %r = @llvm.fma.f32(%na, %b, %c)

This matches the instruction more closely, and lets current LLVM
generate the "natural" operand ordering:
  fmls.2s v0, v1, v2
instead of the crooked (but equivalent):
  fmls.2s v0, v2, v1
Except for theses changes, assembly is identical.

LLVM accepts both commutations, and the LLVM tests in:
  test/CodeGen/AArch64/arm64-fmadd.ll
  test/CodeGen/AArch64/fp-dp3.ll
  test/CodeGen/AArch64/neon-fma.ll
  test/CodeGen/ARM/fusedMAC.ll
already check either the new one only, or both.

Also verified against the test-suite unittests.

llvm-svn: 266807
2016-04-19 19:44:45 +00:00
Eric Liu 89be047201 Fixed a bug in AnnotatedLine::startsWith when there are comments in the line.
Summary: When there are comments in the line, one token may be checked multiple times.

Reviewers: mprobst, djasper

Subscribers: ioeric, cfe-commits, klimek

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

llvm-svn: 266803
2016-04-19 19:25:33 +00:00
Manman Ren 01b705e9c0 ObjC Class Property: don't emit class properties on old deployment targets.
For old deployment targets, emit nil for all class property lists.

rdar://25616128

llvm-svn: 266800
2016-04-19 19:05:03 +00:00
Douglas Katzman 3103f25320 Fix PR26999 better- RenderDebugEnablingArgs() once only
llvm-svn: 266797
2016-04-19 18:55:53 +00:00
Justin Lebar b34d7bc9a1 [CUDA] Add a test for r266496 (raise an error if a CUDA installation isn't found)
llvm-svn: 266796
2016-04-19 18:52:28 +00:00
Martin Probst 533965c195 reuse mustBeJSIdent for interface detection
llvm-svn: 266790
2016-04-19 18:19:06 +00:00
Martin Probst 1e8261ea04 clang-format: [JS] support `interface` as a free standing identifier.
Summary:
`interface` can be used as a fee standing identifier in JavaScript/TypeScript.
This change uses the heuristic of whether it's followed by another identifier
as an indication.

Reviewers: djasper

Subscribers: klimek, cfe-commits

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

llvm-svn: 266789
2016-04-19 18:18:59 +00:00
Sanjay Patel 461f2ff445 [builtin_expect] tighten checks, add test, add comments
llvm-svn: 266788
2016-04-19 18:17:34 +00:00
Sanjay Patel 3fd323fa36 reduce indentation; NFCI
llvm-svn: 266787
2016-04-19 18:06:33 +00:00
Ahmed Bougacha 40a34c2e2a [CodeGen] Widen non-power-of-2 vector HFA base types.
Currently, for the ppc64--gnu and aarch64 ABIs, we recognize:
  typedef __attribute__((__ext_vector_type__(3))) float v3f32;
  typedef __attribute__((__ext_vector_type__(16))) char v16i8;
  struct HFA {
    v3f32 a;
    v16i8 b;
  };

as an HFA. Since the first type encountered is used as the base type,
we pass the HFA as:
    [2 x <3 x float>]
Which leads to incorrect IR (relying on padding values) when the
second field is used.

Instead, explicitly widen the vector (after size rounding) in
isHomogeneousAggregate.

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

llvm-svn: 266784
2016-04-19 17:54:29 +00:00
Ahmed Bougacha 8862cae75b [CodeGen] Fix whitespace. NFC.
llvm-svn: 266783
2016-04-19 17:54:24 +00:00
Douglas Katzman 5a9a685405 Pass dwarf-version to cc1as.
Fix PR26999 - crashing in cc1as with any '*bsd' target.

llvm-svn: 266775
2016-04-19 17:43:54 +00:00
Sanjay Patel 341890ad70 reduce indentation; NFCI
llvm-svn: 266765
2016-04-19 17:13:14 +00:00
Michael Zuckerman 6fa512cecf [Clang][Builtin][AVX512] Adding intrinsics for VGETMANT{PD|PS} and VGETEXP{PD|PS} instruction set
Differential Revision: http://reviews.llvm.org/D19197

llvm-svn: 266763
2016-04-19 17:10:29 +00:00
Alexey Bataev 995e861ba6 Revert "[OPENMP] Codegen for untied tasks."
This reverts commit r266754.

llvm-svn: 266755
2016-04-19 16:36:01 +00:00
Alexey Bataev 823acfacdf [OPENMP] Codegen for untied tasks.
If the untied clause is present on a task construct, any thread in the
team can resume the task region after a suspension. Patch adds proper
codegen for untied tasks.

llvm-svn: 266754
2016-04-19 16:27:55 +00:00
Andrey Turetskiy f7d9b26384 Revert r266747 (Compilation for Intel MCU (Part 1/3)) since it breaks a few buildbots.
llvm-svn: 266753
2016-04-19 16:25:30 +00:00
Samuel Benzaquen d6b44aad31 [ASTMatchers] Do not try to memoize nodes we can't compare.
Summary:
Prevent hasAncestor from comparing nodes that are not supported.
hasDescendant was fixed some time ago to avoid this problem.
I'm applying the same fix to hasAncestor: if any object in the Builder map is
not comparable, skip the cache.

Reviewers: alexfh

Subscribers: klimek, cfe-commits

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

llvm-svn: 266748
2016-04-19 15:52:56 +00:00
Andrey Turetskiy bbfd556640 Compilation for Intel MCU (Part 1/3)
Add -miamcu option which:
  * Sets IAMCU triple
  * Sets IAMCU ABI
  * Enforces static compilation

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

llvm-svn: 266747
2016-04-19 15:50:57 +00:00
Michael Zuckerman ef2979af50 [Clang][AVX512][BUILTIN] Adding intrinsics support to VEXTRACT{I|F} and VINSERT{I|F} instruction set
Differential Revision: http://reviews.llvm.org/D19097

llvm-svn: 266745
2016-04-19 15:18:23 +00:00
Martin Probst 805c6167c2 Summary:
clang-format: [JS] unit tests for type aliases.

Also adds a test for "foo as bar" casts.

Spec:
https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#3.10

These are already handled correctly.

Reviewers: djasper

Subscribers: cfe-commits, klimek

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

llvm-svn: 266744
2016-04-19 14:59:16 +00:00
Martin Probst 053f1aa6d0 clang-format: [JS] simplify import/export.
Summary:
Change `import` and `export` parsing to special case the renaming
syntax (`import x, {y as bar} ...`, `export {x}`) and otherwise just
parse a regular structural element.

This simplifies the code a bit and should be more correct - it's easier
to recognise the specific import syntax than to recognise arbitrary
expressions and declarations.

Reviewers: djasper

Subscribers: cfe-commits, klimek

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

llvm-svn: 266743
2016-04-19 14:55:37 +00:00
Laszlo Nagy 8bd63e5518 D17487: [analyzer][scan-build-py] flag filter modification for compilation database creation
llvm-svn: 266726
2016-04-19 12:03:03 +00:00
Alexey Bataev bec9572213 Revert "[OPENMP] Codegen for untied tasks."
This reverts commit 266722.

llvm-svn: 266724
2016-04-19 09:27:38 +00:00
Alexey Bataev 26b2577f6b [OPENMP] Codegen for untied tasks.
If the untied clause is present on a task construct, any thread in the team can resume the task region after a suspension. Patch adds proper codegen for untied tasks.

llvm-svn: 266722
2016-04-19 09:10:27 +00:00
Serge Pavlov 7dcc97e7ac Warn if function or variable cannot be implicitly instantiated
With this patch compiler emits warning if it tries to make implicit instantiation
of a template but cannot find the template definition. The warning can be suppressed
by explicit instantiation declaration or by command line options
-Wundefined-var-template and -Wundefined-func-template. The implementation follows
the discussion of http://reviews.llvm.org/D12326.

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

llvm-svn: 266719
2016-04-19 06:19:52 +00:00
Justin Lebar b41f33cf02 [CUDA] Add --no-cuda-noopt-debug, which disables --cuda-noopt-debug.
Reviewers: tra

Subscribers: cfe-commits, jhen

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

llvm-svn: 266708
2016-04-19 02:27:11 +00:00
Justin Lebar dc3c50434e [CUDA] Add --cuda-compile-host-device, which overrides --cuda-host-only and --cuda-device-only.
Summary:
This completes the flag's tristate, letting you override it at will on
the command line.

Reviewers: tra

Subscribers: cfe-commits, jhen

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

llvm-svn: 266707
2016-04-19 02:27:07 +00:00
Akira Hatanaka d66dc19251 Add a test case to check a member's default constructor is also run.
This is a follow-up to r266645.

llvm-svn: 266706
2016-04-19 02:21:47 +00:00
Adrian Prantl 2526fca8d8 [ObjC++] Fix crash when emitting debug info for a block member capturing this.
rdar://problem/23871824

llvm-svn: 266698
2016-04-18 23:48:16 +00:00
Richard Smith cceb468f36 Mark -Xclang as being a compilation-only option so that the clang driver
doesn't warn if it's passed to a link action. This matches the behavior for
most other compilation-only options (including things like -f flags), and is
necessary to suppress warnings on systems like cmake that always pass all
compile flags to the linker.

llvm-svn: 266695
2016-04-18 23:12:59 +00:00
Richard Smith e64e7459aa [modules] Remove some more unnecessary forwarding functions.
llvm-svn: 266687
2016-04-18 21:54:58 +00:00
Kostya Serebryany f5b25f83e3 [sanitizer-coverage] make sure coverage flags are not passed to clang if the driver thinks they are unused
llvm-svn: 266673
2016-04-18 21:30:17 +00:00
Kostya Serebryany 6453786b26 [sanitizer-coverage] better docs for -fsanitize-coverage=trace-bb
llvm-svn: 266672
2016-04-18 21:28:37 +00:00
Krzysztof Parzyszek e2bd2dcc9d [Hexagon] V60/HVX builtin definitions for clang
The builtins already exist in LLVM, but are not exposed to the C/C++
programmers. This patch adds all the information about the builtins
needed for clang, as well as a test for all available intrinsics.

llvm-svn: 266671
2016-04-18 21:27:59 +00:00
Manman Ren 99d133482f Block: Fix a crash when we have type attributes or qualifiers with omitted
return type.

Emit a warning instead of crashing in IR generation.

rdar://22762981

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

llvm-svn: 266648
2016-04-18 18:40:51 +00:00
Krzysztof Parzyszek 7f0756cc1f [Hexagon] Define macros __HVX__ and __HVXDBL__ when appropriate
llvm-svn: 266647
2016-04-18 18:38:11 +00:00
Akira Hatanaka bd59b4894e [Parser][ObjC] Make sure c++11 in-class initialization is done when the
constructor's definition is in an implementation block.

Without this commit, ptr doesn't get initialized to null in the
following code:

struct S {
  S();
  void *ptr = nullptr;
};

@implementation I
  S::S() {}
@end

rdar://problem/25693624

llvm-svn: 266645
2016-04-18 18:19:45 +00:00
Aaron Ballman 05164816f0 Clarifying the wording of this diagnostic; it confused parameter and argument.
llvm-svn: 266644
2016-04-18 18:10:53 +00:00
JF Bastien dda2cb17a3 NFC: unify clang / LLVM atomic ordering
This makes the C11 / C++11 *ABI* atomic ordering accessible from LLVM,
as discussed in http://reviews.llvm.org/D18200#inline-151433

This re-applies r266574 which I had reverted in r266575.

Depends on http://reviews.llvm.org/D18875

Original review: http://reviews.llvm.org/D18876

llvm-svn: 266641
2016-04-18 18:01:49 +00:00
Xinliang David Li 90364ca1a7 Update InstrProf pass creator API reference
llvm-svn: 266638
2016-04-18 17:48:12 +00:00
Weiming Zhao b061313c5e [ARM] predefines __ELF__ macro for arm-none-eabi
Summary: predefines __ELF__ macro for arm-none-eabi

Reviewers: silviu.baranga, rengolin

Subscribers: aemerson, rengolin, cfe-commits

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

llvm-svn: 266625
2016-04-18 16:25:46 +00:00
Daniel Jasper c3ff0cd8a2 clang-format: Improve heuristics to detect function declarations/definitions.
Specifically understand ellipses in parameter lists and treat trailing
reference qualifiers and the "{" as signals.

llvm-svn: 266599
2016-04-18 11:31:21 +00:00
Mehdi Amini 7322b8bcc0 Add missing include for StringRef (NFC)
From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 266594
2016-04-18 09:08:59 +00:00
JF Bastien a76c91fbf6 Revert "NFC: unify clang / LLVM atomic ordering"
This reverts commit b0495df9eae2824bee830cc4c94f5441f0d4cbc9.

Same as for the corresponding LLVM revert, an assert seems to fire.

llvm-svn: 266575
2016-04-17 21:28:50 +00:00
JF Bastien 0601a77cf0 NFC: unify clang / LLVM atomic ordering
Summary:
Depends on http://reviews.llvm.org/D18875

This makes the C11 / C++11 *ABI* atomic ordering accessible from LLVM, as discussed in http://reviews.llvm.org/D18200#inline-151433

Reviewers: jyknight, reames

Subscribers: cfe-commits

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

llvm-svn: 266574
2016-04-17 21:01:09 +00:00
Faisal Vali 5e9e8ac432 Implement CWG 941 - explicit specializations of deleted function templates
template<class T> void f(T) = delete;
  template<> void f(int); // OK.

  f(3); // OK

Implementation strategy:

When an explicit specialization of a function template, a member function template or a member function of a class template is declared, clang first implicitly instantiates the declaration of a specialization from the templated-entity being explicitly specialized (since their signatures must be the same) and then links the explicit specialization being declared as a redeclaration of the aforementioned specialization.  

The problem was that when clang 'implicitly instantiates' the initial specialization, it marks the corresponding FunctionDecl as deleted if the corresponding templated-entity was deleted, rather than waiting to see whether the explicit specialization being declared provides a non-deleted body. (The eager marking of delete has advantages during overload resolution I suppose, where we don't have to try and instantiate a definition of the function to see if it is deleted). 

The present fix entails recognizing that when clang knows that an explicit specialization is being declared (for whichever templated-entity), the prior implicit instantiation should not inherit the 'deleted' status, and so we reset it to false.

I suppose an alternative fix (amongst others) could consider creating a new context (ExplicitSpecializationDeclarationSubstitution or some such) that is checked during template-argument-deduction and final substitution, and avoid inheriting the deleted status during declaration substitution.  But while conceptually cleaner, that would be a slightly more involved change (as could be some of the other alternatives: such as avoid tagging implicit specializations as deleted, and check their primary templates for the deleted status where needed), and so I chose a different path.  Hopefully it'll prove to not be a bad choice.

llvm-svn: 266561
2016-04-17 17:32:04 +00:00
Duncan P. N. Exon Smith f9521b0bb7 DebugInfo: Make DICompositeTypes distinct most of the time
Since elements of most kinds of DICompositeType have back references,
most are involved in uniquing cycles.  Except via the ODR 'identifier:'
field, which doesn't care about the storage type (see r266549),
they have no hope of being uniqued.

Distinct nodes are far more efficient, so use them for most kinds of
DICompositeType definitions (i.e., when DIType::isForwardDecl is false).
The exceptions:

  - DW_TAG_array_type, since their elements never have back-references
    and they never have ODR 'identifier:' fields;

  - DW_TAG_enumeration_type when there is no ODR 'identifier:' field,
    since their elements usually don't have back-references.

This breaks the last major uniquing cycle I'm aware of in the debug info
graph.  The impact won't be enormous for C++ because references to
ODR-uniqued nodes still use string-based DITypeRefs; but this should
prevent a regression in C++ when we drop the string-based references.

This wouldn't have been reasonable until r266549, when composite types
stopped relying on being uniqued by structural equivalence to prevent
blow-ups at LTO time.

llvm-svn: 266556
2016-04-17 07:45:08 +00:00
Mehdi Amini 357deca829 Add missing headers (fix build after headers cleanup in LLVM)
From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 266525
2016-04-16 08:14:10 +00:00
Alex Denisov d82f494aa4 Replace hardcoded comment at 'lit.site.cfg.in'
At the moment almost every lit.site.cfg.in contains two lines comment:

  ## Autogenerated by LLVM/Clang configuration.
  # Do not edit!

The patch adds variable LIT_SITE_CFG_IN_HEADER, that is replaced from
configure_lit_site_cfg with the note and some useful information.

llvm-svn: 266516
2016-04-16 06:54:46 +00:00
Richard Smith 20d4701b3d [modules] Don't expose *intrin.h headers that cannot be included standalone as
separate modules. These cause build breakage with -fmodules-local-submodule-visibility.

llvm-svn: 266501
2016-04-16 00:46:26 +00:00
Justin Lebar 423019d059 [CUDA] Raise an error if the CUDA install can't be found.
Summary:
Without this change, we silently proceed on without including
__clang_cuda_runtime_wrapper.h.  This leads to very strange behavior --
you say you're compiling CUDA code, but e.g. __device__ is not defined!

Reviewers: tra

Subscribers: cfe-commits

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

llvm-svn: 266496
2016-04-16 00:11:11 +00:00
Richard Smith 4d247e7012 Improve diagnostic for the case when a non-defined function-like macro is used
in a preprocessor constant expression.

llvm-svn: 266495
2016-04-16 00:07:09 +00:00
Nemanja Ivanovic d7d45bf8ce Revert 266186 as it breaks anything that includes type_traits on some platforms
Since this patch provided support for the __float128 type but disabled it
on all platforms by default, some platforms can't compile type_traits with
-std=gnu++11 since there is a specialization with __float128.
This reverts the patch until D19125 is approved (i.e. we know which platforms
need this support enabled).

llvm-svn: 266460
2016-04-15 18:04:13 +00:00
Adrian Prantl 19124d3d7e Fix testcase for MSVC targets where the output ordering is different.
llvm-svn: 266449
2016-04-15 16:21:23 +00:00
Adrian Prantl 80578e7ef0 Update testcase to new debug info metadata format.
llvm-svn: 266447
2016-04-15 16:05:13 +00:00
Adrian Prantl e76bda544b Update to match LLVM changes for PR27284.
(Reverse the ownership between DICompileUnit and DISubprogram.)

http://reviews.llvm.org/D19034
<rdar://problem/25256815>

llvm-svn: 266445
2016-04-15 15:55:45 +00:00
NAKAMURA Takumi 9585fc13f1 ASTMatchers.h: Fix formatting. [-Wdocumentation]
llvm-svn: 266444
2016-04-15 15:42:27 +00:00
Nico Weber 917fc9d7cb Revert r266415, it broke parsing SDK headers (PR27367).
llvm-svn: 266431
2016-04-15 14:35:06 +00:00
Alexey Bader 13465da496 Remove include duplicate. NFC.
llvm-svn: 266428
2016-04-15 13:23:26 +00:00
Andrey Bokhanko f7fa634887 [MSVC Compat] Implementation of __unaligned (MS extension) as a type qualifier
This patch implements __unaligned as a type qualifier; before that, it was
modeled as an attribute. Proper mangling of __unaligned is implemented as well.
Some OpenCL code/tests are tangenially affected, as they relied on existing
number and sizes of type qualifiers.

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

llvm-svn: 266415
2016-04-15 08:03:51 +00:00
Hans Wennborg 12f4f8be90 clang-cl: Don't check for existence of linker inputs when /link is used
There might be flags passed to the linker (e.g. /libpath), causing it
to search in paths the Clang driver doesn't know about.

PR27234

llvm-svn: 266402
2016-04-15 01:12:32 +00:00
Hans Wennborg 84ff1d37fc clang-cl: Make /link accept an optional joined argument.
For example, "cl.exe a.c /linkfoo bar" is a valid invocation and
forwards "foo" and "bar" to link.exe. This makes clang-cl handle
that kind of invocation.

Depends on LLVM r266394.

llvm-svn: 266395
2016-04-15 00:24:15 +00:00
Charles Li 1a88adbb27 Lit C++11 Compatibility Patch #8
24 tests have been updated for C++11 compatibility.

llvm-svn: 266387
2016-04-14 23:47:07 +00:00
Matt Arsenault 1dd2752e7a AMDGPU: Add test for generic builtin behavior
llvm-svn: 266383
2016-04-14 22:34:39 +00:00
Reid Kleckner e1a16467a3 In vector comparisons, handle scalar LHS just as we handle scalar RHS
Summary: Fixes PR27258

Reviewers: rsmith

Subscribers: cfe-commits

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

llvm-svn: 266366
2016-04-14 21:03:38 +00:00
Richard Smith f32cc293fa Make this code less brittle. The benefits of a fixed-size array aren't worth the maintenance cost.
llvm-svn: 266359
2016-04-14 19:45:19 +00:00
Richard Smith 9c4fb0a833 Fix off-by-one error in worst-case number of offsets needed for an AST record.
llvm-svn: 266353
2016-04-14 18:32:54 +00:00
Aaron Ballman 66eb58a756 Add typedefNameDecl() and typeAliasDecl() to the AST matchers; improves hasType() to match on TypedefNameDecl nodes.
Patch by Clement Courbet.

llvm-svn: 266331
2016-04-14 16:05:45 +00:00
Ismail Donmez f677cd539f Fix testcase for the LLVM_LIBDIR_SUFFIX=64 case. Fallout from r266108.
llvm-svn: 266324
2016-04-14 15:32:24 +00:00
Marianne Mailhot-Sarrasin 03137c6538 clang-format: Last line in incomplete block is indented incorrectly
Indentation of the last line was reset to the initial indentation of the block when reaching EOF.

Patch by Maxime Beaulieu

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

llvm-svn: 266321
2016-04-14 14:56:49 +00:00
Marianne Mailhot-Sarrasin 51fe279fbb clang-format: Implemented tab usage for continuation and indentation
Use tabs to fill whitespace at the start of a line.

Patch by Maxime Beaulieu

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

llvm-svn: 266320
2016-04-14 14:52:26 +00:00
Marianne Mailhot-Sarrasin 4988fa1bc5 clang-format: Allow include of clangFormat.h in managed context
Including VirtualFileSystem.h in the clangFormat.h indirectly includes <atomic>.
This header is blocked when compiling with /clr.

Patch by Maxime Beaulieu

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

llvm-svn: 266319
2016-04-14 14:47:37 +00:00
Gabor Horvath 217a98c0d1 [analyzer] Make it possible to query the function name from a CallDescription.
llvm-svn: 266293
2016-04-14 11:56:28 +00:00
Artem Dergachev 4e7c6fdeeb [ASTImporter] Implement some expression-related AST node import.
Introduce ASTImporter unit test framework.

Fix a memory leak introduced in cf8ccff5: an array is allocated
in ImportArray and never freed.

Support new node kinds:

- GCCAsmStmt

- AddrLabelExpr
- AtomicExpr
- CompoundLiteralExpr
- CXXBoolLiteralExpr
- CXXNullPtrLiteralExpr
- CXXThisExpr
- DesignatedInitExpr
- GNUNullExpr
- ImplicitValueInitExpr
- InitListExpr
- OpaqueValueExpr
- PredefinedExpr
- ParenListExpr
- StmtExpr
- VAArgExpr

- BinaryConditionalOperator
- ConditionalOperator

- FloatingLiteral
- StringLiteral

- InjectedClassNameType
- TemplateTypeParmType

- LabelDecl

Patch by Aleksei Sidorin!

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

llvm-svn: 266292
2016-04-14 11:51:27 +00:00
Nico Weber 51f9eaa5e2 Reapply r258505 after r266254, this time with a comment to make it more sticky.
llvm-svn: 266290
2016-04-14 11:12:32 +00:00
Dmitry Polukhin 9d64f72640 [MSVC] Fix check for wchar_t type in case of -fno-wchar
The example below should work identically with and without compiler native
wchar_t support.

void foo(wchar_t * t = L"");

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

llvm-svn: 266287
2016-04-14 09:52:06 +00:00
Michael Zuckerman 0a3508a8d3 [Clang][AVX512][BUILTIN] Adding support for intrinsics of vpmov{d|q}{b|w|d}{128|256|512} instruction set
Differential Revision: http://reviews.llvm.org/D19055

llvm-svn: 266280
2016-04-14 07:56:51 +00:00
Michael Zuckerman d871531687 [Clang][AVX512][Builtin] Adding intrinsics of vpmovus{d|q}{b|w|d}{128|256|512} instruction set
Differential Revision: http://reviews.llvm.org/D19050

llvm-svn: 266278
2016-04-14 06:48:09 +00:00
Mehdi Amini 3d7224c2a7 Make sure the LLVMContext outlive the CompilerInstance
From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 266277
2016-04-14 05:37:41 +00:00
Mehdi Amini 59fb3ac51b Do not use llvm:getGlobalContext() in unittests
Currently trying to nuke this API from LLVM.

From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 266276
2016-04-14 05:34:32 +00:00
Richard Smith 72e50fe4ac [modules] Store the location of the lexical update record in a decl update as
an offset from the current record rather than as an absolute bit number. This
gives a minor .pcm file size reduction.

llvm-svn: 266269
2016-04-14 00:50:18 +00:00
Alexander Kornienko f11e099052 Reorder ASTNodeKind::AllKindInfo to match NodeKindId.
Summary:
AllKindInfo is being indexed by NodeKindId, so the order must match.
Extended ASTTypeTraits tests to cover this.

Reviewers: sbenza

Subscribers: cfe-commits, klimek

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

llvm-svn: 266268
2016-04-14 00:47:40 +00:00
Richard Smith 645d2cfd9c [modules] Remove CXX_BASE_SPECIFIERS_OFFSETS table. Instead of storing an ID of
a table entry in the corresponding decl, store an offset from the current
record to the relevant CXX_BASE_SPECIFIERS record. This results in fewer
indirections and a minor .pcm file size reduction.

llvm-svn: 266266
2016-04-14 00:29:55 +00:00
Manman Ren 051d0b620d ObjC kindof: order the methods in global pool relative to availability.
r265877 tries to put methods that are deprecated or unavailable to the
front of the global pool to emit diagnostics, but it breaks some of
our existing codes that depend on choosing a certain method for id
lookup.

This commit orders the methods with the same declaration with respect
to the availability, but do not order methods with different declaration.

rdar://25707511

llvm-svn: 266264
2016-04-13 23:43:56 +00:00
Reid Kleckner 9305fd1f86 [CodeGen] Avoid ctor/dtor boilerplate with some C++11
Non-owning pointers that cache LLVM types and constants can use
'nullptr' default member initializers so that we don't need to mention
them in the constructor initializer list.

Owning pointers should use std::unique_ptr so that we don't need to
manually delete them in the destructor. They also don't need to be
mentioned in the constructor at that point.

NFC

llvm-svn: 266263
2016-04-13 23:37:17 +00:00
Richard Smith aa165cf759 [modules] Remove CXX_CTOR_INITIALIZERS_OFFSETS table. Instead of storing an ID
of a table entry in the corresponding decl, store an offset from the current
record to the relevant CXX_CTOR_INITIALIZERS record. This results in fewer
indirections and a minor .pcm file size reduction.

llvm-svn: 266254
2016-04-13 21:57:08 +00:00
Bruno Cardoso Lopes c54768f7fa [SemaObjC] Properly handle mix between type arguments and protocols.
Under certain conditions clang currently fails to properly diagnostic ObjectC
parameter list when type args and protocols are mixed in the same list. This
happens when the first item in the parameter list is a (1) protocol, (2)
unknown type or (3) a list of protocols/unknown types up to the first type
argument. Fix the problem to report the proper error, example:

NSArray<M, NSValue *, NSURL, NSArray <id <M>>> *foo = @[@"a"];
NSNumber *bar = foo[0];
NSLog(@"%@", bar);

$ clang ...
x.m:7:13: error: angle brackets contain both a type ('NSValue') and a protocol ('M')
        NSArray<M, NSValue *, NSURL, NSArray <id <M>>> *foo = @[@"a"];
                ~  ^

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

rdar://problem/22204367

llvm-svn: 266245
2016-04-13 20:59:07 +00:00
Hans Wennborg 3480435fa8 Make sure CheckDestructor gets called on dllimported classes if the vtable is used (PR27319)
llvm-svn: 266242
2016-04-13 20:21:15 +00:00