]> granicus.if.org Git - clang/log
clang
8 years ago[CUDA] Make sure device-side __global__ functions are always visible.
Artem Belevich [Mon, 2 May 2016 20:30:03 +0000 (20:30 +0000)]
[CUDA] Make sure device-side __global__ functions are always visible.

__global__ functions are a special case in CUDA.

Even when the symbol would normally not be externally
visible according to C++ rules, they still must be visible
in CUDA GPU object so host-side stub can launch them.

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

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

8 years agoRevert "[Driver] Quote clang full version in dwarf producer when invoking cc1as"
Bruno Cardoso Lopes [Mon, 2 May 2016 20:20:49 +0000 (20:20 +0000)]
Revert "[Driver] Quote clang full version in dwarf producer when invoking cc1as"

This reverts commit r264813 / 6484b95d634f53dd929c75265ef3c4decf397584.

While using it in the shell is fine, this a problem when cc1as is
invoked directly by the driver because single quoting the clang full
version makes cc1as write out the version with the quotes in the final
binary.

If the user wants to copy-n-pastable output, it could use either -###
or CC_PRINT_OPTIONS=1 clang -v ...

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

8 years agoExpand aggregate arguments more often on 32-bit Windows
Reid Kleckner [Mon, 2 May 2016 17:41:07 +0000 (17:41 +0000)]
Expand aggregate arguments more often on 32-bit Windows

Before this change, we would pass all non-HFA record arguments on
Windows with byval. Byval often blocks optimizations and results in bad
code generation. Windows now uses the existing workaround that other
x86_32 platforms use.

I also expanded the workaround to handle C++ records with constructors
on Windows. On non-Windows platforms, we have to keep generating the
same LLVM IR prototypes if we want our bitcode to be ABI compatible.
Otherwise we will encounter mismatch issues like PR21573.

Essentially fixes PR27522 in Clang instead of LLVM.

Reviewers: hans

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

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

8 years ago[WebAssembly] Rename memory_size intrinsic to current_memory
Derek Schuff [Mon, 2 May 2016 17:26:19 +0000 (17:26 +0000)]
[WebAssembly] Rename memory_size intrinsic to current_memory

This follows the recent change in the wasm spec.

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

8 years ago[CLANG][AVX512][BUILTIN]movap{d|s}{128|256|512}
Michael Zuckerman [Mon, 2 May 2016 14:02:01 +0000 (14:02 +0000)]
[CLANG][AVX512][BUILTIN]movap{d|s}{128|256|512}

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

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

8 years ago[Clang][AVX512][BuiltIn] Adding intrinsics for cvtps2pd instruction set
Michael Zuckerman [Mon, 2 May 2016 09:42:31 +0000 (09:42 +0000)]
[Clang][AVX512][BuiltIn] Adding intrinsics for cvtps2pd instruction set

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

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

8 years ago[Clang][avx512][builtin] Adding intrinsics for vexpand{d|q|ps|pd} instrctuon set
Michael Zuckerman [Mon, 2 May 2016 08:36:41 +0000 (08:36 +0000)]
[Clang][avx512][builtin] Adding intrinsics for vexpand{d|q|ps|pd} instrctuon set

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

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

8 years ago[Clang][BuiltIn][avx512] Adding intrinsics for vpshufd instruction set
Michael Zuckerman [Mon, 2 May 2016 07:35:27 +0000 (07:35 +0000)]
[Clang][BuiltIn][avx512] Adding intrinsics for vpshufd instruction set

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

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

8 years ago[clang][Builtin][AVX512] Adding intrinsics for vmovshdup and vmovsldup instruction set
Michael Zuckerman [Sun, 1 May 2016 14:43:43 +0000 (14:43 +0000)]
[clang][Builtin][AVX512] Adding intrinsics for vmovshdup and vmovsldup instruction set

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

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

8 years agopython: add bindings for children of diagnostics
Saleem Abdulrasool [Sat, 30 Apr 2016 21:14:01 +0000 (21:14 +0000)]
python: add bindings for children of diagnostics

This exposes the Clang API bindings clang_getChildDiagnostics (which returns a
CXDiagnosticSet) and clang_getNumDiagnosticsInSet / clang_getDiagnosticInSet (to
traverse the CXDiagnosticSet), and adds a helper children property in the Python
Diagnostic wrapper.

Also, this adds the missing OVERLOAD_CANDIDATE (700) cursor type.

Patch by Hanson Wang!

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

8 years agoStab in the dark to fix the PS4 bot
Chris Bieneman [Sat, 30 Apr 2016 05:27:17 +0000 (05:27 +0000)]
Stab in the dark to fix the PS4 bot

r268127 is causing the PS4 bots to fail. Not sure what is causing it, but hopefully this will fix it.

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

8 years agoReverting 268055 as it caused PR27579.
Amjad Aboud [Sat, 30 Apr 2016 01:44:38 +0000 (01:44 +0000)]
Reverting 268055 as it caused PR27579.

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

8 years agoDelete store to Target option PositionIndependentExecutable as PIE is now set in...
Sriraman Tallam [Fri, 29 Apr 2016 23:38:53 +0000 (23:38 +0000)]
Delete store to Target option PositionIndependentExecutable as PIE is now set in module flags.

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

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

