]> granicus.if.org Git - clang/log
clang
8 years agoWhen deducing template parameters from base classes of an argument type, don't
Richard Smith [Mon, 25 Apr 2016 19:09:05 +0000 (19:09 +0000)]
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!

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

8 years ago[Clang][Builtin][AVX512]Adding k-register logic intrinsics KAND, KANDN, KOR, KORTEST...
Michael Zuckerman [Mon, 25 Apr 2016 16:42:29 +0000 (16:42 +0000)]
[Clang][Builtin][AVX512]Adding k-register logic intrinsics KAND, KANDN, KOR, KORTEST, KXNOR, KXOR, KUNPACK instruction set.

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

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

8 years agoAdded Fixer implementation and fix() interface in clang-format for removing redundant...
Eric Liu [Mon, 25 Apr 2016 15:09:22 +0000 (15:09 +0000)]
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

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

8 years ago[Clang][Builtin][AVX512]Adding intrinsics for vfpclass{sd|ss} vfpclass{pd|ps} instruc...
Michael Zuckerman [Mon, 25 Apr 2016 14:48:23 +0000 (14:48 +0000)]
[Clang][Builtin][AVX512]Adding intrinsics for vfpclass{sd|ss} vfpclass{pd|ps} instruction set

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

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

8 years ago[analyzer] Let TK_PreserveContents span across the whole base region.
Artem Dergachev [Mon, 25 Apr 2016 14:44:25 +0000 (14:44 +0000)]
[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

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

8 years ago[Clang][AVX512][BUILTIN] Adding intrinsics for VSCATTERPF{1|0}{DPS|QPS|DPD|QPD} instr...
Michael Zuckerman [Mon, 25 Apr 2016 13:01:40 +0000 (13:01 +0000)]
[Clang][AVX512][BUILTIN] Adding intrinsics for VSCATTERPF{1|0}{DPS|QPS|DPD|QPD} instruction set

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

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

8 years ago[OPENMP 4.5] Codegen for 'taskloop' directive.
Alexey Bataev [Mon, 25 Apr 2016 12:22:29 +0000 (12:22 +0000)]
[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
);

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

8 years ago[Clang][AVX512][BuiltIn] Adding support to intrinsics of VPERMD and VPERMW instructio...
Michael Zuckerman [Mon, 25 Apr 2016 05:32:35 +0000 (05:32 +0000)]
[Clang][AVX512][BuiltIn] Adding support to intrinsics of VPERMD and VPERMW instruction set

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

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

8 years agoDebug info: Apply an empty debug location for global OpenMP destructors.
Adrian Prantl [Sun, 24 Apr 2016 22:22:29 +0000 (22:22 +0000)]
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.

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

8 years agoclang-format: [JS] generator and async functions.
Martin Probst [Sun, 24 Apr 2016 22:05:09 +0000 (22:05 +0000)]
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

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

8 years agoImprove diagnostic checking for va_start to also warn on other instances of undefined...
Aaron Ballman [Sun, 24 Apr 2016 13:30:21 +0000 (13:30 +0000)]
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).

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

8 years agoMake thinlto clang test more robust against LLVM changes.
Mehdi Amini [Sun, 24 Apr 2016 03:44:55 +0000 (03:44 +0000)]
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>

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

8 years agoFix a couple assertions that can never fire because the condition ANDed with the...
Craig Topper [Sun, 24 Apr 2016 02:08:22 +0000 (02:08 +0000)]
Fix a couple assertions that can never fire because the condition ANDed with the string is just true or 1.

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

8 years agoDebugInfo: DIGlobalVariables became 'distinct' in LLVM r267301
Duncan P. N. Exon Smith [Sat, 23 Apr 2016 22:29:26 +0000 (22:29 +0000)]
DebugInfo: DIGlobalVariables became 'distinct' in LLVM r267301

Update testcases due to DIBuilder change.

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

8 years agoDebugInfo: Adapt to loss of DITypeRef in LLVM r267296
Duncan P. N. Exon Smith [Sat, 23 Apr 2016 21:08:27 +0000 (21:08 +0000)]
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.

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

8 years ago[profile] Fix another use of the driver.
Sean Silva [Sat, 23 Apr 2016 02:13:48 +0000 (02:13 +0000)]
[profile] Fix another use of the driver.

Follow-on to r267262.

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

8 years ago[profile] Use cc1 in these tests instead of the driver.
Sean Silva [Sat, 23 Apr 2016 02:11:16 +0000 (02:11 +0000)]
[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.

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

8 years agoRevert the bool portion of r267054
Richard Trieu [Fri, 22 Apr 2016 22:14:32 +0000 (22:14 +0000)]
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

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

8 years agoPGO] PGOFuncName meta data if PGOFuncName is different from function's raw name
Rong Xu [Fri, 22 Apr 2016 21:19:05 +0000 (21:19 +0000)]
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

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

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