]> granicus.if.org Git - clang/log
clang
8 years agoFix a bug involving deferred decl emission and PCH
Reid Kleckner [Fri, 22 Apr 2016 18:46:33 +0000 (18:46 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@267186 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[Hexagon] Add definitions for circular and bit-reverse loads/stores
Krzysztof Parzyszek [Fri, 22 Apr 2016 14:58:46 +0000 (14:58 +0000)]
[Hexagon] Add definitions for circular and bit-reverse loads/stores

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@267159 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[clang][AVX512][Builtin] adding intrinsics for vf{n}madd{ss|sd} and vf{n}sub{ss|sd...
Michael Zuckerman [Fri, 22 Apr 2016 10:56:24 +0000 (10:56 +0000)]
[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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@267135 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[Clang][AVX512][BUILTIN] Adding scalar intrinsics for rsqrt14 ,rcp14, getexp and...
Michael Zuckerman [Fri, 22 Apr 2016 10:06:10 +0000 (10:06 +0000)]
[Clang][AVX512][BUILTIN] Adding scalar intrinsics for rsqrt14 ,rcp14, getexp and getmant instruction set

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@267129 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[OPENMP] Fix for PR27463: Privatizing struct fields with array type
Alexey Bataev [Fri, 22 Apr 2016 09:05:03 +0000 (09:05 +0000)]
[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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@267125 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[index] Add SymbolSubKinds for ObjC IB annotations.
Argyrios Kyrtzidis [Fri, 22 Apr 2016 07:21:16 +0000 (07:21 +0000)]
[index] Add SymbolSubKinds for ObjC IB annotations.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@267118 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[index] Add a SymbolSubKind for an ObjC unit test.
Argyrios Kyrtzidis [Fri, 22 Apr 2016 07:21:10 +0000 (07:21 +0000)]
[index] Add a SymbolSubKind for an ObjC unit test.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@267117 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[index] Change SymbolCXXTemplateKind to a 'SymbolSubKinds' bitset.
Argyrios Kyrtzidis [Fri, 22 Apr 2016 07:21:04 +0000 (07:21 +0000)]
[index] Change SymbolCXXTemplateKind to a 'SymbolSubKinds' bitset.

This provides a more general and flexible way to annotate special symbols.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@267116 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[OPENMP] Fix for LCV in simd directives in explicit clauses.
Alexey Bataev [Fri, 22 Apr 2016 03:56:56 +0000 (03:56 +0000)]
[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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@267101 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoTry to get test passing on OS X (see comment at top of file).
Nico Weber [Fri, 22 Apr 2016 00:38:09 +0000 (00:38 +0000)]
Try to get test passing on OS X (see comment at top of file).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@267089 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[CUDA] removed unneeded __nvvm_reflect_anchor()
Artem Belevich [Thu, 21 Apr 2016 21:40:27 +0000 (21:40 +0000)]
[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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@267062 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[esan] EfficiencySanitizer driver flags
Derek Bruening [Thu, 21 Apr 2016 21:32:04 +0000 (21:32 +0000)]
[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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@267059 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoSplit interesting warnings off from -Wfloat-conversion
Richard Trieu [Thu, 21 Apr 2016 21:04:55 +0000 (21:04 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@267054 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoclang-cl: Don't assert on using /Yc with non-source files, PR27450
Nico Weber [Thu, 21 Apr 2016 19:59:10 +0000 (19:59 +0000)]
clang-cl: Don't assert on using /Yc with non-source files, PR27450

Move phase handling after input type validation.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@267040 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[x86] Force mixes asm syntax test to check for x86
Renato Golin [Thu, 21 Apr 2016 14:40:06 +0000 (14:40 +0000)]
[x86] Force mixes asm syntax test to check for x86

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@266993 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[Hexagon] Define architecture version macros for hexagonv55
Krzysztof Parzyszek [Thu, 21 Apr 2016 14:30:04 +0000 (14:30 +0000)]
[Hexagon] Define architecture version macros for hexagonv55

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@266989 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoClarify memory ownership semantics; NFC.
Aaron Ballman [Thu, 21 Apr 2016 13:51:07 +0000 (13:51 +0000)]
Clarify memory ownership semantics; NFC.

Patch by Clement Courbet

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@266986 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[Clang][AVX512][BuiltIn] Adding intrinsics of VGATHER{DPS|DPD} , VPGATHER{QD|QQ|DD...
Michael Zuckerman [Thu, 21 Apr 2016 12:47:27 +0000 (12:47 +0000)]
[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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@266983 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoCorrectly parse GCC-style asm line following MS-style asm line.
Denis Zobnin [Thu, 21 Apr 2016 10:59:18 +0000 (10:59 +0000)]
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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@266976 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoBack out the test case for r266973 for now.
Benjamin Kramer [Thu, 21 Apr 2016 10:46:14 +0000 (10:46 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@266975 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[Tooling] Inject -resource-dir instead of overwriting argv[0].
Benjamin Kramer [Thu, 21 Apr 2016 10:18:18 +0000 (10:18 +0000)]
[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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@266973 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoCompilation for Intel MCU (Part 1/3)
Andrey Turetskiy [Thu, 21 Apr 2016 10:16:48 +0000 (10:16 +0000)]
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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@266972 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[modules] Make the tweak to avoid circular inclusion of emmintrin.h and
Richard Smith [Thu, 21 Apr 2016 01:46:37 +0000 (01:46 +0000)]
[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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@266945 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoRemove the (ignored) -Wreceived-is-weak diagnostic.
Bob Wilson [Thu, 21 Apr 2016 00:11:24 +0000 (00:11 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@266938 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoModule Debugging: Emit the canonical debug info for Objective-C classes
Adrian Prantl [Wed, 20 Apr 2016 23:59:32 +0000 (23:59 +0000)]
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>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@266937 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[Tooling] Fix getting fully qualified names of template alias types.
Chaoren Lin [Wed, 20 Apr 2016 22:12:07 +0000 (22:12 +0000)]
[Tooling] Fix getting fully qualified names of template alias types.

Reviewers: rsmith, rnk

Subscribers: cfe-commits, klimek

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@266925 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAdd warning about CR+LF line endings on Windows.
Adrian McCarthy [Wed, 20 Apr 2016 16:43:34 +0000 (16:43 +0000)]
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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@266887 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[OPENMP] Codegen for untied tasks.
Alexey Bataev [Wed, 20 Apr 2016 04:01:36 +0000 (04:01 +0000)]
[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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@266853 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoEnable ODR uniquing of DITypes for ThinLTO backends
Teresa Johnson [Wed, 20 Apr 2016 02:23:52 +0000 (02:23 +0000)]
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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@266852 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[Clang] Remove unwanted --check-prefix=CHECK from unit tests. NFC.
Mandeep Singh Grang [Wed, 20 Apr 2016 01:02:18 +0000 (01:02 +0000)]
[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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@266843 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoMarkEOLs should only be true for clang-cl.exe.
Stephen Hines [Wed, 20 Apr 2016 00:33:06 +0000 (00:33 +0000)]
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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@266840 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[Parse] Reuse OptionUnroll rather than matching it again. NFC
Adam Nemet [Tue, 19 Apr 2016 22:29:24 +0000 (22:29 +0000)]
[Parse] Reuse OptionUnroll rather than matching it again. NFC

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@266829 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[Parse] Use StringSwitch to improve readability. NFC
Adam Nemet [Tue, 19 Apr 2016 22:17:45 +0000 (22:17 +0000)]
[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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@266827 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[AArch64] Fix D19098 fallout.
Marcin Koscielnicki [Tue, 19 Apr 2016 20:51:00 +0000 (20:51 +0000)]
[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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@266817 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agocc1as: Don't crash when CIE is requested and no DWARF version is specified.
Adrian Prantl [Tue, 19 Apr 2016 20:31:19 +0000 (20:31 +0000)]
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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@266814 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[ARM NEON] Define vfms_f32 on ARM, and all vfms using vfma.
Ahmed Bougacha [Tue, 19 Apr 2016 19:44:45 +0000 (19:44 +0000)]
[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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@266807 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoFixed a bug in AnnotatedLine::startsWith when there are comments in the line.
Eric Liu [Tue, 19 Apr 2016 19:25:33 +0000 (19:25 +0000)]
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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@266803 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoObjC Class Property: don't emit class properties on old deployment targets.
Manman Ren [Tue, 19 Apr 2016 19:05:03 +0000 (19:05 +0000)]
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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@266800 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoFix PR26999 better- RenderDebugEnablingArgs() once only
Douglas Katzman [Tue, 19 Apr 2016 18:55:53 +0000 (18:55 +0000)]
Fix PR26999 better- RenderDebugEnablingArgs() once only

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@266797 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[CUDA] Add a test for r266496 (raise an error if a CUDA installation isn't found)
Justin Lebar [Tue, 19 Apr 2016 18:52:28 +0000 (18:52 +0000)]
[CUDA] Add a test for r266496 (raise an error if a CUDA installation isn't found)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@266796 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoreuse mustBeJSIdent for interface detection
Martin Probst [Tue, 19 Apr 2016 18:19:06 +0000 (18:19 +0000)]
reuse mustBeJSIdent for interface detection

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@266790 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoclang-format: [JS] support `interface` as a free standing identifier.
Martin Probst [Tue, 19 Apr 2016 18:18:59 +0000 (18:18 +0000)]
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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@266789 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[builtin_expect] tighten checks, add test, add comments
Sanjay Patel [Tue, 19 Apr 2016 18:17:34 +0000 (18:17 +0000)]
[builtin_expect] tighten checks, add test, add comments

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@266788 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoreduce indentation; NFCI
Sanjay Patel [Tue, 19 Apr 2016 18:06:33 +0000 (18:06 +0000)]
reduce indentation; NFCI

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@266787 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[CodeGen] Widen non-power-of-2 vector HFA base types.
Ahmed Bougacha [Tue, 19 Apr 2016 17:54:29 +0000 (17:54 +0000)]
[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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@266784 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[CodeGen] Fix whitespace. NFC.
Ahmed Bougacha [Tue, 19 Apr 2016 17:54:24 +0000 (17:54 +0000)]
[CodeGen] Fix whitespace. NFC.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@266783 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoPass dwarf-version to cc1as.
Douglas Katzman [Tue, 19 Apr 2016 17:43:54 +0000 (17:43 +0000)]
Pass dwarf-version to cc1as.

Fix PR26999 - crashing in cc1as with any '*bsd' target.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@266775 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoreduce indentation; NFCI
Sanjay Patel [Tue, 19 Apr 2016 17:13:14 +0000 (17:13 +0000)]
reduce indentation; NFCI

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@266765 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[Clang][Builtin][AVX512] Adding intrinsics for VGETMANT{PD|PS} and VGETEXP{PD|PS...
Michael Zuckerman [Tue, 19 Apr 2016 17:10:29 +0000 (17:10 +0000)]
[Clang][Builtin][AVX512] Adding intrinsics for VGETMANT{PD|PS} and VGETEXP{PD|PS} instruction set

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@266763 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoRevert "[OPENMP] Codegen for untied tasks."
Alexey Bataev [Tue, 19 Apr 2016 16:36:01 +0000 (16:36 +0000)]
Revert "[OPENMP] Codegen for untied tasks."

This reverts commit r266754.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@266755 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[OPENMP] Codegen for untied tasks.
Alexey Bataev [Tue, 19 Apr 2016 16:27:55 +0000 (16:27 +0000)]
[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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@266754 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoRevert r266747 (Compilation for Intel MCU (Part 1/3)) since it breaks a few buildbots.
Andrey Turetskiy [Tue, 19 Apr 2016 16:25:30 +0000 (16:25 +0000)]
Revert r266747 (Compilation for Intel MCU (Part 1/3)) since it breaks a few buildbots.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@266753 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[ASTMatchers] Do not try to memoize nodes we can't compare.
Samuel Benzaquen [Tue, 19 Apr 2016 15:52:56 +0000 (15:52 +0000)]
[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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@266748 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoCompilation for Intel MCU (Part 1/3)
Andrey Turetskiy [Tue, 19 Apr 2016 15:50:57 +0000 (15:50 +0000)]
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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@266747 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[Clang][AVX512][BUILTIN] Adding intrinsics support to VEXTRACT{I|F} and VINSERT{I...
Michael Zuckerman [Tue, 19 Apr 2016 15:18:23 +0000 (15:18 +0000)]
[Clang][AVX512][BUILTIN] Adding intrinsics support to VEXTRACT{I|F} and VINSERT{I|F} instruction set

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@266745 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoSummary:
Martin Probst [Tue, 19 Apr 2016 14:59:16 +0000 (14:59 +0000)]
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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@266744 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoclang-format: [JS] simplify import/export.
Martin Probst [Tue, 19 Apr 2016 14:55:37 +0000 (14:55 +0000)]
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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@266743 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoD17487: [analyzer][scan-build-py] flag filter modification for compilation database...
Laszlo Nagy [Tue, 19 Apr 2016 12:03:03 +0000 (12:03 +0000)]
D17487: [analyzer][scan-build-py] flag filter modification for compilation database creation

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@266726 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoRevert "[OPENMP] Codegen for untied tasks."
Alexey Bataev [Tue, 19 Apr 2016 09:27:38 +0000 (09:27 +0000)]
Revert "[OPENMP] Codegen for untied tasks."

This reverts commit 266722.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@266724 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[OPENMP] Codegen for untied tasks.
Alexey Bataev [Tue, 19 Apr 2016 09:10:27 +0000 (09:10 +0000)]
[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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@266722 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoWarn if function or variable cannot be implicitly instantiated
Serge Pavlov [Tue, 19 Apr 2016 06:19:52 +0000 (06:19 +0000)]
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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@266719 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[CUDA] Add --no-cuda-noopt-debug, which disables --cuda-noopt-debug.
Justin Lebar [Tue, 19 Apr 2016 02:27:11 +0000 (02:27 +0000)]
[CUDA] Add --no-cuda-noopt-debug, which disables --cuda-noopt-debug.

Reviewers: tra

Subscribers: cfe-commits, jhen

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@266708 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[CUDA] Add --cuda-compile-host-device, which overrides --cuda-host-only and --cuda...
Justin Lebar [Tue, 19 Apr 2016 02:27:07 +0000 (02:27 +0000)]
[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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@266707 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAdd a test case to check a member's default constructor is also run.
Akira Hatanaka [Tue, 19 Apr 2016 02:21:47 +0000 (02:21 +0000)]
Add a test case to check a member's default constructor is also run.

This is a follow-up to r266645.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@266706 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[ObjC++] Fix crash when emitting debug info for a block member capturing this.
Adrian Prantl [Mon, 18 Apr 2016 23:48:16 +0000 (23:48 +0000)]
[ObjC++] Fix crash when emitting debug info for a block member capturing this.

rdar://problem/23871824

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@266698 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoMark -Xclang as being a compilation-only option so that the clang driver
Richard Smith [Mon, 18 Apr 2016 23:12:59 +0000 (23:12 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@266695 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[modules] Remove some more unnecessary forwarding functions.
Richard Smith [Mon, 18 Apr 2016 21:54:58 +0000 (21:54 +0000)]
[modules] Remove some more unnecessary forwarding functions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@266687 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[sanitizer-coverage] make sure coverage flags are not passed to clang if the driver...
Kostya Serebryany [Mon, 18 Apr 2016 21:30:17 +0000 (21:30 +0000)]
[sanitizer-coverage] make sure coverage flags are not passed to clang if the driver thinks they are unused

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@266673 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[sanitizer-coverage] better docs for -fsanitize-coverage=trace-bb
Kostya Serebryany [Mon, 18 Apr 2016 21:28:37 +0000 (21:28 +0000)]
[sanitizer-coverage] better docs for -fsanitize-coverage=trace-bb

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@266672 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[Hexagon] V60/HVX builtin definitions for clang
Krzysztof Parzyszek [Mon, 18 Apr 2016 21:27:59 +0000 (21:27 +0000)]
[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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@266671 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoBlock: Fix a crash when we have type attributes or qualifiers with omitted
Manman Ren [Mon, 18 Apr 2016 18:40:51 +0000 (18:40 +0000)]
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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@266648 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[Hexagon] Define macros __HVX__ and __HVXDBL__ when appropriate
Krzysztof Parzyszek [Mon, 18 Apr 2016 18:38:11 +0000 (18:38 +0000)]
[Hexagon] Define macros __HVX__ and __HVXDBL__ when appropriate

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@266647 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[Parser][ObjC] Make sure c++11 in-class initialization is done when the
Akira Hatanaka [Mon, 18 Apr 2016 18:19:45 +0000 (18:19 +0000)]
[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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@266645 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoClarifying the wording of this diagnostic; it confused parameter and argument.
Aaron Ballman [Mon, 18 Apr 2016 18:10:53 +0000 (18:10 +0000)]
Clarifying the wording of this diagnostic; it confused parameter and argument.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@266644 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoNFC: unify clang / LLVM atomic ordering
JF Bastien [Mon, 18 Apr 2016 18:01:49 +0000 (18:01 +0000)]
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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@266641 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoUpdate InstrProf pass creator API reference
Xinliang David Li [Mon, 18 Apr 2016 17:48:12 +0000 (17:48 +0000)]
Update InstrProf pass creator API reference

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@266638 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[ARM] predefines __ELF__ macro for arm-none-eabi
Weiming Zhao [Mon, 18 Apr 2016 16:25:46 +0000 (16:25 +0000)]
[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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@266625 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoclang-format: Improve heuristics to detect function declarations/definitions.
Daniel Jasper [Mon, 18 Apr 2016 11:31:21 +0000 (11:31 +0000)]
clang-format: Improve heuristics to detect function declarations/definitions.

Specifically understand ellipses in parameter lists and treat trailing
reference qualifiers and the "{" as signals.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@266599 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAdd missing include for StringRef (NFC)
Mehdi Amini [Mon, 18 Apr 2016 09:08:59 +0000 (09:08 +0000)]
Add missing include for StringRef (NFC)

From: Mehdi Amini <mehdi.amini@apple.com>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@266594 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoRevert "NFC: unify clang / LLVM atomic ordering"
JF Bastien [Sun, 17 Apr 2016 21:28:50 +0000 (21:28 +0000)]
Revert "NFC: unify clang / LLVM atomic ordering"

This reverts commit b0495df9eae2824bee830cc4c94f5441f0d4cbc9.

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@266575 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoNFC: unify clang / LLVM atomic ordering
JF Bastien [Sun, 17 Apr 2016 21:01:09 +0000 (21:01 +0000)]
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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@266574 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoImplement CWG 941 - explicit specializations of deleted function templates
Faisal Vali [Sun, 17 Apr 2016 17:32:04 +0000 (17:32 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@266561 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoDebugInfo: Make DICompositeTypes distinct most of the time
Duncan P. N. Exon Smith [Sun, 17 Apr 2016 07:45:08 +0000 (07:45 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@266556 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAdd missing headers (fix build after headers cleanup in LLVM)
Mehdi Amini [Sat, 16 Apr 2016 08:14:10 +0000 (08:14 +0000)]
Add missing headers (fix build after headers cleanup in LLVM)

From: Mehdi Amini <mehdi.amini@apple.com>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@266525 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoReplace hardcoded comment at 'lit.site.cfg.in'
Alex Denisov [Sat, 16 Apr 2016 06:54:46 +0000 (06:54 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@266516 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[modules] Don't expose *intrin.h headers that cannot be included standalone as
Richard Smith [Sat, 16 Apr 2016 00:46:26 +0000 (00:46 +0000)]
[modules] Don't expose *intrin.h headers that cannot be included standalone as
separate modules. These cause build breakage with -fmodules-local-submodule-visibility.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@266501 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[CUDA] Raise an error if the CUDA install can't be found.
Justin Lebar [Sat, 16 Apr 2016 00:11:11 +0000 (00:11 +0000)]
[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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@266496 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoImprove diagnostic for the case when a non-defined function-like macro is used
Richard Smith [Sat, 16 Apr 2016 00:07:09 +0000 (00:07 +0000)]
Improve diagnostic for the case when a non-defined function-like macro is used
in a preprocessor constant expression.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@266495 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoRevert 266186 as it breaks anything that includes type_traits on some platforms
Nemanja Ivanovic [Fri, 15 Apr 2016 18:04:13 +0000 (18:04 +0000)]
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).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@266460 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoFix testcase for MSVC targets where the output ordering is different.
Adrian Prantl [Fri, 15 Apr 2016 16:21:23 +0000 (16:21 +0000)]
Fix testcase for MSVC targets where the output ordering is different.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@266449 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoUpdate testcase to new debug info metadata format.
Adrian Prantl [Fri, 15 Apr 2016 16:05:13 +0000 (16:05 +0000)]
Update testcase to new debug info metadata format.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@266447 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoUpdate to match LLVM changes for PR27284.
Adrian Prantl [Fri, 15 Apr 2016 15:55:45 +0000 (15:55 +0000)]
Update to match LLVM changes for PR27284.
(Reverse the ownership between DICompileUnit and DISubprogram.)

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@266445 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoASTMatchers.h: Fix formatting. [-Wdocumentation]
NAKAMURA Takumi [Fri, 15 Apr 2016 15:42:27 +0000 (15:42 +0000)]
ASTMatchers.h: Fix formatting. [-Wdocumentation]

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@266444 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoRevert r266415, it broke parsing SDK headers (PR27367).
Nico Weber [Fri, 15 Apr 2016 14:35:06 +0000 (14:35 +0000)]
Revert r266415, it broke parsing SDK headers (PR27367).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@266431 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoRemove include duplicate. NFC.
Alexey Bader [Fri, 15 Apr 2016 13:23:26 +0000 (13:23 +0000)]
Remove include duplicate. NFC.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@266428 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[MSVC Compat] Implementation of __unaligned (MS extension) as a type qualifier
Andrey Bokhanko [Fri, 15 Apr 2016 08:03:51 +0000 (08:03 +0000)]
[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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@266415 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoclang-cl: Don't check for existence of linker inputs when /link is used
Hans Wennborg [Fri, 15 Apr 2016 01:12:32 +0000 (01:12 +0000)]
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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@266402 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoclang-cl: Make /link accept an optional joined argument.
Hans Wennborg [Fri, 15 Apr 2016 00:24:15 +0000 (00:24 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@266395 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoLit C++11 Compatibility Patch #8
Charles Li [Thu, 14 Apr 2016 23:47:07 +0000 (23:47 +0000)]
Lit C++11 Compatibility Patch #8

24 tests have been updated for C++11 compatibility.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@266387 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAMDGPU: Add test for generic builtin behavior
Matt Arsenault [Thu, 14 Apr 2016 22:34:39 +0000 (22:34 +0000)]
AMDGPU: Add test for generic builtin behavior

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@266383 91177308-0d34-0410-b5e6-96231b3b80d8