8 years ago[CUDA] Copy host builtin types to NVPTXTargetInfo.
Justin Lebar [Fri, 29 Apr 2016 23:05:19 +0000 (23:05 +0000)]
[CUDA] Copy host builtin types to NVPTXTargetInfo.

Summary:
Host and device types must match, otherwise when we pass values back and
forth between the host and device, we will get the wrong result.

This patch makes NVPTXTargetInfo inherit most of its type information
from the host's target info.

Reviewers: rsmith

Subscribers: cfe-commits, jhen, tra

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

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

8 years ago[NFC] Initialize a variable to make buildbot green.
Denis Zobnin [Fri, 29 Apr 2016 22:50:16 +0000 (22:50 +0000)]
[NFC] Initialize a variable to make buildbot green.

In r268085 "[MS] Make #pragma pack use PragmaStack<> class." there was an
uninitialized variable 'Alignment', which caused the following failure:
  http://lab.llvm.org:8011/builders/sanitizer-ppc64be-linux/builds/1758
Zero-initialize the variable to fix this failure.

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

8 years agoFix test case for incompatible sysroot warning
Chris Bieneman [Fri, 29 Apr 2016 22:44:33 +0000 (22:44 +0000)]
Fix test case for incompatible sysroot warning

r268127 broke some bots because it needs to specify a darwin target.

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

8 years agoAdd a new warning to notify users of mismatched SDK and deployment target
Chris Bieneman [Fri, 29 Apr 2016 22:28:34 +0000 (22:28 +0000)]
Add a new warning to notify users of mismatched SDK and deployment target

Summary:
This patch adds a new driver warning -Wincompatible-sdk which notifies the user when they are mismatching the version min options and the sysroot.

The patch works by checking the sysroot (if present) for an SDK name, then matching that against the target platform. In the case of a mismatch it logs a warning.

Reviewers: bob.wilson, rsmith

Subscribers: rsmith, edward-san, cfe-commits

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

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

8 years ago[Sema] Specify the underlying type for an enum. NFC.
George Burgess IV [Fri, 29 Apr 2016 21:32:53 +0000 (21:32 +0000)]
[Sema] Specify the underlying type for an enum. NFC.

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

8 years agoAdd the ability to determine whether a format string argument is of a double type...
Aaron Ballman [Fri, 29 Apr 2016 21:05:55 +0000 (21:05 +0000)]
Add the ability to determine whether a format string argument is of a double type or not. This change is tested by clang-tidy in r268100.

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

8 years agoMethod Pool in modules: we make sure that if a module contains an entry for
Manman Ren [Fri, 29 Apr 2016 19:04:05 +0000 (19:04 +0000)]
Method Pool in modules: we make sure that if a module contains an entry for
a selector, the entry should be complete, containing everything introduced by
that module and all modules it imports.

Before writing out the method pool of a module, we sync up the out of date
selectors by pulling in methods for the selectors, from all modules it imports.

In ReadMethodPool, after pulling in the method pool entry for module A, this
lets us skip the modules that module A imports.

rdar://problem/25900131

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

8 years agoUse the new path for coverage related headers and update CMakeLists.txt
Easwaran Raman [Fri, 29 Apr 2016 18:53:16 +0000 (18:53 +0000)]
Use the new path for coverage related headers and update CMakeLists.txt

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

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

8 years ago[MS] Make #pragma pack use PragmaStack<> class.
Denis Zobnin [Fri, 29 Apr 2016 18:17:40 +0000 (18:17 +0000)]
[MS] Make #pragma pack use PragmaStack<> class.

Make implementation of #pragma pack consistent with other "stack" pragmas.
Use PragmaStack<> class instead of old representation of internal stack.
Don't change compiler's behavior.

TODO:
  1. Introduce diagnostics on popping named slots from pragma stacks.

Reviewer: rnk

Differential revision: http://reviews.llvm.org/D19727

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

8 years agoFix crash in BuildCXXDefaultInitExpr.
Reid Kleckner [Fri, 29 Apr 2016 18:06:53 +0000 (18:06 +0000)]
Fix crash in BuildCXXDefaultInitExpr.

Fix crash in BuildCXXDefaultInitExpr when member of template class has
same name as the class itself.

Based on patch by Raphael "Teemperor" Isemann!

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

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

8 years ago[Concepts] Pass requires-clause to ActOnTemplateParameterList; NFC
Hubert Tong [Fri, 29 Apr 2016 18:05:37 +0000 (18:05 +0000)]
[Concepts] Pass requires-clause to ActOnTemplateParameterList; NFC

Summary:
Prepare to store requires-clause expression for access via
TemplateParameterList.

Reviewers: aaron.ballman, faisalv, rsmith

Subscribers: cfe-commits, nwilson

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

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

8 years ago[Clang][Darwin] Define __ARM_DWARF_EH__ for WatchABI
Chris Bieneman [Fri, 29 Apr 2016 17:53:00 +0000 (17:53 +0000)]
[Clang][Darwin] Define __ARM_DWARF_EH__ for WatchABI

Summary: The Darwin armv7k ABI uses Dwarf EH, so we need to set the OS define correctly. Without this the gcc_personality fails to build.

Reviewers: t.p.northover

Subscribers: aemerson, cfe-commits, rengolin

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

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

8 years agoImprove test coverage of -Wdouble-promotion
Robert Lougher [Fri, 29 Apr 2016 17:44:29 +0000 (17:44 +0000)]
Improve test coverage of -Wdouble-promotion

