]> granicus.if.org Git - clang/log
clang
9 years agoThis patch adds support for the vector quadword add/sub instructions introduced
Kit Barton [Mon, 25 May 2015 15:52:45 +0000 (15:52 +0000)]
This patch adds support for the vector quadword add/sub instructions introduced
in POWER8.

These are the Clang-related changes for http://reviews.llvm.org/D9081

vadduqm
vaddeuqm
vaddcuq
vaddecuq
vsubuqm
vsubeuqm
vsubcuq
vsubecuq
All builtins are added in altivec.h, and guarded with the POWER8_VECTOR and
powerpc64 macros.

http://reviews.llvm.org/D9903

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

9 years agoBug fix for PR23577 (https://llvm.org/bugs/show_bug.cgi?id=23577#c0).
Alexander Musman [Mon, 25 May 2015 11:21:20 +0000 (11:21 +0000)]
Bug fix for PR23577 (https://llvm.org/bugs/show_bug.cgi?id=23577#c0).
"1-4" specifiers are returned as numeric constants, not identifiers,
and should be treated as such. Currently pragma handler incorrectly
assumes that they are returned as identifiers.

Patch by Andrey Bokhanko.

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

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

9 years ago[Driver] Unbreak hexagon build bots
David Majnemer [Sat, 23 May 2015 19:23:55 +0000 (19:23 +0000)]
[Driver] Unbreak hexagon build bots

AddHexagonTargetArgs didn't respect the driver flags by unconditionally
pushing -fno-signed-char.  Instead, add Hexagon handling to
isSignedCharDefault.

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

9 years ago[Driver] Handle -fno-signed-char and -fno-unsigned-char
David Majnemer [Sat, 23 May 2015 18:48:37 +0000 (18:48 +0000)]
[Driver] Handle -fno-signed-char and -fno-unsigned-char

GCC maps -fno-unsigned-char to -fsigned-char and -fno-signed-char to
-funsigned-char.

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

9 years ago[Sema] Don't use dyn_cast to detect an AtomicType
David Majnemer [Sat, 23 May 2015 01:32:17 +0000 (01:32 +0000)]
[Sema] Don't use dyn_cast to detect an AtomicType

An AtomicType might be hidden behind arbitrary levels of typedefs.
getAs<> will reliably walk through the sugar to get the underlying
AtomicType.

This fixes PR23638.

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

9 years agoThis reverts commit r238064 and r238055.
Rafael Espindola [Sat, 23 May 2015 00:30:33 +0000 (00:30 +0000)]
This reverts commit r238064 and r238055.

They depend on a reverted llvm commit.

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

9 years agoadd missing include for TargetRecip
Sanjay Patel [Fri, 22 May 2015 22:59:27 +0000 (22:59 +0000)]
add missing include for TargetRecip

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

9 years agoCodeGen: Avoid a reserved name and fix the naming style of some arguments. NFC
Justin Bogner [Fri, 22 May 2015 22:16:55 +0000 (22:16 +0000)]
CodeGen: Avoid a reserved name and fix the naming style of some arguments. NFC

It's undefined to use reserved names like _Diags. Fix up the other
parameter names to consistently use a modern style while I'm here.

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

9 years agoadd the -mrecip driver flag and process its options
Sanjay Patel [Fri, 22 May 2015 21:42:10 +0000 (21:42 +0000)]
add the -mrecip driver flag and process its options

This is the front-end counterpart to D8982 (LLVM r238051).

The -mrecip option interface is based on maintaining compatibility with gcc:
https://gcc.gnu.org/onlinedocs/gcc-4.9.2/gcc/i386-and-x86-64-Options.html#index-mrecip_003dopt-1627
https://gcc.gnu.org/onlinedocs/gcc-4.9.2/gcc/RS_002f6000-and-PowerPC-Options.html#index-mrecip-2289

...while adding more functionality (allowing users to specify the number of refinement steps for each
estimate type).

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

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

9 years agoMake unique section names the default again.
Rafael Espindola [Fri, 22 May 2015 20:44:03 +0000 (20:44 +0000)]
Make unique section names the default again.

Using non unique names found a bug in the ICF inplementation in gold:

https://sourceware.org/bugzilla/show_bug.cgi?id=18440

This reverts commit r234143.

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

9 years agoUse profile and version parsers from ARMTargetParser
Renato Golin [Fri, 22 May 2015 18:18:25 +0000 (18:18 +0000)]
Use profile and version parsers from ARMTargetParser

Now that ARMTargetParser can parse profile and version numbers,
use them instead of the local implementation.

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

9 years agoAdd clarifying note that sampling-based profiles cannot be used for code coverage.
Diego Novillo [Fri, 22 May 2015 16:05:07 +0000 (16:05 +0000)]
Add clarifying note that sampling-based profiles cannot be used for code coverage.

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

9 years agoUpdating the documentation to include an operator! for negative capability support.
Aaron Ballman [Fri, 22 May 2015 13:36:48 +0000 (13:36 +0000)]
Updating the documentation to include an operator! for negative capability support.

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

9 years agoAdding new AST matcher: isConstexpr
Szabolcs Sipos [Fri, 22 May 2015 11:35:50 +0000 (11:35 +0000)]
Adding new AST matcher: isConstexpr

It matches constexpr variable and function declarations.

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

9 years ago[OPENMP] Prepare codegen for privates in tasks for non-capturing of privates in Captu...
Alexey Bataev [Fri, 22 May 2015 08:56:35 +0000 (08:56 +0000)]
[OPENMP] Prepare codegen for privates in tasks for non-capturing of privates in CapturedStmt.

Reworked codegen for privates in tasks:

call @kmpc_omp_task_alloc();
...
call @kmpc_omp_task(task_proxy);

void map_privates(.privates_rec. *privs, type1 ** priv1_ref, ..., typen **privn_ref) {
  *priv1_ref = &privs->private1;
  ...
  *privn_ref = &privs->privaten;
  ret void
}

i32 task_entry(i32 ThreadId, i32 PartId, void* privs, void (void*, ...) map_privates, shareds* captures) {
  type1 **priv1;
  ...
  typen **privn;
  call map_privates(privs, priv1, ..., privn);
  <Task body with priv1, .., privn instead of the captured variables>.
  ret i32
}

i32 task_proxy(i32 ThreadId, kmp_task_t_with_privates *tt) {
  call task_entry(ThreadId, tt->task_data.PartId, &tt->privates, map_privates, tt->task_data.shareds);
}

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

9 years agoModernize some doc comments. NFC
Justin Bogner [Fri, 22 May 2015 06:48:13 +0000 (06:48 +0000)]
Modernize some doc comments. NFC

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

9 years ago[ItaniumMangle] Fix a typo.
David Majnemer [Fri, 22 May 2015 05:54:24 +0000 (05:54 +0000)]
[ItaniumMangle] Fix a typo.

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

9 years ago[Sema] Don't crash on out-of-line virtual constexpr functions
David Majnemer [Fri, 22 May 2015 05:49:41 +0000 (05:49 +0000)]
[Sema] Don't crash on out-of-line virtual constexpr functions

The method wasn't an overrider but didn't have 'virtual' textually
written because our CXXMethodDecl was an out-of-line definition.  Make
sure we use the canonical decl instead.

This fixes PR23629.

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

9 years agoApply existing checks to C++1Z (has_feature_cxx0x); NFC
Faisal Vali [Fri, 22 May 2015 02:57:28 +0000 (02:57 +0000)]
Apply existing checks to C++1Z (has_feature_cxx0x); NFC

This applies the existing checks in has_feature_cxx0x to -std=c++1z.
In addition, references to C++1y are updated to refer to C++14

No functional change. Testing of __has_feature for C++1z features
is not added in this change.

Patch by Hubert Tong!

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

9 years ago[OpenMP] Test AVX default SIMD alignment. NFC.
Ahmed Bougacha [Fri, 22 May 2015 02:51:49 +0000 (02:51 +0000)]
[OpenMP] Test AVX default SIMD alignment.  NFC.

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

9 years ago[CodeGen] Use TargetInfo::getABI() throughout X86*TargetCodeGenInfo.
Ahmed Bougacha [Fri, 22 May 2015 02:25:58 +0000 (02:25 +0000)]
[CodeGen] Use TargetInfo::getABI() throughout X86*TargetCodeGenInfo.

We already have the ABI, we don't need a "HasAVX" flag.
This will also makes it easier to add an AVX512 ABI.

No functional change intended.

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

9 years agoFix assertion when assigning to object in OpenCL constant address space.
Richard Smith [Fri, 22 May 2015 01:14:39 +0000 (01:14 +0000)]
Fix assertion when assigning to object in OpenCL constant address space.

Patch by John Garvin!

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

9 years ago"This adds -fconcepts-ts as a cc1 option for enabling the
Faisal Vali [Fri, 22 May 2015 01:11:10 +0000 (01:11 +0000)]
"This adds -fconcepts-ts as a cc1 option for enabling the
in-progress implementation of the Concepts TS. The recommended feature
test macro __cpp_experimental_concepts is set to 1 (as opposed to
201501) to indicate that the feature is enabled, but the
implementation is incomplete.

The link to the Concepts TS in cxx_status is updated to refer to the
PDTS (N4377). Additional changes related to __has_feature and
__has_extension are to follow in a later change.

Relevant tests include:

test/Lexer/cxx-features.cpp

The test file is updated with testing of the C++14 + Concepts TS mode.
The expected behaviour is the same as that of the C++14 modes except
for the case of __cpp_experimental_concepts."

- Hubert Tong.

Being committed for Hubert (as per his understanding with Richard Smith) as we start work on the concepts-ts following our preliminary strategy session earlier today.

The patch is tiny and seems quite standard.

Thanks Hubert!

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

9 years agoDebug info: Adapt to new DIBuilder interface.
Adrian Prantl [Thu, 21 May 2015 20:37:26 +0000 (20:37 +0000)]
Debug info: Adapt to new DIBuilder interface.

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

9 years agoItanium mangler: don't trip an assertion when unresolved members have implicit bases.
Douglas Gregor [Thu, 21 May 2015 18:28:18 +0000 (18:28 +0000)]
Itanium mangler: don't trip an assertion when unresolved members have implicit bases.

When we find a member of the current instantation, the base of the
unresolved member expression is implicit; use nullptr for such
bases. This is not a change in behavior: the AST already contains null
in such cases, so non-asserts builds do the right thing already. Fixes
rdar://problem/21020559.

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

9 years agoclang-format: [JS] Better support for fat arrows.
Manuel Klimek [Thu, 21 May 2015 12:23:34 +0000 (12:23 +0000)]
clang-format: [JS] Better support for fat arrows.

Assigns a token type (TT_JsFatArrow) to => tokens, and uses that to
more easily recognize and format fat arrow functions.
Improves function parsing to better recognize formal parameter
lists and return type declarations.
Recognizes arrow functions and parse function bodies as child blocks.

Patch by Martin Probst.

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

9 years ago[ARM] Restructure cpu handling in the driver to mostly use the triple
John Brawn [Thu, 21 May 2015 12:19:49 +0000 (12:19 +0000)]
[ARM] Restructure cpu handling in the driver to mostly use the triple

Using the target cpu to determine some behaviour is sprinkled in
several places in the driver, but in almost all the information that
is needed can be found in the triple. Restructure things so that the
triple is used, and the cpu is only used if the exact cpu name is
needed.

Also add a check that the -mcpu argument is valid, and correct the
-march argument checking so that it handles -march=native correctly. I
would have liked to move these checks into the computation of the
triple, but the triple is calculated several times in several places
and that would lead to multiple error messages for the same thing.

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

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

9 years ago[OPENMP] Fixed codegen for parameters privatization.
Alexey Bataev [Thu, 21 May 2015 09:47:46 +0000 (09:47 +0000)]
[OPENMP] Fixed codegen for parameters privatization.

For parameters we shall take a derived type of parameters, not the original one.

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

9 years ago[OPENMP] Fixed codegen for lastprivate LCV in worksharing constructs.
Alexey Bataev [Thu, 21 May 2015 07:59:51 +0000 (07:59 +0000)]
[OPENMP] Fixed codegen for lastprivate LCV in worksharing constructs.

If loop control variable in a worksharing construct is marked as lastprivate, we should copy last calculated value of private counter back to original variable.

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

9 years agoAvoid using a C++11 library feature not present in libstdc++4.7.
Richard Smith [Thu, 21 May 2015 01:26:53 +0000 (01:26 +0000)]
Avoid using a C++11 library feature not present in libstdc++4.7.

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

9 years ago[modules] If we re-enter a submodule from within itself (when submodule
Richard Smith [Thu, 21 May 2015 01:20:10 +0000 (01:20 +0000)]
[modules] If we re-enter a submodule from within itself (when submodule
visibility is enabled) or leave and re-enter it, restore the macro and module
visibility state from last time we were in that submodule.

This allows mutually-#including header files to stand a chance at being
modularized with local visibility enabled.

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

9 years ago[Driver] Improve unused-argument diagnostic for extra sanitizer features.
Alexey Samsonov [Thu, 21 May 2015 01:07:52 +0000 (01:07 +0000)]
[Driver] Improve unused-argument diagnostic for extra sanitizer features.

Don't print unused-argument warning for sanitizer-specific feature flag
if this sanitizer was eanbled, and later disabled in the command line.
For example, now:
  clang -fsanitize=address -fsanitize-coverage=bb -fno-sanitize=address a.cc
doesn't print warning, but
  clang -fsanitize-coverage=bb
does. Same holds for -fsanitize-address-field-padding= and
-fsanitize-memory-track-origins= flags.

Fixes PR23604.

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

9 years agoRename a helper template function to 'bytes' to avoid a C++17 STL conflict
Reid Kleckner [Thu, 21 May 2015 00:13:09 +0000 (00:13 +0000)]
Rename a helper template function to 'bytes' to avoid a C++17 STL conflict

MSVC 2015 includes the std::data() template function added to C++17. ADL
causes both cl.exe and clang-cl to prefer std::data over our static
helper here, and we get errors about converting int64_t* to StringRef.
Renaming it to bytes avoids the ambiguity.

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

9 years agoWork around overloading bug in MSVC 2015
Reid Kleckner [Thu, 21 May 2015 00:12:53 +0000 (00:12 +0000)]
Work around overloading bug in MSVC 2015

MSVC 2015 appears to be unable to find the correct operator== here. I
haven't yet filed a bug with Microsoft as I've been unable to create a
reduced test case.

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

9 years agoCheck for bool-like conversion in conditional expressions.
Richard Trieu [Wed, 20 May 2015 23:29:18 +0000 (23:29 +0000)]
Check for bool-like conversion in conditional expressions.

Add a check for bool-like conversions for the condition expression of
conditional operators.  This is similiar to the checking of condition
expressions of if statements, for-loops, while-loops, and do-while loops.
Specificially, this is to fix the problem of assert("message") not triggering
-Wstring-conversion when the assert macro uses a conditional operator.

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

9 years ago[OpenMP] Make default OpenMP library (the one selected with just -fopenmp)
Richard Smith [Wed, 20 May 2015 22:48:44 +0000 (22:48 +0000)]
[OpenMP] Make default OpenMP library (the one selected with just -fopenmp)
configurable in the CMake build. There shouldn't be any change in default
behavior.

Derived from a patch by Daniel Jasper!

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

9 years agoEvaluate union cast subexpressions when the cast value is unused
Reid Kleckner [Wed, 20 May 2015 21:59:25 +0000 (21:59 +0000)]
Evaluate union cast subexpressions when the cast value is unused

Fixes PR23597.

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

9 years agoRefactored some common functionality into MaybeParseMicrosoftDeclSpecs; NFC.
Aaron Ballman [Wed, 20 May 2015 20:58:33 +0000 (20:58 +0000)]
Refactored some common functionality into MaybeParseMicrosoftDeclSpecs; NFC.

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

9 years ago[CodeGen] Check x86_64-arguments.c tests on AVX as well. NFC.
Ahmed Bougacha [Wed, 20 May 2015 18:39:16 +0000 (18:39 +0000)]
[CodeGen] Check x86_64-arguments.c tests on AVX as well.  NFC.

We used to only check the differing tests on AVX, but we might
as well check all of them.

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

9 years ago[modules] Support merging a parsed default argument with an imported hidden one for...
Richard Smith [Wed, 20 May 2015 18:24:21 +0000 (18:24 +0000)]
[modules] Support merging a parsed default argument with an imported hidden one for non-type and template template parameters too.

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

9 years ago[modules] Support merging a parsed default function/template argument with an importe...
Richard Smith [Wed, 20 May 2015 17:50:35 +0000 (17:50 +0000)]
[modules] Support merging a parsed default function/template argument with an imported but hidden one.

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

9 years agoUse Intrinsic::ID instead of unsigned. NFC.
Pete Cooper [Wed, 20 May 2015 17:17:45 +0000 (17:17 +0000)]
Use Intrinsic::ID instead of unsigned.  NFC.

This is after LLVM r237810 which made Function::getIntrinsicID() return an Intrinsic::ID.

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

9 years agoInstrProf: Change this triple back to %itanium_abi_triple
Justin Bogner [Wed, 20 May 2015 16:25:35 +0000 (16:25 +0000)]
InstrProf: Change this triple back to %itanium_abi_triple

In my rush to fix the linux bots in r237805, I accidentally committed
a change to the triple. Revert that part.

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

9 years agoInstrProf: Remove darwin-specific section names from this test
Justin Bogner [Wed, 20 May 2015 16:21:26 +0000 (16:21 +0000)]
InstrProf: Remove darwin-specific section names from this test

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

9 years agoInstrProf: Increment the profile counter for all types of destructor
Justin Bogner [Wed, 20 May 2015 16:16:23 +0000 (16:16 +0000)]
InstrProf: Increment the profile counter for all types of destructor

-fprofile-instr-generate does not emit counter increment intrinsics
for Dtor_Deleting and Dtor_Complete destructors with assigned
counters. This causes unnecessary [-Wprofile-instr-out-of-date]
warnings during profile-use runs even if the source has never been
modified since profile collection.

Patch by Betul Buyukkurt. Thanks!

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

9 years agoCodeGen: Remove some trailing whitespace. NFC
Justin Bogner [Wed, 20 May 2015 15:53:59 +0000 (15:53 +0000)]
CodeGen: Remove some trailing whitespace. NFC

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

9 years ago[OPENMP] Fix codegen for ordered loop directives.
Alexey Bataev [Wed, 20 May 2015 13:12:48 +0000 (13:12 +0000)]
[OPENMP] Fix codegen for ordered loop directives.

loops with ordered clause must be generated the same way as dynamic loops, but with static scheduleing.

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

9 years ago[MSVC] Handle out-of-line definition of static data member correctly (fix for http...
Alexey Bataev [Wed, 20 May 2015 11:57:02 +0000 (11:57 +0000)]
[MSVC] Handle out-of-line definition of static data member correctly (fix for http://llvm.org/PR21164), by Alexey Frolov

There are 3 cases of defining static const member:

initialized inside the class, not defined outside the class.
initialized inside the class, defined outside the class.
not initialized inside the class, defined outside the class.
Revision r213304 was supposed to fix the linkage problem of case (1), but mistakenly it made case (2) behave the same.
As a result, out-of-line definition of static data member is not handled correctly.
Proposed patch distinguishes between cases (1) and (2) and allows to properly emit static const members under â€“fms-compatibility option.

This fixes http://llvm.org/PR21164.
Differential Revision: http://reviews.llvm.org/D9850

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

9 years agoAllow skipping imports in the module visitor.
Manuel Klimek [Wed, 20 May 2015 10:29:23 +0000 (10:29 +0000)]
Allow skipping imports in the module visitor.

Skip imports when we know that we do not need to visit any imports
because we've already deserialized the redecls from a module.

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

9 years ago[X86] Add _mm256_set_m128 and its 5 variants.
Michael Kuperstein [Wed, 20 May 2015 07:46:52 +0000 (07:46 +0000)]
[X86] Add _mm256_set_m128 and its 5 variants.

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

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

9 years agoFix CGRecordLayouts description to say it maps clang types not llvm types
Yaron Keren [Wed, 20 May 2015 07:15:28 +0000 (07:15 +0000)]
Fix CGRecordLayouts description to say it maps clang types not llvm types
and de-duplicate data fields names from comments according to the coding
standard.

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

9 years ago[clang-cl] Map /GA to -ftls-model=local-exec
David Majnemer [Wed, 20 May 2015 04:39:56 +0000 (04:39 +0000)]
[clang-cl] Map /GA to -ftls-model=local-exec

The /GA switch informs the compiler that it may assume that all TLS
access refers to the executable's index: 0.

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

9 years ago[OPENMP] -fopenmp enables OpenMP support (fix for http://llvm.org/PR23492)
Alexey Bataev [Wed, 20 May 2015 04:24:19 +0000 (04:24 +0000)]
[OPENMP] -fopenmp enables OpenMP support (fix for http://llvm.org/PR23492)

-fopenmp turns on OpenMP support and links libiomp5 as OpenMP library. Also there is -fopenmp={libiomp5|libgomp} option that allows to override effect of -fopenmp and link libgomp library (if -fopenmp=libgomp is specified).
Differential Revision: http://reviews.llvm.org/D9736

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

9 years agoFix for aggregate copying of variable length arrays.
Alexey Bataev [Wed, 20 May 2015 03:46:04 +0000 (03:46 +0000)]
Fix for aggregate copying of variable length arrays.

Patch fixes codegen for aggregate copying of VLAs. Currently method CodeGenFunction::EmitAggregateCopy() does not support copying of VLAs. Patch checks if the size of the type is 0, then checks if the type is actually a variable-length array. Then it calculates total length for this array and calculates total size of the array in bytes:

<total number of elements in array> * aligned_sizeof(ElementType) (if copy assignment is requested).
If simple copying is requested, size is calculated like:

<total number of elements in array> * aligned_sizeof(ElementType) - aligned_sizeof(ElementType) + sizeof(ElementType).
memcpy() is used with this calculated size of the VLA.
Differential Revision: http://reviews.llvm.org/D9851

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

9 years ago[opaque pointer type] Pass the explicit call type when creating calls from LazyRuntim...
David Blaikie [Tue, 19 May 2015 21:31:34 +0000 (21:31 +0000)]
[opaque pointer type] Pass the explicit call type when creating calls from LazyRuntimeFunctions

The implicit conversion was causing issues for a helper being added that
would take an llvm::Function rather than an llvm::Value to make the
CallInst. Since we'll eventually need to specify the type of the call
explicitly anyway, fix these up to avoid the future ambiguity.

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

9 years agoRevert r237609 for now.
Richard Smith [Tue, 19 May 2015 19:58:11 +0000 (19:58 +0000)]
Revert r237609 for now.

glibc's headers use __need_* macros to selectively export parts of themselves
to each other. This requires us to enter those files repeatedly when building
a glibc module.

This can be unreverted once we have a better mechanism to deal with that
non-modular aspect of glibc (possibly some way to mark a header as "textual if
this macro is defined").

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

9 years agoFix 'CFG graph' typo. NFC
Jonathan Roelofs [Tue, 19 May 2015 18:51:56 +0000 (18:51 +0000)]
Fix 'CFG graph' typo. NFC

Patch by Jon Eyolfson!

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

9 years agoclang-format: Add space in function pointers with SpaceBeforeParens=Always
Anders Waldenborg [Tue, 19 May 2015 16:54:26 +0000 (16:54 +0000)]
clang-format: Add space in function pointers with SpaceBeforeParens=Always

"void (*my_function)(void)" should become "void (*my_function) (void)" when
SpaceBeforeParens is set to 'Always'

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

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

9 years ago[X86] Add _mm_broadcastsd_pd intrinsic
Michael Kuperstein [Tue, 19 May 2015 14:49:14 +0000 (14:49 +0000)]
[X86] Add _mm_broadcastsd_pd intrinsic

_mm_broadcastsd_pd is basically an alias for _mm_movedup_pd, however the alias is only available from AVX2 forward.

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

9 years ago[X86] Added _mm256_bslli_epi128 and _mm256_bsrli_epi128.
Michael Kuperstein [Tue, 19 May 2015 13:05:46 +0000 (13:05 +0000)]
[X86] Added _mm256_bslli_epi128 and _mm256_bsrli_epi128.

These two intrinsics are alternative names for _mm256_slli_si256 and _mm256_srli_si256, respectively.

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

9 years ago[OPENMP] Fixed codegen for copying/initialization of array variables/parameters.
Alexey Bataev [Tue, 19 May 2015 12:31:28 +0000 (12:31 +0000)]
[OPENMP] Fixed codegen for copying/initialization of array variables/parameters.
This modification generates proper copyin/initialization sequences for array variables/parameters. Before they were considered as pointers, not arrays.

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

9 years agoclang-format: Improve *-detection.
Daniel Jasper [Tue, 19 May 2015 12:29:27 +0000 (12:29 +0000)]
clang-format: Improve *-detection.

Before:
  S << a *(10);

After:
  S << a * (10);

This fixes llvm.org/PR16500.

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

9 years agoclang-format: Improve for-loop formatting.
Daniel Jasper [Tue, 19 May 2015 11:51:39 +0000 (11:51 +0000)]
clang-format: Improve for-loop formatting.

Before:
  for (SmallVectorImpl<TemplateIdAnnotationn *>::iterator I =
           Container.begin(),
                                                          E = Container.end();
       I != E; ++I)

After:
  for (SmallVectorImpl<TemplateIdAnnotationn *>::iterator
           I = Container.begin(),
           E = Container.end();
       I != E; ++I)

This fixes llvm.org/PR23544.

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

9 years agoclang-format: Support #include_next
Daniel Jasper [Tue, 19 May 2015 11:22:29 +0000 (11:22 +0000)]
clang-format: Support #include_next

Before:
  #include_next < test.h >

After:
  #include_next <test.h>

This fixes llvm.org/PR23500

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

9 years agoclang-format: Correctly detect casts to qualified types.
Daniel Jasper [Tue, 19 May 2015 11:18:39 +0000 (11:18 +0000)]
clang-format: Correctly detect casts to qualified types.

Before:
  ns::E f() { return (ns::E) - 1; }

After:
  ns::E f() { return (ns::E)-1; }

This fixes llvm.org/PR23503.

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

9 years agoclang-format: Fix regression caused by r237244.
Daniel Jasper [Tue, 19 May 2015 11:06:33 +0000 (11:06 +0000)]
clang-format: Fix regression caused by r237244.

Before:
  [call aaaaaaaa.aaaaaaaa.aaaaaaaa.aaaaaaaa.aaaaaaaa.aaaaaaaa.aaaaaaaa.aaaaaaaa.
          aaaaaaaa];

After:
  [call aaaaaaaa.aaaaaaaa.aaaaaaaa.aaaaaaaa.aaaaaaaa.aaaaaaaa.aaaaaaaa.aaaaaaaa
          .aaaaaaaa];

This merely papers over the fact that we aren't parsing ObjC method calls
correctly. Also, the indentation is weird.

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

9 years ago[OPENMP] Prohibit VLAs in 'private/firstprivate' clauses of 'task' directive.
Alexey Bataev [Tue, 19 May 2015 08:44:56 +0000 (08:44 +0000)]
[OPENMP] Prohibit VLAs in 'private/firstprivate' clauses of 'task' directive.
Currently runtime does not allow to support variably modified types for 'private' and 'firstprivate' clauses in 'task' directives.

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

9 years ago[OPENMP] Prohibit variably modified types in 'copyprivate' clause.
Alexey Bataev [Tue, 19 May 2015 08:19:24 +0000 (08:19 +0000)]
[OPENMP] Prohibit variably modified types in 'copyprivate' clause.
Runtime does not allow to work with VLAs in copyprivate clause.

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

9 years ago[OPENMP] Fixed analysis of function arguments and their data sharing attributes.
Alexey Bataev [Tue, 19 May 2015 07:46:42 +0000 (07:46 +0000)]
[OPENMP] Fixed analysis of function arguments and their data sharing attributes.
Added proper analysis for types of function arguments.

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

9 years agoSemaExprCXX.cpp: Try to fix \param in r237608. [-Wdocumentation]
NAKAMURA Takumi [Tue, 19 May 2015 06:47:23 +0000 (06:47 +0000)]
SemaExprCXX.cpp: Try to fix \param in r237608. [-Wdocumentation]

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

9 years agoPR20073: promote "dereference of 'void*'" from Extension to ExtWarn.
Richard Smith [Tue, 19 May 2015 01:41:12 +0000 (01:41 +0000)]
PR20073: promote "dereference of 'void*'" from Extension to ExtWarn.

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

9 years ago[AST] Put VarDeclBitfields on a diet
David Majnemer [Tue, 19 May 2015 00:57:16 +0000 (00:57 +0000)]
[AST] Put VarDeclBitfields on a diet

VarDeclBitfields contained bits which are never present in parameters.
Split these out so that ParmVarDeclBitfields wouldn't grow past 32-bits
if another field was added.

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

9 years ago[modules] Support for merging a parsed definition of a static data member of a class...
Richard Smith [Tue, 19 May 2015 00:49:29 +0000 (00:49 +0000)]
[modules] Support for merging a parsed definition of a static data member of a class template into an imported but hidden definition.

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

9 years agoFix indentation
David Blaikie [Mon, 18 May 2015 22:51:39 +0000 (22:51 +0000)]
Fix indentation

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

9 years agoRevert changes to DefaultABIInfo accidentally introduced in r208733
Reid Kleckner [Mon, 18 May 2015 22:46:30 +0000 (22:46 +0000)]
Revert changes to DefaultABIInfo accidentally introduced in r208733

Also add trivial handling of transparent unions.

PPC32, MSP430, and XCore apparently all rely on DefaultABIInfo. This
should worry you, because DefaultABIInfo is not implementing the rules
of any particular ABI.

Fixes PR23097, patch by Andy Gibbs.

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

9 years agoAPI update for streamlining of IRBuilder::CreateCall to just use ArrayRef/initializer...
David Blaikie [Mon, 18 May 2015 22:14:03 +0000 (22:14 +0000)]
API update for streamlining of IRBuilder::CreateCall to just use ArrayRef/initializer_list+braced init

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

9 years agoAdded missing 'override' to `ReadMismatchingDeleteExpressions`
Ismail Pazarbasi [Mon, 18 May 2015 20:46:12 +0000 (20:46 +0000)]
Added missing 'override' to `ReadMismatchingDeleteExpressions`

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

9 years ago[modules] Support for merging a parsed class template specialization definition into...
Richard Smith [Mon, 18 May 2015 20:36:47 +0000 (20:36 +0000)]
[modules] Support for merging a parsed class template specialization definition into an imported but hidden definition.

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

9 years agoCreate new diagnostic group -Wmove
Richard Trieu [Mon, 18 May 2015 20:25:44 +0000 (20:25 +0000)]
Create new diagnostic group -Wmove

-Wmove includes the three existing warnings for std::move calls, self move,
reduntant move, and pessimizing move.  -Wmove is included in -Wmost, so that
it can be discoverable to people using that or -Wall.

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

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

9 years ago[modules] When a file is listed as a non-textual header in a module map, don't
Richard Smith [Mon, 18 May 2015 20:02:41 +0000 (20:02 +0000)]
[modules] When a file is listed as a non-textual header in a module map, don't
enter it more than once, even if it doesn't have #include guards -- we already
know that it is intended to have the same effect every time it's included, and
it's already had that effect. This particularly helps with local submodule
visibility builds, where the include guard macro may not be visible in the
includer, but will become visible the moment we enter the included file.

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

9 years agoDetect uses of mismatching forms of 'new' and 'delete'
Ismail Pazarbasi [Mon, 18 May 2015 19:59:11 +0000 (19:59 +0000)]
Detect uses of mismatching forms of 'new' and 'delete'

Emit warning when operand to `delete` is allocated with `new[]` or
operand to `delete[]` is allocated with `new`.

rev 2 update:
`getNewExprFromInitListOrExpr` should return `dyn_cast_or_null`
instead of `dyn_cast`, since `E` might be null.

Reviewers: rtrieu, jordan_rose, rsmith

Subscribers: majnemer, cfe-commits

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

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

9 years agoHave -Wredundant-move ignore reference types.
Richard Trieu [Mon, 18 May 2015 19:54:08 +0000 (19:54 +0000)]
Have -Wredundant-move ignore reference types.

Don't give a warning when the type being moved is a reference type.  Also
uncomment two lines in the test case.

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

9 years agoclang-format: Fix another regression caused by r237565.
Daniel Jasper [Mon, 18 May 2015 14:49:19 +0000 (14:49 +0000)]
clang-format: Fix another regression caused by r237565.

Before:
  class C : test {
    class D : test{void f(){int i{2};
  }
  }
  ;
  }
  ;

After:
  class C : test {
    class D : test {
      void f() { int i{2}; }
    };
  };

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

9 years agoclang-format: Fix regression introduced by r237565.
Daniel Jasper [Mon, 18 May 2015 14:12:24 +0000 (14:12 +0000)]
clang-format: Fix regression introduced by r237565.

Before:
  class C : public D {
    SomeClass SC { 2 };
  };

After:
  class C : public D {
    SomeClass SC{2};
  };

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

9 years agoclang-format: Improve detection of macros annotating functions.
Daniel Jasper [Mon, 18 May 2015 13:47:23 +0000 (13:47 +0000)]
clang-format: Improve detection of macros annotating functions.

Before:
  ASSERT("aaaaaaaaaaaaaaa")
      << aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
      << bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb;

After:
  ASSERT("aaaaaaaaaaaaaaa") << aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
                            << bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb;

Also cleanup implementation a bit and only mark closing parenthesis of
these annotations.

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

9 years agoclang-format: Allow braced initializers in template arguments of class
Daniel Jasper [Mon, 18 May 2015 12:52:00 +0000 (12:52 +0000)]
clang-format: Allow braced initializers in template arguments of class
specializations.

Before:
  template <class T>
      struct S < std::is_arithmetic<T> {
  } > {};

After:
  template <class T> struct S<std::is_arithmetic<T>{}> {};

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

9 years agoclang-format: Support function annotations in macros.
Daniel Jasper [Mon, 18 May 2015 09:47:22 +0000 (09:47 +0000)]
clang-format: Support function annotations in macros.

Before:
  DEPRECATED("Use NewClass::NewFunction instead.") string
      OldFunction(const string &parameter) {}

After:
  DEPRECATED("Use NewClass::NewFunction instead.")
  string OldFunction(const string &parameter) {}

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

9 years ago[OPENMP] Fix for '#pragma omp task' codegen.
Alexey Bataev [Mon, 18 May 2015 07:54:53 +0000 (07:54 +0000)]
[OPENMP] Fix for '#pragma omp task' codegen.

Internal task structure must be generated like
typedef struct kmp_task {
  void *              shareds;
  kmp_routine_entry_t routine;
  kmp_int32           part_id;
  kmp_routine_entry_t destructors;
} kmp_task_t;

struct kmp_task_t_with_privates {
  kmp_task_t task_data;
  .kmp_private. privates;
};
to avoid possible additional alignment bytes in first fields (shareds, routine, part_id and destructors). Runtime library is not aware of such kind additional alignment bytes.

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

9 years ago[modules] Move implicit creation of ImportDecls for #includes transformed into module...
Richard Smith [Mon, 18 May 2015 05:35:52 +0000 (05:35 +0000)]
[modules] Move implicit creation of ImportDecls for #includes transformed into module imports from the frontend into Sema where it belongs.

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

9 years ago[clang-cl] Enable C++14 when targeting 2015 compatibility
David Majnemer [Mon, 18 May 2015 04:49:30 +0000 (04:49 +0000)]
[clang-cl] Enable C++14 when targeting 2015 compatibility

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

9 years ago[modules] Refactor and simplify #include handling.
Richard Smith [Mon, 18 May 2015 04:45:41 +0000 (04:45 +0000)]
[modules] Refactor and simplify #include handling.

Fix a tiny bug where we'd try to load a module file for the module we're in
the middle of building.

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

9 years agoclang/test/CodeGenOpenCL/opencl_types.cl: Tweak expressions according to r237548.
NAKAMURA Takumi [Mon, 18 May 2015 03:58:27 +0000 (03:58 +0000)]
clang/test/CodeGenOpenCL/opencl_types.cl: Tweak expressions according to r237548.

With MS mangler, the signature is:

  x86: define void @"\01?bad1@@$$J0YAXPAPAUocl_image1d@@PAPAUocl_image2d@@1@Z"  (%opencl.image1d_t** %b, %opencl.image2d_t** %c, %opencl.image2d_t** %d) nounwind
  x64: define void @"\01?bad1@@$$J0YAXPEAPAUocl_image1d@@PEAPAUocl_image2d@@1@Z"(%opencl.image1d_t** %b, %opencl.image2d_t** %c, %opencl.image2d_t** %d) nounwind

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

9 years ago[modules] If we see a #include that maps to a module, but use of precompiled modules...
Richard Smith [Mon, 18 May 2015 03:52:30 +0000 (03:52 +0000)]
[modules] If we see a #include that maps to a module, but use of precompiled modules is disabled, track submodule visibility anyway if -fmodules-local-submodule-visibility is enabled. This, in effect, gives modules semantics but without precompilation.

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

9 years agoWrap to 80 columns. No behavior change.
Nico Weber [Mon, 18 May 2015 02:41:17 +0000 (02:41 +0000)]
Wrap to 80 columns. No behavior change.

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

9 years ago[MS ABI] Give __attribute__((overloadable)) functions pretty names
David Majnemer [Mon, 18 May 2015 00:05:29 +0000 (00:05 +0000)]
[MS ABI] Give __attribute__((overloadable)) functions pretty names

It turns out that there is a mangling for 'extern "C"', it's only used
by MSVC in /clr mode.  Co-opt this mangling so that extern "C" functions
marked overloadable get demangled nicely.

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

9 years ago[MS ABI] Function encodings are always encoded in template arguments
David Majnemer [Mon, 18 May 2015 00:05:25 +0000 (00:05 +0000)]
[MS ABI] Function encodings are always encoded in template arguments

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

9 years agoFix confusing indent. No behavior change.
Nico Weber [Mon, 18 May 2015 00:00:29 +0000 (00:00 +0000)]
Fix confusing indent. No behavior change.

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

9 years agoclang-format: Properly align ObjC string literals.
Daniel Jasper [Sun, 17 May 2015 08:13:23 +0000 (08:13 +0000)]
clang-format: Properly align ObjC string literals.

Before:
  NSString s = @"a"
               "b"
               "c";
  NSString s = @"a"
               @"b"
                @"c";

After:
  NSString s = @"a"
                "b"
                "c";
  NSString s = @"a"
               @"b"
               @"c";

This fixes llvm.org/PR23536.

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

9 years agoclang-format: Improve line wrapping around << operators.
Daniel Jasper [Sun, 17 May 2015 07:27:09 +0000 (07:27 +0000)]
clang-format: Improve line wrapping around << operators.

Generally, clang-format tries to keep label-value pairs on a single
line for stream operators. However, we should not do that if there is
just a single such pair, as that doesn't help much.

Before:
  llvm::errs() << "aaaaaaaaaaaa: " << aaaaaaa(aaaaaaaaa,
                                              aaaaaaaaa);

After:
  llvm::errs() << "aaaaaaaaaaaa: "
               << aaaaaaa(aaaaaaaaaaaaaaaaaa);

Also remove old test case that was testing actual behavior any more.

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

9 years ago[Sema] Improve llvm_unreachable() message.
Davide Italiano [Sun, 17 May 2015 02:27:10 +0000 (02:27 +0000)]
[Sema] Improve llvm_unreachable() message.

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