This patch adds coverage for additional cases where implicit conversion can
occur (assignment and return).  It also adds tests for some cases where a
warning should occur but none is produced.  These are marked as FIXME.

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

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

8 years agoAdd a Subjects line to NoDebugAttr [NFC].
Paul Robinson [Fri, 29 Apr 2016 17:03:34 +0000 (17:03 +0000)]
Add a Subjects line to NoDebugAttr [NFC].

The 'nodebug' attribute had hand-coded constraints; replace those with
a Subjects line in Attr.td.
Also add a missing test to verify the attribute is okay on an
Objective-C method.

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

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

8 years agoRecommitted r264281 "Supporting all entities declared in lexical scope in LLVM debug...
Amjad Aboud [Fri, 29 Apr 2016 16:08:08 +0000 (16:08 +0000)]
Recommitted r264281 "Supporting all entities declared in lexical scope in LLVM debug info."
After fixing PR26942 in r267004.

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

8 years ago[ARM] Guard the declarations of f16 to f32 vcvt intrinsics in arm_neon.h by testing...
Silviu Baranga [Fri, 29 Apr 2016 15:03:32 +0000 (15:03 +0000)]
[ARM] Guard the declarations of f16 to f32 vcvt intrinsics in arm_neon.h by testing __ARM_FP

Summary:
Conversions between float and half are only available when the
taraget has the half-precision extension. Guard these intrinsics
so that they don't cause crashes in the backend.

Fixes PR27550.

Reviewers: rengolin, t.p.northover

Subscribers: cfe-commits, aemerson, t.p.northover, rengolin

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

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

8 years agoRecommit "[MS] Improved implementation of stack pragmas (vtordisp, *_seg)"
Denis Zobnin [Fri, 29 Apr 2016 11:27:00 +0000 (11:27 +0000)]
Recommit "[MS] Improved implementation of stack pragmas (vtordisp, *_seg)"

Slightly updated version, double-checked build and tests.
Improve implementation of MS pragmas that use stack + compatibility fixes.
This patch:
  1. Changes implementation of #pragma vtordisp to use PragmaStack class
     that other stack pragmas use;
  2. Fixes "#pragma vtordisp()" behavior - it shouldn't affect the stack;
  3. Supports "save-restore" of pragma stacks on enter / exit a C++ method
     body, as MSVC does.

TODO:
  1. Change implementation of #pragma pack to use the same approach;
  2. Introduce diagnostics on popping named stack slots, as MSVC does.

Reviewers:
  rnk, thakis

Differential revision: http://reviews.llvm.org/D19361

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

8 years ago[clang][BuiltIn][AVX512]Adding intrinsics for cmp{ss|sd} instruction set.
Michael Zuckerman [Fri, 29 Apr 2016 11:01:16 +0000 (11:01 +0000)]
[clang][BuiltIn][AVX512]Adding intrinsics for cmp{ss|sd} instruction set.

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

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

8 years ago[OPENMP] Fix detection of explicit data-sharing attributes in templates.
Alexey Bataev [Fri, 29 Apr 2016 09:56:11 +0000 (09:56 +0000)]
[OPENMP] Fix detection of explicit data-sharing attributes in templates.

Fixes a bug with analysis of data-sharing attributes in templates.

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

8 years agoImplementation of VlA of GNU C++ extension, by Vladimir Yakovlev.
Alexey Bataev [Fri, 29 Apr 2016 09:39:50 +0000 (09:39 +0000)]
Implementation of VlA of GNU C++ extension, by Vladimir Yakovlev.

This enables GNU C++ extension "Variable length array" by default.
Differential Revision: http://reviews.llvm.org/D18823

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

8 years ago[Clang][AVX512][Builtin] Adding intrinsics for compress instruction set
Michael Zuckerman [Fri, 29 Apr 2016 08:52:02 +0000 (08:52 +0000)]
[Clang][AVX512][Builtin] Adding intrinsics for compress instruction set

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

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

8 years ago[Parser] Clear the TemplateParamScope bit of the current scope's flag
Akira Hatanaka [Fri, 29 Apr 2016 02:24:14 +0000 (02:24 +0000)]
[Parser] Clear the TemplateParamScope bit of the current scope's flag
if we are parsing a template specialization.

This commit makes changes to clear the TemplateParamScope bit and set
the TemplateParamParent field of the current scope to null if a template
specialization is being parsed.

Before this commit, Sema::ActOnStartOfLambdaDefinition would check
whether the parent template scope had any decls to determine whether
or not a template specialization was being parsed. This wasn't correct
since it couldn't distinguish between a real template specialization and
a template defintion with an unnamed template parameter (only template
parameters with names are added to the scope's decl list). To fix the
bug, this commit changes the code to check the pointer to the parent
template scope rather than the decl list.

rdar://problem/23440346

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

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

8 years ago[OPENMP] Enable correct generation of runtime call when target directive is separated...
Carlo Bertolli [Fri, 29 Apr 2016 01:37:30 +0000 (01:37 +0000)]
[OPENMP] Enable correct generation of runtime call when target directive is separated from teams directive by multiple curly brackets

http://reviews.llvm.org/D18474

This patch fixes a bug in code generation of the correct OpenMP runtime library call in presence of target and teams, when target is separated by teams with multiple curly brackets. The current implementation will not be able to see the teams directive inside target and issue a call to tgt_target instead of the correct one tgt_target_teams.

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

8 years agoPR27549: fix bug that resulted in us giving a translation-unit-scope variable a
Richard Smith [Fri, 29 Apr 2016 01:23:20 +0000 (01:23 +0000)]
PR27549: fix bug that resulted in us giving a translation-unit-scope variable a
mangled name if it happened to be declared in an 'extern "C++"' context. This
also causes us to use the '_ZL' mangling rather than the '_Z' mangling for
internal-linkage entities that are wrapped in a language linkage construct.

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

8 years agoAvoid -Wshadow warnings about constructor parameters named after fields
Reid Kleckner [Fri, 29 Apr 2016 00:37:43 +0000 (00:37 +0000)]
Avoid -Wshadow warnings about constructor parameters named after fields

Usually these parameters are used solely to initialize the field in the
initializer list, and there is no real shadowing confusion.

There is a new warning under -Wshadow called
-Wshadow-field-in-constructor-modified. It attempts to find
modifications of such constructor parameters that probably intended to
modify the field.

It has some false negatives, though, so there is another warning group,
-Wshadow-field-in-constructor, which always warns on this special case.
For users who just want the old behavior and don't care about these fine
grained groups, we have a new warning group called -Wshadow-all that
activates everything.

Fixes PR16088.

Reviewers: rsmith

Subscribers: cfe-commits

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

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

8 years ago[Sema] Fix a crash that occurs when a variable template is initialized
Akira Hatanaka [Thu, 28 Apr 2016 23:50:12 +0000 (23:50 +0000)]
[Sema] Fix a crash that occurs when a variable template is initialized
with a generic lambda.

This patch fixes Sema::InstantiateVariableInitializer to switch to the
context of the variable before instantiating its initializer, which is
necessary to set the correct type for VarTemplateSpecializationDecl.

This is the first part of the patch that was reviewed here:
http://reviews.llvm.org/D19175

rdar://problem/23440346

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

8 years agoDifferential Revision: http://reviews.llvm.org/D19687
Sriraman Tallam [Thu, 28 Apr 2016 22:34:00 +0000 (22:34 +0000)]
Differential Revision: http://reviews.llvm.org/D19687

Set module flag PIELevel. Simplify code that sets PICLevel flag.

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

8 years ago[clang][AVX512][Builtin] Adding intrinsics for the SAD instruction set.
Michael Zuckerman [Thu, 28 Apr 2016 21:21:08 +0000 (21:21 +0000)]
[clang][AVX512][Builtin] Adding intrinsics for the SAD instruction set.

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

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

8 years agoOne more fix for use of invalid PresumedLocs missed by r267914.
Richard Smith [Thu, 28 Apr 2016 19:54:51 +0000 (19:54 +0000)]
One more fix for use of invalid PresumedLocs missed by r267914.

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

8 years ago[analyzer] Add path note for localizability checker.
Devin Coughlin [Thu, 28 Apr 2016 19:44:40 +0000 (19:44 +0000)]
[analyzer] Add path note for localizability checker.

Add a path note indicating the location of the non-localized string
literal in NonLocalizedStringChecker.

rdar://problem/25981525

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

8 years agoFix use of uninitialized value exposed by r267802. Accessors of an invalid
Richard Smith [Thu, 28 Apr 2016 18:26:32 +0000 (18:26 +0000)]
Fix use of uninitialized value exposed by r267802. Accessors of an invalid
PresumedLoc should not be called.

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

8 years agoMake the test exercise all paths modified in r267746.
Paul Robinson [Thu, 28 Apr 2016 17:52:28 +0000 (17:52 +0000)]
Make the test exercise all paths modified in r267746.

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

8 years ago[OpenCL] Fix bug in mergeTypes which causes equivalent types treated as different.
Yaxun Liu [Thu, 28 Apr 2016 17:34:57 +0000 (17:34 +0000)]
[OpenCL] Fix bug in mergeTypes which causes equivalent types treated as different.

When comparing unqualified types, canonical types should be used, otherwise equivalent types may be treated as different type.

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

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

8 years agoDebug info: Apply an artificial debug location to __cyg_profile_func.* calls.
Adrian Prantl [Thu, 28 Apr 2016 17:21:56 +0000 (17:21 +0000)]
Debug info: Apply an artificial debug location to __cyg_profile_func.* calls.
The LLVM Verifier expects all inlinable calls in debuggable functions to
have a location.

rdar://problem/25818489

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

8 years agoRe-apply r267784, r267824 and r267830.
Peter Collingbourne [Thu, 28 Apr 2016 17:09:37 +0000 (17:09 +0000)]
Re-apply r267784, r267824 and r267830.

I have updated the compiler-rt tests.

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

8 years agoFix build.
Manuel Klimek [Thu, 28 Apr 2016 14:28:19 +0000 (14:28 +0000)]
Fix build.

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

8 years agoReland r267691 fixing PR27535.
Vassil Vassilev [Thu, 28 Apr 2016 14:13:28 +0000 (14:13 +0000)]
Reland r267691 fixing PR27535.

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

8 years agoAdd accidentally dropped test to r267880.
Tim Northover [Thu, 28 Apr 2016 14:01:49 +0000 (14:01 +0000)]
Add accidentally dropped test to r267880.

Forgot "git add".

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

8 years agoARMv7k: define __ARM_PCS_VFP since we're hard-float.
Tim Northover [Thu, 28 Apr 2016 13:59:55 +0000 (13:59 +0000)]
ARMv7k: define __ARM_PCS_VFP since we're hard-float.

It's a little debateable because we're not truly AAPCS, so I'm
certainly not going to define __ARM_PCS, but __ARM_PCS_VFP seems to be
really an "hard-float" define, which is a useful thing to have.

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

8 years ago[SystemZ] Support Swift calling convention
Bryan Chan [Thu, 28 Apr 2016 13:56:43 +0000 (13:56 +0000)]
[SystemZ] Support Swift calling convention

Summary:
Port rL265324 to SystemZ to allow using the 'swiftcall' attribute on that architecture.

Depends on D19414.

Reviewers: kbarton, rjmccall, uweigand

Subscribers: cfe-commits

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

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

8 years agoFix spuriously dematerializing reference bug. Fixes PR26612.
Manuel Klimek [Thu, 28 Apr 2016 13:37:45 +0000 (13:37 +0000)]
Fix spuriously dematerializing reference bug. Fixes PR26612.

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

8 years ago[Clang][BuiltIn][AVX512] Adding intrinsics fot align{d|q} and palignr instruction set
Michael Zuckerman [Thu, 28 Apr 2016 12:47:30 +0000 (12:47 +0000)]
[Clang][BuiltIn][AVX512] Adding intrinsics fot align{d|q} and palignr instruction set

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

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

8 years ago[OPENMP 4.5] Initial codegen for 'taskloop simd' directive.
Alexey Bataev [Thu, 28 Apr 2016 12:14:51 +0000 (12:14 +0000)]
[OPENMP 4.5] Initial codegen for 'taskloop simd' directive.

OpenMP 4.5 defines 'taskloop simd' directive, which is combined
directive for 'taskloop' and 'simd' directives. Patch adds initial
codegen support for this directive and its 2 basic clauses 'safelen' and
'simdlen'.

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

8 years agoRevert r267784, r267824 and r267830.
Benjamin Kramer [Thu, 28 Apr 2016 12:14:47 +0000 (12:14 +0000)]
Revert r267784, r267824 and r267830.

It makes compiler-rt tests fail if the gold plugin is enabled.

Revert "Rework interface for bitset-using features to use a notion of LTO visibility."
Revert "Driver: only produce CFI -fvisibility= error when compiling."
Revert "clang/test/CodeGenCXX/cfi-blacklist.cpp: Exclude ms targets. They would be non-cfi."

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

8 years agoRevert "[MS] Improved implementation of MS stack pragmas (vtordisp, *_seg)"
Denis Zobnin [Thu, 28 Apr 2016 11:32:10 +0000 (11:32 +0000)]
Revert "[MS] Improved implementation of MS stack pragmas (vtordisp, *_seg)"

This reverts commit r267866.

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

8 years agoPR27216: Only define __ARM_FEATURE_FMA when the target has VFPv4
Silviu Baranga [Thu, 28 Apr 2016 11:29:08 +0000 (11:29 +0000)]
PR27216: Only define __ARM_FEATURE_FMA when the target has VFPv4

Summary:
According to the ACLE spec, "__ARM_FEATURE_FMA is defined to 1 if
the hardware floating-point architecture supports fused floating-point
multiply-accumulate".

This changes clang's behaviour from emitting this macro for v7-A and v7-R
cores to only emitting it when the target has VFPv4 (and therefore support
for the floating point multiply-accumulate instruction).

Fixes PR27216

Reviewers: t.p.northover, rengolin

Subscribers: aemerson, rengolin, cfe-commits

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

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

8 years ago[MS] Improved implementation of MS stack pragmas (vtordisp, *_seg)
Denis Zobnin [Thu, 28 Apr 2016 10:13:18 +0000 (10:13 +0000)]
[MS] Improved implementation of MS stack pragmas (vtordisp, *_seg)

Rework implementation of several MS pragmas that use internal stack:
vtordisp, {bss|code|const|data}_seg.
This patch:
  1. Makes #pragma vtordisp use PragmaStack class as *_seg pragmas do;
  2. Fixes "#pragma vtordisp()" behavior: it shouldn't affect stack;
  3. Saves/restores the stacks on enter/exit a C++ method body.

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

8 years agoRevert "[MSVC] PR27337: allow static_cast from private base to derived for WTL"
Dmitry Polukhin [Thu, 28 Apr 2016 09:56:22 +0000 (09:56 +0000)]
Revert "[MSVC] PR27337: allow static_cast from private base to derived for WTL"

This reverts commit r267534.

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

8 years ago[OPENMP] Simplified interface for codegen of tasks, NFC.
Alexey Bataev [Thu, 28 Apr 2016 09:23:51 +0000 (09:23 +0000)]
[OPENMP] Simplified interface for codegen of tasks, NFC.

Reduced number of arguments in member functions of runtime support
library for task-based directives.

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

8 years ago[OPENMP 4.5] Codegen for 'grainsize/num_tasks' clauses of 'taskloop'
Alexey Bataev [Thu, 28 Apr 2016 09:15:06 +0000 (09:15 +0000)]
[OPENMP 4.5] Codegen for 'grainsize/num_tasks' clauses of 'taskloop'
directive.

OpenMP 4.5 defines 'taskloop' directive and 2 additional clauses
'grainsize' and 'num_tasks' for this directive. Patch adds codegen for
these clauses.
These clauses are generated as arguments of the '__kmpc_taskloop'
libcall and are encoded the following way:

void __kmpc_taskloop(ident_t *loc, int gtid, kmp_task_t *task, int if_val, kmp_uint64 *lb, kmp_uint64 *ub, kmp_int64 st, int nogroup,  int sched, kmp_uint64 grainsize, void *task_dup);

If 'grainsize' is specified, 'sched' argument must be set to '1' and
'grainsize' argument must be set to the value of the 'grainsize' clause.
If 'num_tasks' is specified, 'sched' argument must be set to '2' and
'grainsize' argument must be set to the value of the 'num_tasks' clause.
It is possible because these 2 clauses are mutually exclusive and can't
be used at the same time on the same directive.
If none of these clauses is specified, 'sched' argument must be set to
'0'.

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

8 years agoremoved redundant '#'
Eric Liu [Thu, 28 Apr 2016 07:52:06 +0000 (07:52 +0000)]
removed redundant '#'

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

8 years agoAddressed reviewer's post-submission comments from http://reviews.llvm.org/D18551.
Eric Liu [Thu, 28 Apr 2016 07:52:03 +0000 (07:52 +0000)]
Addressed reviewer's post-submission comments from http://reviews.llvm.org/D18551.

Summary: Make SourceManager in Environment, WhitespaceManager, and FormatTokenAnalyzer etc constant members.

Reviewers: djasper, klimek

Subscribers: cfe-commits, klimek

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

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

8 years agoAddressed review's comments.
Eric Liu [Thu, 28 Apr 2016 07:51:47 +0000 (07:51 +0000)]
Addressed review's comments.

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

8 years agoCGOpenMPRuntime.h: Prune extra comma in \param. [-Wdocumentation]
NAKAMURA Takumi [Thu, 28 Apr 2016 02:45:21 +0000 (02:45 +0000)]
CGOpenMPRuntime.h: Prune extra comma in \param. [-Wdocumentation]

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

8 years ago[analyzer] Move Checkers.inc to clang/include/...
Chih-Hung Hsieh [Thu, 28 Apr 2016 01:09:09 +0000 (01:09 +0000)]
[analyzer] Move Checkers.inc to clang/include/...

Simplify sharing of Checkers.inc with other files like ClangTidy.cpp.

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

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

8 years agoclang/test/CodeGenCXX/cfi-blacklist.cpp: Exclude ms targets. They would be non-cfi.
NAKAMURA Takumi [Thu, 28 Apr 2016 00:53:30 +0000 (00:53 +0000)]
clang/test/CodeGenCXX/cfi-blacklist.cpp: Exclude ms targets. They would be non-cfi.

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

8 years agoDriver: only produce CFI -fvisibility= error when compiling.
Peter Collingbourne [Thu, 28 Apr 2016 00:18:30 +0000 (00:18 +0000)]
Driver: only produce CFI -fvisibility= error when compiling.

The -fvisibility= flag only affects compile jobs, so there's no need to
error out because of it if we aren't compiling (e.g. if we are only linking).

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

8 years ago[OpenMP] Code generation for target exit data directive
Samuel Antao [Wed, 27 Apr 2016 23:14:30 +0000 (23:14 +0000)]
[OpenMP] Code generation for target exit data directive

Summary:
This patch adds support for the target exit data directive code generation.

Given that, apart from the employed runtime call, target exit data requires the same code generation pattern as target enter data, the OpenMP codegen entry point was renamed and reused for both.

Reviewers: hfinkel, carlo.bertolli, arpith-jacob, kkwli0, ABataev

Subscribers: cfe-commits, fraggamuffin, caomhin

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

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

8 years ago[OpenMP] Code generation for target enter data directive
Samuel Antao [Wed, 27 Apr 2016 23:07:29 +0000 (23:07 +0000)]
[OpenMP] Code generation for target enter data directive

Summary: This patch adds support for the target enter data directive code generation.

Reviewers: hfinkel, carlo.bertolli, arpith-jacob, kkwli0, ABataev

Subscribers: cfe-commits, fraggamuffin, caomhin

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

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

8 years ago[OpenMP] Code generation for target data directive
Samuel Antao [Wed, 27 Apr 2016 22:58:19 +0000 (22:58 +0000)]
[OpenMP] Code generation for target data directive

Summary:
This patch adds support for the target data directive code generation.

Part of the already existent functionality related with data maps is moved to a new function so that it could be reused.

Reviewers: hfinkel, carlo.bertolli, arpith-jacob, kkwli0, ABataev

Subscribers: cfe-commits, fraggamuffin, caomhin

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

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

8 years ago[OpenMP] Map clause codegeneration.
Samuel Antao [Wed, 27 Apr 2016 22:40:57 +0000 (22:40 +0000)]
[OpenMP] Map clause codegeneration.

Summary:
Implement codegen for the map clause. All the new list items in 4.5 specification are supported.

Fix bug in the generation of array sections that was exposed by some of the map clause tests: for pointer types the offsets have to be calculated from the pointee not the pointer.

Reviewers: hfinkel, kkwli0, carlo.bertolli, arpith-jacob, ABataev

Subscribers: ABataev, cfe-commits, caomhin, fraggamuffin

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

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

8 years agoRemove unused LangOpts private variable in HeaderSearch.
Samuel Antao [Wed, 27 Apr 2016 22:28:32 +0000 (22:28 +0000)]
Remove unused LangOpts private variable in HeaderSearch.

Was causing warnings during the build.

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

8 years agoMinor test simplification (per David Blaikie suggestion).
Paul Robinson [Wed, 27 Apr 2016 22:18:46 +0000 (22:18 +0000)]
Minor test simplification (per David Blaikie suggestion).

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

8 years ago[modules] When diagnosing a missing module import, suggest adding a #include if
Richard Smith [Wed, 27 Apr 2016 21:57:05 +0000 (21:57 +0000)]
[modules] When diagnosing a missing module import, suggest adding a #include if
the current language doesn't have an import syntax and we can figure out a
suitable file to include.

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

8 years agoRevert unnecessary tblgen change.
Peter Collingbourne [Wed, 27 Apr 2016 20:49:44 +0000 (20:49 +0000)]
Revert unnecessary tblgen change.

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

8 years agoRework interface for bitset-using features to use a notion of LTO visibility.
Peter Collingbourne [Wed, 27 Apr 2016 20:39:53 +0000 (20:39 +0000)]
Rework interface for bitset-using features to use a notion of LTO visibility.

Bitsets, and the compiler features they rely on (vtable opt, CFI),
only have visibility within the LTO'd part of the linkage unit. Therefore,
only enable these features for classes with hidden LTO visibility. This
notion is based on object file visibility or (on Windows)
dllimport/dllexport attributes.

We provide the [[clang::lto_visibility_public]] attribute to override the
compiler's LTO visibility inference in cases where the class is defined
in the non-LTO'd part of the linkage unit, or where the ABI supports
calling classes derived from abstract base classes with hidden visibility
in other linkage units (e.g. COM on Windows).

If the cross-DSO CFI mode is enabled, bitset checks are emitted even for
classes with public LTO visibility, as that mode uses a separate mechanism
to cause bitsets to be exported.

This mechanism replaces the whole-program-vtables blacklist, so remove the
-fwhole-program-vtables-blacklist flag.

Because __declspec(uuid()) now implies [[clang::lto_visibility_public]], the
support for the special attr:uuid blacklist entry is removed.

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

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

8 years agoSet the default C standard to C99 when targeting the PS4.
Sunil Srivastava [Wed, 27 Apr 2016 19:53:03 +0000 (19:53 +0000)]
Set the default C standard to C99 when targeting the PS4.

Patch by Douglas Yung!

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

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

8 years agoCall TargetMachine::addEarlyAsPossiblePasses from BackendUtil.
Justin Lebar [Wed, 27 Apr 2016 19:12:56 +0000 (19:12 +0000)]
Call TargetMachine::addEarlyAsPossiblePasses from BackendUtil.

Summary:
As of D18614, TargetMachine exposes a hook to add a set of passes that should
be run as early as possible.  Invoke this hook from clang when setting up the
pass manager.

Reviewers: chandlerc

Subscribers: rnk, cfe-commits, tra

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

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

8 years ago[CMake] On Darwin bootstrap LTO builds set DYLD_LIBRARY_PATH instead of using llvm-ar
Chris Bieneman [Wed, 27 Apr 2016 18:52:48 +0000 (18:52 +0000)]
[CMake] On Darwin bootstrap LTO builds set DYLD_LIBRARY_PATH instead of using llvm-ar

llvm-ar isn't really supported for Darwin, instead the host tools will load libLTO, so we can use the just-built libLTO.

This actually makes Darwin bootstrap builds a little faster because you don't need to build llvm-ar before starting the next stage.

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

8 years agoPR21823: 'nodebug' attribute on global/static variables.
Paul Robinson [Wed, 27 Apr 2016 17:37:12 +0000 (17:37 +0000)]
PR21823: 'nodebug' attribute on global/static variables.

Make 'nodebug' on a global/static variable suppress all debug info
for the variable. Previously it would only suppress info for the
associated initializer function, if any.

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

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

8 years agoRevert r267691, it caused PR27535.
Nico Weber [Wed, 27 Apr 2016 17:26:08 +0000 (17:26 +0000)]
Revert r267691, it caused PR27535.

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

8 years agoModule debugging: Fix the DWO filename for PCH in a relative path.
Adrian Prantl [Wed, 27 Apr 2016 17:06:22 +0000 (17:06 +0000)]
Module debugging: Fix the DWO filename for PCH in a relative path.
PCH in a relative location had a redundant relative path on the DWO
filename and the DW_AT_compilation_dir.
This patch fixes this and adds testcases for PCH in the same directory,
in a relative, and an absolute location.

rdar://problem/25537947

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

8 years ago[Clang][Builtin][AVX512] Adding intrisnics for the vpconflict{q|d} instruction set
Michael Zuckerman [Wed, 27 Apr 2016 15:35:13 +0000 (15:35 +0000)]
[Clang][Builtin][AVX512] Adding intrisnics for the vpconflict{q|d} instruction set

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

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

8 years agoExpose cxx constructor and method properties through libclang and python bindings.
Jonathan Coe [Wed, 27 Apr 2016 12:48:25 +0000 (12:48 +0000)]
Expose cxx constructor and method properties through libclang and python bindings.

Summary:
I have exposed the following function through libclang and the clang.cindex python bindings:

clang_CXXConstructor_isConvertingConstructor,
clang_CXXConstructor_isCopyConstructor,
clang_CXXConstructor_isDefaultConstructor,
clang_CXXConstructor_isMoveConstructor,
clang_CXXMethod_isDefaulted

I need (some of) these methods for a C++ code model I am building in Python to drive a code generator.

Reviewers: compnerd, skalinichev

Subscribers: cfe-commits

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

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

8 years ago[Clang][BuiltIn][AVX512] Adding intrinsics without mask for VBROADCAST and VPBROADCAS...
Michael Zuckerman [Wed, 27 Apr 2016 11:43:14 +0000 (11:43 +0000)]
[Clang][BuiltIn][AVX512] Adding intrinsics without mask for VBROADCAST and VPBROADCAST instruction set .

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

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

8 years ago[OPENMP] Fix crash on initialization of classes with no init clause in
Alexey Bataev [Wed, 27 Apr 2016 11:38:05 +0000 (11:38 +0000)]
[OPENMP] Fix crash on initialization of classes with no init clause in
declare reductions.

If reduction clause is applied to instance of class with user-defined
reduction operation without initialization clause, it may cause a crash.
Patch fixes this issue.

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

8 years ago[modules] Fix Decl's Used invariant.
Vassil Vassilev [Wed, 27 Apr 2016 10:46:06 +0000 (10:46 +0000)]
[modules] Fix Decl's Used invariant.

The Decl::isUsed has a value for every decl. In non-module builds it is very
difficult (but possible) to break this invariant but when we walk up the redecl
chain we find the neccessary information.

When deserializing the decls from a module it is much more difficult to update
correctly this invariant. The patch centralizes the information whether a decl
is used in the canonical decl marking the entire entity as being used.

Fixes https://llvm.org/bugs/show_bug.cgi?id=27401

Patch by Cristina Cristescu and me.

Thanks to Richard Smith who helped to debug and understand the issue!

Reviewed by Richard Smith.

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

8 years ago[Clang][BuiltIn][AVX512]Adding intrinsics for vmovntdqa vmovntpd vmovntps instruction set
Michael Zuckerman [Wed, 27 Apr 2016 10:44:15 +0000 (10:44 +0000)]
[Clang][BuiltIn][AVX512]Adding intrinsics for vmovntdqa vmovntpd vmovntps instruction set

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

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

8 years ago[OPENMP] Fix for codegen of captured variables in inlined directives.
Alexey Bataev [Wed, 27 Apr 2016 07:56:03 +0000 (07:56 +0000)]
[OPENMP] Fix for codegen of captured variables in inlined directives.

Currently there is a problem with codegen of inlined directives inside
lambdas, it may cause a crash during codegen because of incorrect
capturing of variables. Patch fixes this problem.

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

8 years agoUpdated doxygen comments for intrinsics.
Ekaterina Romanova [Wed, 27 Apr 2016 07:14:02 +0000 (07:14 +0000)]
Updated doxygen comments for intrinsics.
(1) Removed \code.. \endcode tags around the instruction name. This matches the doxygen format for all other intrinsics.
(2) Did a better formatting for the comments (to fit into 80 columns more compactly).

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

8 years agoModule debugging: Add an assertion.
Adrian Prantl [Tue, 26 Apr 2016 23:42:43 +0000 (23:42 +0000)]
Module debugging: Add an assertion.

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

8 years agoPR27513: When determining which declaration to put into an exported lookup
Richard Smith [Tue, 26 Apr 2016 23:40:43 +0000 (23:40 +0000)]
PR27513: When determining which declaration to put into an exported lookup
table for a module / PCH, never map from a normal declaration of a class to an
injected-class-name declaration (or vice versa). Those declarations live in
distinct lookup tables and should not be confused.

We really shouldn't be using a CXXRecordDecl to represent an
injected-class-name in the first place; I've filed PR27532 so we don't forget.

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

8 years agoModule debugging: Also correctly handle typedef'd foward-declared members.
Adrian Prantl [Tue, 26 Apr 2016 23:37:38 +0000 (23:37 +0000)]
Module debugging: Also correctly handle typedef'd foward-declared members.
Thanks again to Richard Smith for pointing this out.

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

8 years agoCheck 'r' and 'y specifiers of freebsd_kernel_printf format strings on PS4
Sunil Srivastava [Tue, 26 Apr 2016 23:19:00 +0000 (23:19 +0000)]
Check 'r' and 'y specifiers of freebsd_kernel_printf format strings on PS4

This is an addendum to r229921.

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

8 years agoModule debugging: Add testcase for member classes of class template specializations.
Adrian Prantl [Tue, 26 Apr 2016 21:58:23 +0000 (21:58 +0000)]
Module debugging: Add testcase for member classes of class template specializations.

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

8 years agoModule debugging: Use the definition to determine module-defined types.
Adrian Prantl [Tue, 26 Apr 2016 21:58:18 +0000 (21:58 +0000)]
Module debugging: Use the definition to determine module-defined types.

Follow-up to r267464. Thanks to Richard Smith for pointing this out!

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

8 years agoTest commit
Erik Pilkington [Tue, 26 Apr 2016 20:55:48 +0000 (20:55 +0000)]
Test commit

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