]> granicus.if.org Git - clang/log
clang
8 years ago[OPENMP] Revert r256238 to fix the problem with tests on Linux.
Alexey Bataev [Tue, 22 Dec 2015 12:44:46 +0000 (12:44 +0000)]
[OPENMP] Revert r256238 to fix the problem with tests on Linux.

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

8 years ago[OPENMP 4.5] Parsing/sema for 'depend(sink:vec)' clause in 'ordered' directive.
Alexey Bataev [Tue, 22 Dec 2015 12:21:47 +0000 (12:21 +0000)]
[OPENMP 4.5] Parsing/sema for 'depend(sink:vec)' clause in 'ordered' directive.
OpenMP 4.5 adds 'depend(sink:vec)' in 'ordered' directive for doacross loop synchronization. Patch adds parsing and semantic analysis for this clause.

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

8 years agoPull out a bunch of duplicated option handling code into its own
Eric Christopher [Tue, 22 Dec 2015 03:12:34 +0000 (03:12 +0000)]
Pull out a bunch of duplicated option handling code into its own
function and use for the targets that can easily support it.

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

8 years agoUse -no-canonical-prefixes to make sure binaries names are easier to match.
Eric Christopher [Tue, 22 Dec 2015 01:45:45 +0000 (01:45 +0000)]
Use -no-canonical-prefixes to make sure binaries names are easier to match.

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

8 years ago[WebAssembly] Remove the -target command-line flag from the ld commandline.
Dan Gohman [Mon, 21 Dec 2015 23:30:41 +0000 (23:30 +0000)]
[WebAssembly] Remove the -target command-line flag from the ld commandline.

This flag isn't needed, or permitted, with the "ld" flavor of lld.

Also, add a basic ld commandline test.

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

8 years ago[clang-cl] Add support for /Brepro
David Majnemer [Mon, 21 Dec 2015 22:09:34 +0000 (22:09 +0000)]
[clang-cl] Add support for /Brepro

The /Brepro flag controls whether or not the compiler should embed
timestamps into the object file.  Object files which do not embed
timestamps are not suitable for incremental linking but are suitable for
hermetic build systems and staged self-hosts of clang.

A normal clang spelling of this flag has been added,
-mincremental-linker-compatible.

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

8 years agoTweak myriad-toolchain test.
James Y Knight [Mon, 21 Dec 2015 20:30:49 +0000 (20:30 +0000)]
Tweak myriad-toolchain test.

The test failed when run on a SPARC host, since it was finding the
native gcc installation by accident.

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

8 years agoReapply "[CodeGen] Fix assignments of inline layouts into the byref structure"
Vedant Kumar [Mon, 21 Dec 2015 20:21:15 +0000 (20:21 +0000)]
Reapply "[CodeGen] Fix assignments of inline layouts into the byref structure"

When using blocks, a byref structure is created to represent the
closure. The "byref.layout" field of this structure is an i8*. However,
some 'inline' layouts are represented as i64's, not i8*'s.

Prior to r246985 we cast the i64 'inline' layout to an i8* before
assigning it into the byref structure. This patch brings the cast back
and adds a regression test.

The original version of this patch was too invasive. This version only adds the
cast to BuildByrefLayout.

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

rdar://23713871

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

8 years agoRevert "[CodeGen] Fix assignments of inline layouts into the byref structure"
Vedant Kumar [Mon, 21 Dec 2015 19:43:25 +0000 (19:43 +0000)]
Revert "[CodeGen] Fix assignments of inline layouts into the byref structure"

This reverts commit r256185. It breaks CodeGenObjC/fragile-arc.m.

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

8 years ago[CodeGen] Fix assignments of inline layouts into the byref structure
Vedant Kumar [Mon, 21 Dec 2015 19:30:37 +0000 (19:30 +0000)]
[CodeGen] Fix assignments of inline layouts into the byref structure

When using blocks, a byref structure is created to represent the
closure. The "byref.layout" field of this structure is an i8*. However,
some 'inline' layouts are represented as i64's, not i8*'s.

Prior to r246985 we cast the i64 'inline' layout to an i8* before
assigning it into the byref structure. This patch brings the cast back
and adds a regression test.

rdar://23713871

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

8 years agoclang-format: Properly set the BlockKind for more blocks.
Daniel Jasper [Mon, 21 Dec 2015 18:31:15 +0000 (18:31 +0000)]
clang-format: Properly set the BlockKind for more blocks.

Before:
  void f() { struct Dummy { };
    f();
  }

After:
  void f() {
    struct Dummy {};
    f();
  }

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

8 years agoclang-format: Only consider the first #include that looks right to be
Daniel Jasper [Mon, 21 Dec 2015 17:28:24 +0000 (17:28 +0000)]
clang-format: Only consider the first #include that looks right to be
the main #include.

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

8 years agoclang-format: [JS] Change Google-style default for aligning operands.
Daniel Jasper [Mon, 21 Dec 2015 13:52:19 +0000 (13:52 +0000)]
clang-format: [JS] Change Google-style default for aligning operands.

The style guide allows both, but apparently, this is the more dominant use.

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

8 years agoclang-format: Only try to find the "main" include in the first block of
Daniel Jasper [Mon, 21 Dec 2015 13:40:49 +0000 (13:40 +0000)]
clang-format: Only try to find the "main" include in the first block of
includes.

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

8 years ago[scan-view] replace deprecated optparse with argparse
Alexander Kornienko [Mon, 21 Dec 2015 12:19:13 +0000 (12:19 +0000)]
[scan-view] replace deprecated optparse with argparse

Summary: scan-view migrated from optparse deprecated Python module to its replacement (argparse) and resolved few conflicts with pep8

Reviewers: ddunbar, aaron.ballman, dcoughlin, jroelofs, zaks.anna

Subscribers: cfe-commits

Patch by Kirill Bobyrev!

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

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

8 years agoclang-format: Extend detection of the "main" #include to use the filename
Daniel Jasper [Mon, 21 Dec 2015 12:14:17 +0000 (12:14 +0000)]
clang-format: Extend detection of the "main" #include to use the filename

Before, the first (non-system) header in a file was considered to be
the main include. This is conservative as it makes clang-format change
the #include order less often. Instead implement some basic usage of
the filename itself. With this patch, clang-format considers every
header to be a main include if the header file's basename is a prefix
to the filename the #include is in.

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

8 years ago[Driver] Pass -O* to the gold plugin via -plugin-opt
James Molloy [Mon, 21 Dec 2015 10:44:36 +0000 (10:44 +0000)]
[Driver] Pass -O* to the gold plugin via -plugin-opt

The gold plugin understands -O0..-O3, but these are not currently being passed to it.

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

8 years ago[Sema] Use range-based for loops. NFC
Craig Topper [Mon, 21 Dec 2015 06:35:56 +0000 (06:35 +0000)]
[Sema] Use range-based for loops. NFC

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

8 years ago[Cygwin] Enable TLS as emutls.
NAKAMURA Takumi [Mon, 21 Dec 2015 02:37:23 +0000 (02:37 +0000)]
[Cygwin] Enable TLS as emutls.

It resolves clang selfhosting with std::once() for Cygwin.

FIXME: It may be EmulatedTLS-generic also for X86-Android.
FIXME: Pass EmulatedTLS to LLVM CodeGen from Clang with -femulated-tls.

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

8 years ago[X86] Add missing m64/int64 conversions
Michael Kuperstein [Sun, 20 Dec 2015 12:37:18 +0000 (12:37 +0000)]
[X86] Add missing m64/int64 conversions

Define the 64-bit equivalents of _m_to_int and _m_from_int.

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

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

8 years ago[X86] Add signed aliases for popcnt intrinsics
Michael Kuperstein [Sun, 20 Dec 2015 12:35:35 +0000 (12:35 +0000)]
[X86] Add signed aliases for popcnt intrinsics

The Intel manual documents both an unsigned form (_mm_popcnt_u32)
and a signed form (_popcnt32) of the intrinsic. Add the missing signed form.

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

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

8 years agoDriver part of debugger tuning.
Paul Robinson [Sat, 19 Dec 2015 19:41:48 +0000 (19:41 +0000)]
Driver part of debugger tuning.

Adds driver options named -glldb and -gsce to mean -g plus tuning for
lldb and SCE debuggers respectively; the existing -ggdb option does
the same for gdb. Existing options -ggdb0, -ggdb1 etc. unpack into
-ggdb -g<N>.  (There will not be -glldb<N> or -gsce<N> options.) The
tuning gets a target-specific default in the driver, and is passed
into cc1 with the new -debugger-tuning option.

As fallout, fixes where '-gsplit-dwarf -g0' would ignore the -g0 part
on Linux.

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

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

8 years agoRevert "[CMake] Support a simple case for bootstrap builds to generate PGO data"
Chris Bieneman [Sat, 19 Dec 2015 05:47:50 +0000 (05:47 +0000)]
Revert "[CMake] Support a simple case for bootstrap builds to generate PGO data"

This reverts commit r256069, which was an unintentional tag along on
another commit.

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

8 years agoTest for diagnostic quality improvement in r256049.
Richard Smith [Sat, 19 Dec 2015 03:12:14 +0000 (03:12 +0000)]
Test for diagnostic quality improvement in r256049.

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

8 years agoFix crash-on-invalid if a :: is followed by two or more open parentheses (and then...
Richard Smith [Sat, 19 Dec 2015 02:40:19 +0000 (02:40 +0000)]
Fix crash-on-invalid if a :: is followed by two or more open parentheses (and then something else).

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

8 years agoRecommit CC1 part of debugger tuning; pass through setting from driver to LLVM.
Paul Robinson [Sat, 19 Dec 2015 02:24:10 +0000 (02:24 +0000)]
Recommit CC1 part of debugger tuning; pass through setting from driver to LLVM.

Reapplies r256063, except instead of frugally re-using an LLVM enum,
we define a Clang enum, to avoid exposing too much LLVM interface.

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

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

8 years agoUse a command line alias to remove the need to rewrite a subtarget
Eric Christopher [Sat, 19 Dec 2015 01:48:43 +0000 (01:48 +0000)]
Use a command line alias to remove the need to rewrite a subtarget
feature for command line compatibility.

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

8 years ago[CMake] Fixing a typo in a flag
Chris Bieneman [Sat, 19 Dec 2015 00:56:12 +0000 (00:56 +0000)]
[CMake] Fixing a typo in a flag

Turns out cc1's flag has 1 - not 2...

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

8 years ago[CMake] Support a simple case for bootstrap builds to generate PGO data
Chris Bieneman [Sat, 19 Dec 2015 00:56:10 +0000 (00:56 +0000)]
[CMake] Support a simple case for bootstrap builds to generate PGO data

Summary:
This patch adds support for the clang multi-stage bootstrapping to support PGO profdata generation, and can build a 2 or 3 stage compiler.

With this patch applied you can configure your build directory with the following invocation of CMake:

cmake -G <generator> -C <path_to_clang>/cmake/caches/PGO.cmake <source dir>

After configuration the following additional targets will be generated:

stage2-instrumented:
Builds a stage1 x86 compiler, runtime, and required tools (llvm-config, llvm-profdata) then uses that compiler to build an instrumented stage2 compiler.

stage2-instrumented-generate-profdata:
Depends on "stage2-instrumented" and will use the instrumented compiler to generate profdata based on the training files in <clang>/utils/perf-training

stage2:
Depends on "stage2-instrumented-generate-profdata" and will use the stage1 compiler with the stage2 profdata to build a PGO-optimized compiler.

stage2-check-llvm:
Depends on stage2 and runs check-llvm using the stage3 compiler.

stage2-check-clang:
Depends on stage2 and runs check-clang using the stage3 compiler.

stage2-check-all:
Depends on stage2 and runs check-all using the stage3 compiler.

stage2-test-suite:
Depends on stage2 and runs the test-suite using the stage3 compiler (requires in-tree test-suite).

Reviewers: bogner, silvas, chandlerc

Subscribers: cfe-commits

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

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

8 years agoRevert r256063, it's killing clang-tools-extra
Paul Robinson [Sat, 19 Dec 2015 00:23:11 +0000 (00:23 +0000)]
Revert r256063, it's killing clang-tools-extra

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

8 years agoCC1 part of debugger tuning; pass through setting from driver to LLVM.
Paul Robinson [Fri, 18 Dec 2015 23:41:11 +0000 (23:41 +0000)]
CC1 part of debugger tuning; pass through setting from driver to LLVM.

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

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

8 years ago[CMake] PGO training data
Chris Bieneman [Fri, 18 Dec 2015 23:00:57 +0000 (23:00 +0000)]
[CMake] PGO training data

Adding in a few more lit substitutions for cc1 and the test exec path.

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

8 years agoFix invalid enum comparison.
Zachary Turner [Fri, 18 Dec 2015 22:58:42 +0000 (22:58 +0000)]
Fix invalid enum comparison.

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

8 years agoSplit RequireCompleteType into a function that actually requires that the type
Richard Smith [Fri, 18 Dec 2015 22:40:25 +0000 (22:40 +0000)]
Split RequireCompleteType into a function that actually requires that the type
is complete (with an error produced if not) and a function that merely queries
whether the type is complete. Either way we'll trigger instantiation if
necessary, but only the former will diagnose and recover from missing module
imports.

The intent of this change is to prevent a class of bugs where code would call
RequireCompleteType(..., 0) and then ignore the result. With modules, we must
check the return value and use it to determine whether the definition of the
type is visible.

This also fixes a debug info quality issue: calls to isCompleteType do not
trigger the emission of debug information for a type in limited-debug-info
mode. This allows us to avoid emitting debug information for type definitions
in more cases where we believe it is safe to do so.

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

8 years agoSupport AlwaysBreakAfterReturnType
Zachary Turner [Fri, 18 Dec 2015 22:20:15 +0000 (22:20 +0000)]
Support AlwaysBreakAfterReturnType

This changes the behavior of AlwaysBreakAfterDeclarationReturnType
so that it supports breaking after declarations, definitions, or
both.

Differential Revision: http://reviews.llvm.org/D10370
Reviewed By: Daniel Jasper

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

8 years ago[modules] Don't try to use the definition of a class if
Richard Smith [Fri, 18 Dec 2015 22:19:11 +0000 (22:19 +0000)]
[modules] Don't try to use the definition of a class if
RequireCompleteType(..., 0) says we're not permitted to do so. The definition
might not be visible, even though we know what it is.

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

8 years agoWire a SourceLocation into IsDerivedFrom and move the RequireCompleteType call
Richard Smith [Fri, 18 Dec 2015 21:45:41 +0000 (21:45 +0000)]
Wire a SourceLocation into IsDerivedFrom and move the RequireCompleteType call
for the derived class into it. This is mostly just a cleanup, but could in
principle be a bugfix if there is some codepath that reaches here and didn't
previously require a complete type (I couldn't find any such codepath, though).

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

8 years agoPIC should not be enabled by default on Darwin with -static.
Bob Wilson [Fri, 18 Dec 2015 20:37:54 +0000 (20:37 +0000)]
PIC should not be enabled by default on Darwin with -static.

r245667 changed -static so that it doesn't override an explicit -fPIC
option, but -static should still change the default for Darwin for -fno-PIC.
This matches longstanding GCC and Clang behavior on Darwin and changing it
would be disruptive, with no significant benefit.
http://reviews.llvm.org/D15455
rdar://problem/23811045

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

8 years agoFix an unused variable warning from r256012.
Chad Rosier [Fri, 18 Dec 2015 20:08:40 +0000 (20:08 +0000)]
Fix an unused variable warning from r256012.

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

8 years agoAdd a defensive check for a nullptr.
Adrian Prantl [Fri, 18 Dec 2015 19:44:31 +0000 (19:44 +0000)]
Add a defensive check for a nullptr.

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

8 years agoReplace SM.getFileEntryForID(Lexer->getFileID()) with Lexer->getFileEntry().
Yaron Keren [Fri, 18 Dec 2015 10:30:12 +0000 (10:30 +0000)]
Replace SM.getFileEntryForID(Lexer->getFileID()) with Lexer->getFileEntry().

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

8 years ago[OPENMP] Remove explicit call for implicit barrier
Alexey Bataev [Fri, 18 Dec 2015 10:24:53 +0000 (10:24 +0000)]
[OPENMP] Remove explicit call for implicit barrier
#pragma omp parallel needs an implicit barrier that is currently done by an explicit call to __kmpc_barrier. However, the runtime already ensures a barrier in __kmpc_fork_call which currently leads to two barriers per region per thread.
Differential Revision: http://reviews.llvm.org/D15561

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

8 years ago[OPENMP] Fix for http://llvm.org/PR25878: Error compiling an OpenMP program
Alexey Bataev [Fri, 18 Dec 2015 07:58:25 +0000 (07:58 +0000)]
[OPENMP] Fix for http://llvm.org/PR25878: Error compiling an OpenMP program
OpenMP codegen tried to emit the code for its constructs even if it was detected as a dead-code. Added checks to ensure that the code is emitted if the code is not dead.

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

8 years ago[OPENMP 4.5] Parsing/sema analysis for 'depend(source)' clause in 'ordered' directive.
Alexey Bataev [Fri, 18 Dec 2015 05:05:56 +0000 (05:05 +0000)]
[OPENMP 4.5] Parsing/sema analysis for 'depend(source)' clause in 'ordered' directive.
OpenMP 4.5 adds 'depend(source)' clause for 'ordered' directive to support cross-iteration dependence. Patch adds parsing and semantic analysis for this construct.

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

8 years agoObjC properties: consider ownership of properties from protocols when synthesizing.
Douglas Gregor [Fri, 18 Dec 2015 00:52:31 +0000 (00:52 +0000)]
ObjC properties: consider ownership of properties from protocols when synthesizing.

When determining whether ownership was explicitly written for a
property when it is being synthesized, also consider that the original
property might have come from a protocol. Fixes rdar://problem/23931441.

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

8 years agoAdd a test for r255875 & r255929, comparisons on DynTypeNode wrapped QualType.
Richard Trieu [Thu, 17 Dec 2015 23:20:57 +0000 (23:20 +0000)]
Add a test for r255875 & r255929, comparisons on DynTypeNode wrapped QualType.

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

8 years ago[CUDA] runtime wrapper header tweaks
Artem Belevich [Thu, 17 Dec 2015 22:25:22 +0000 (22:25 +0000)]
[CUDA] runtime wrapper header tweaks

* Pull in host-only implementations of few CUDA-specific math functions.
* #nclude <cmath> early to prevent its inclusion from CUDA headers after
  they've messed with __THROW macro.

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

8 years agoFix r255875, use '<' instead of '==' for 'operator<'
Richard Trieu [Thu, 17 Dec 2015 21:56:22 +0000 (21:56 +0000)]
Fix r255875, use '<' instead of '==' for 'operator<'

Aaron Ballman pointed out a typo from the copy and paste in r255875.  This will
preserve the strict weak ordering when comparing DynTypedNode.

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

8 years agoAttach maximum function count to Module when using PGO mode.
Easwaran Raman [Thu, 17 Dec 2015 19:14:27 +0000 (19:14 +0000)]
Attach maximum function count to Module when using PGO mode.

This sets the maximum entry count among all functions in the program to the module using module flags. This allows the optimizer to use this information.

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

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

8 years ago[x86] Filecheck is case sensitive. Capitalize directives.
Chad Rosier [Thu, 17 Dec 2015 19:01:55 +0000 (19:01 +0000)]
[x86] Filecheck is case sensitive.  Capitalize directives.

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

8 years ago[x86] Filecheck is case sensitive. Capitalize directives.
Chad Rosier [Thu, 17 Dec 2015 18:54:42 +0000 (18:54 +0000)]
[x86] Filecheck is case sensitive.  Capitalize directives.

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

8 years ago[CUDA] Make vtable construction aware of host/device side of CUDA compilation.
Artem Belevich [Thu, 17 Dec 2015 18:12:36 +0000 (18:12 +0000)]
[CUDA] Make vtable construction aware of host/device side of CUDA compilation.

C++ emits vtables for classes that have key function present in the
current TU. While we compile CUDA the fact that key function was found
in this TU does not mean that we are going to generate code for it. E.g.
vtable for a class with host-only methods should not (and can not) be
generated on device side, because we'll never generate code for them
during device-side compilation.

This patch adds an extra CUDA-specific check during key method computation
and filters out potential key methods that are not suitable for this side
of CUDA compilation.

When we codegen vtable, entries for unsuitable methods are set to null.

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

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

8 years ago[ms-inline-asm] Add support for composite structs in MS inline asm
Marina Yatsina [Thu, 17 Dec 2015 12:51:51 +0000 (12:51 +0000)]
[ms-inline-asm] Add support for composite structs in MS inline asm

Add MS inline asm support for structs that contain fields that are also structs.

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

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

8 years ago[OPENMP] Fix for http://llvm.org/PR25142: openmp: Assertion failed: DD && "queried...
Alexey Bataev [Thu, 17 Dec 2015 06:55:08 +0000 (06:55 +0000)]
[OPENMP] Fix for http://llvm.org/PR25142: openmp: Assertion failed: DD && "queried property of class with no definition", file AST/DeclCXX.h
Added processing for template specialization during data-sharing attributes analysis

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

8 years agoAdd QualType case to operator< for DynTypedNode.
Richard Trieu [Thu, 17 Dec 2015 04:46:48 +0000 (04:46 +0000)]
Add QualType case to operator< for DynTypedNode.

This allows sorting DynTypedNode's which are QualType's since QualType does
not have memoization.

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

8 years ago[TLS on Darwin] use CXX_FAST_TLS calling convention for access functions.
Manman Ren [Thu, 17 Dec 2015 00:42:36 +0000 (00:42 +0000)]
[TLS on Darwin] use CXX_FAST_TLS calling convention for access functions.

Also set nounwind attribute.

rdar://problem/9001553

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

8 years ago[analyzer] Better detect when C++ object was constructed into existing region.
Devin Coughlin [Thu, 17 Dec 2015 00:28:33 +0000 (00:28 +0000)]
[analyzer] Better detect when C++ object was constructed into existing region.

When the analyzer evaluates a CXXConstructExpr, it looks ahead in the CFG for
the current block to detect what region the object should be constructed into.
If the constructor was directly constructed into a local variable or field
region then there is no need to explicitly bind the constructed value to
the local or field when analyzing the DeclStmt or CXXCtorInitializer that
called the constructor.

Unfortunately, there were situations in which the CXXConstructExpr was
constructed into a temporary region but when evaluating the corresponding
DeclStmt or CXXCtorInitializer the analyzer assumed the object was constructed
into the local or field. This led to spurious warnings about uninitialized
values (PR25777).

To avoid these false positives, this commit factors out the logic for
determining when a CXXConstructExpr will be directly constructed into existing
storage, adds the inverse logic to detect when the corresponding later bind can
be safely skipped, and adds assertions to make sure these two checks are in
sync.

rdar://problem/21947725

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

8 years ago[WebAssembly] Initial linking support.
Dan Gohman [Wed, 16 Dec 2015 23:30:41 +0000 (23:30 +0000)]
[WebAssembly] Initial linking support.

This begins minimal support for invoking 'ld' from clang for WebAssembly
targets.

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

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

8 years agoUpdate for llvm api change.
Rafael Espindola [Wed, 16 Dec 2015 23:16:37 +0000 (23:16 +0000)]
Update for llvm api change.

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

8 years agoFix funciton->function typo.
Eric Christopher [Wed, 16 Dec 2015 23:10:46 +0000 (23:10 +0000)]
Fix funciton->function typo.

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

8 years agoUpdate for llvm API change.
Rafael Espindola [Wed, 16 Dec 2015 22:59:09 +0000 (22:59 +0000)]
Update for llvm API change.

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

8 years agoFix CFI tests in sanitizer-ld.
Evgeniy Stepanov [Wed, 16 Dec 2015 22:03:39 +0000 (22:03 +0000)]
Fix CFI tests in sanitizer-ld.

This test is not testing what it is supposed to test because of a
mixup with the CHECK lines.

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

8 years ago[PS4] Fix the unit test to be compatible with clang driver. NFC
Sumanth Gundapaneni [Wed, 16 Dec 2015 20:18:12 +0000 (20:18 +0000)]
[PS4] Fix the unit test to be compatible with clang driver. NFC

".exe" extension is inherently checked by llvm::fs::can_execute()
This patch fixes the linker extension in clang driver and updates the
unit test to accommodate the the check string on windows.

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

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

8 years ago[CMake] Name the bootstrap stages stage[0-9]
Chris Bieneman [Wed, 16 Dec 2015 20:17:07 +0000 (20:17 +0000)]
[CMake] Name the bootstrap stages stage[0-9]

When you start chaining bootstrap stages the CMake-generated targets get unwieldy. This change supports naming the bootstrap targets and creating wrapper targets in the top-level build file.

Without this patch the default target generated for a second stage build was "bootstrap" with it the target is "stage2".

Also with some CMake goop setting CLANG_BOOTSTRAP_TARGETS, you can expose third stage targets as "stage3" instead of "bootstrap-bootstrap"

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

8 years agoLet -Wdelete-non-virtual-dtor mention final.
Nico Weber [Wed, 16 Dec 2015 20:07:24 +0000 (20:07 +0000)]
Let -Wdelete-non-virtual-dtor mention final.

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

8 years agoAdd -fsyntax-only to fix failure in read-only directories.
Diego Novillo [Wed, 16 Dec 2015 19:52:05 +0000 (19:52 +0000)]
Add -fsyntax-only to fix failure in read-only directories.

Internally, this test is executed in a read-only directory, which causes
it to fail because the driver tries to generate a file unnecessarily.
Adding -fsyntax-only fixes the issue (thanks to Artem Belevich for
figuring out the root cause).

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

8 years agoFix the failing windows clang unit tests. NFC
Sumanth Gundapaneni [Wed, 16 Dec 2015 19:09:51 +0000 (19:09 +0000)]
Fix the failing windows clang unit tests. NFC

Some tests are missing the {{(.exe)?}} suffix on the exectables
which the FileCheck is grepping for. This will ensure, the lit tests
are clean on windows

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

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

8 years ago[CUDA] renamed cuda_runtime.h wrapper to __cuda_runtime.h
Artem Belevich [Wed, 16 Dec 2015 18:51:59 +0000 (18:51 +0000)]
[CUDA] renamed cuda_runtime.h wrapper to __cuda_runtime.h

Currently it's easy to break CUDA compilation by passing
"-isystem /path/to/cuda/include" to compiler which leads to
compiler including real cuda_runtime.h from there instead
of the wrapper we need.

Renaming the wrapper ensures that we can include the wrapper
regardless of user-specified include paths and files.

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

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

8 years ago[CMake] If you're building compiler-rt, the bootstrap build should depend on it.
Chris Bieneman [Wed, 16 Dec 2015 18:49:12 +0000 (18:49 +0000)]
[CMake] If you're building compiler-rt, the bootstrap build should depend on it.

Adding optional dependency for the bootstrap targets on compiler-rt.

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

8 years ago[CMake] Make CLANG_BOOTSTRAP_TARGETS overridable
Chris Bieneman [Wed, 16 Dec 2015 18:45:53 +0000 (18:45 +0000)]
[CMake] Make CLANG_BOOTSTRAP_TARGETS overridable

This allows exposing a custom list of targets from the next stage build up.

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

8 years ago[CMake] ExternalProject for compiler-rt needs to depend on llvm-config and clang
Chris Bieneman [Wed, 16 Dec 2015 18:42:14 +0000 (18:42 +0000)]
[CMake] ExternalProject for compiler-rt needs to depend on llvm-config and clang

The add_dependencies call on compiler-rt-configure adds llvm-config and clang to the phony target, but not to the actual configure custom command. We need the dependency bound to the custom command so that it can't be re-ordered by Ninja.

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

8 years ago[PS4][Profile] add "--dependent-lib=libclang_rt.profile-x86_64.a" to
Paul Robinson [Wed, 16 Dec 2015 17:25:27 +0000 (17:25 +0000)]
[PS4][Profile] add "--dependent-lib=libclang_rt.profile-x86_64.a" to
the CC1 command line when enabling code coverage.

Patch by Ying Yi!

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

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

8 years agoMake matchers thread compatible, so we can pass them to different threads and run...
Manuel Klimek [Wed, 16 Dec 2015 15:48:58 +0000 (15:48 +0000)]
Make matchers thread compatible, so we can pass them to different threads and run them on multiple translation units in parallel.

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

8 years ago[x86] Exclusion of incorrect include headers paths for MCU target
Andrey Bokhanko [Wed, 16 Dec 2015 13:27:38 +0000 (13:27 +0000)]
[x86] Exclusion of incorrect include headers paths for MCU target

Exclusion of /usr/include and /usr/local/include headers paths for MCU target.

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

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

8 years agoclang-format: Extend header sort category implementation.
Daniel Jasper [Wed, 16 Dec 2015 10:10:16 +0000 (10:10 +0000)]
clang-format: Extend header sort category implementation.

Specifically, it is sometimes necessary to keep certain #includes as
the first #include, even before the main #include for a .cc file.
Switching the category to be signed instead of unsigned isn't ideal,
but it seems as good of an option as any and is fully backwards
compatible.

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

8 years ago[Objective-c] Fix a crash that occurs when ObjCTypeParamList::back() is
Akira Hatanaka [Wed, 16 Dec 2015 06:25:38 +0000 (06:25 +0000)]
[Objective-c] Fix a crash that occurs when ObjCTypeParamList::back() is
called on an empty list.

This commit makes Parser::parseObjCTypeParamListOrProtocolRefs return
nullptr if it sees an invalid type parameter (e.g., __kindof) in the
type parameter list.

rdar://problem/23068920

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

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

8 years ago[CodeGen] Use llvm::CmpInst::Predicate instead of unsigned for parameter types in...
Craig Topper [Wed, 16 Dec 2015 06:24:28 +0000 (06:24 +0000)]
[CodeGen] Use llvm::CmpInst::Predicate instead of unsigned for parameter types in EmitCompare to eliminate some later explicit casts. NFC.

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

8 years agoPrint qualified display names when emitting CodeView
Reid Kleckner [Wed, 16 Dec 2015 02:04:40 +0000 (02:04 +0000)]
Print qualified display names when emitting CodeView

This is what debuggers expect.  Words towards fixing PR21528.

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

8 years ago[CMake] Add support for generating profdata for clang from training files
Chris Bieneman [Wed, 16 Dec 2015 01:02:44 +0000 (01:02 +0000)]
[CMake] Add support for generating profdata for clang from training files

Summary:
This patch adds support for using LIT to drive generating PGO profile data for clang.

This first pass implementation should work on Linux and Unix based platforms. If you build clang using CMake with LLVM_BUILD_INSTRUMENTED=On the CMake build generates a generate-profdata target that will use the just-built clang to build any test files (see hello_world.cpp as an example). Each test compile will generate profraw files for each clang process. After all tests have run CMake will merge the profraw files using llvm-profdata.

Future opportunities for extension:
* Support for Build->Profile->Build bootstrapping
* Support for linker order file generation using a similar mechanism and the same training data
* Support for Windows

Reviewers: dexonsmith, friss, bogner, cmatthews, vsk, silvas

Subscribers: cfe-commits

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

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

8 years ago[cfi] Exclude ubsan runtime library from non-diag CFI builds (driver changes).
Evgeniy Stepanov [Wed, 16 Dec 2015 00:38:42 +0000 (00:38 +0000)]
[cfi] Exclude ubsan runtime library from non-diag CFI builds (driver changes).

Split the CFI runtime in two: cfi and cfi_diag. The latter includes
UBSan runtime to allow printing diagnostics.

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

8 years agoReland "[SEH] Use llvm.x86.seh.recoverfp for SEH filters on x64 as well as 32bit"
Reid Kleckner [Wed, 16 Dec 2015 00:26:37 +0000 (00:26 +0000)]
Reland "[SEH] Use llvm.x86.seh.recoverfp for SEH filters on x64 as well as 32bit"

I forgot to initialize RecoverFP.

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

8 years agoRevert "[SEH] Use llvm.x86.seh.recoverfp for SEH filters on x64 as well as 32bit"
Reid Kleckner [Wed, 16 Dec 2015 00:20:21 +0000 (00:20 +0000)]
Revert "[SEH] Use llvm.x86.seh.recoverfp for SEH filters on x64 as well as 32bit"

This reverts commit r255710.

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

8 years agoFix grammar.
Richard Smith [Wed, 16 Dec 2015 00:19:23 +0000 (00:19 +0000)]
Fix grammar.

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

8 years agoUpdate our claims about GCC's diagnostics quality to reflect recent improvements...
Richard Smith [Wed, 16 Dec 2015 00:18:47 +0000 (00:18 +0000)]
Update our claims about GCC's diagnostics quality to reflect recent improvements to GCC.

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

8 years agoThese days, GCC has at least minimal documentation for its VLAIS extension.
Richard Smith [Wed, 16 Dec 2015 00:09:57 +0000 (00:09 +0000)]
These days, GCC has at least minimal documentation for its VLAIS extension.

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

8 years agoRelax checks in cfi-cross-dso test.
Evgeniy Stepanov [Tue, 15 Dec 2015 23:49:51 +0000 (23:49 +0000)]
Relax checks in cfi-cross-dso test.

The test is failing with unnamed labels.

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

8 years ago[SEH] Use llvm.x86.seh.recoverfp for SEH filters on x64 as well as 32bit
Reid Kleckner [Tue, 15 Dec 2015 23:47:40 +0000 (23:47 +0000)]
[SEH] Use llvm.x86.seh.recoverfp for SEH filters on x64 as well as 32bit

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

8 years agoCross-DSO control flow integrity (Clang part).
Evgeniy Stepanov [Tue, 15 Dec 2015 23:00:20 +0000 (23:00 +0000)]
Cross-DSO control flow integrity (Clang part).

Clang-side cross-DSO CFI.

* Adds a command line flag -f[no-]sanitize-cfi-cross-dso.
* Links a runtime library when enabled.
* Emits __cfi_slowpath calls is bitset test fails.
* Emits extra hash-based bitsets for external CFI checks.
* Sets a module flag to enable __cfi_check generation during LTO.

This mode does not yet support diagnostics.

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

8 years agoclang/test/CodeGen/ms_this.cpp: Fix for -Asserts.
NAKAMURA Takumi [Tue, 15 Dec 2015 22:42:28 +0000 (22:42 +0000)]
clang/test/CodeGen/ms_this.cpp: Fix for -Asserts.

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

8 years agoFix clang/test/CodeGen/ms_this.cpp.
NAKAMURA Takumi [Tue, 15 Dec 2015 22:19:00 +0000 (22:19 +0000)]
Fix clang/test/CodeGen/ms_this.cpp.

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

8 years ago[WinEH] Update clang to use operand bundles on call sites
David Majnemer [Tue, 15 Dec 2015 21:27:59 +0000 (21:27 +0000)]
[WinEH] Update clang to use operand bundles on call sites

This updates clang to use bundle operands to associate an invoke with
the funclet which it is contained within.

Depends on D15517.

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

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

8 years agoUnsupport test that should not be run on Hexagon
Krzysztof Parzyszek [Tue, 15 Dec 2015 19:14:24 +0000 (19:14 +0000)]
Unsupport test that should not be run on Hexagon

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

8 years agoclang-cl: Add an alias for /wd4100
Nico Weber [Tue, 15 Dec 2015 17:07:16 +0000 (17:07 +0000)]
clang-cl: Add an alias for /wd4100

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

8 years ago[Microsoft][C++] Clang doesn't support a use of "this" pointer inside inline asm
Michael Zuckerman [Tue, 15 Dec 2015 14:35:51 +0000 (14:35 +0000)]
[Microsoft][C++] Clang doesn't support a use of "this" pointer inside inline asm

add triple to test

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

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

8 years ago[Microsoft][C++] Clang doesn't support a use of "this" pointer inside inline asm
Michael Zuckerman [Tue, 15 Dec 2015 14:04:18 +0000 (14:04 +0000)]
[Microsoft][C++] Clang doesn't support a use of "this" pointer inside inline asm

Clang doesn’t support a use of “this” pointer inside inline asm.
When I tried to compile a class or a struct (see example) with an inline asm that contains "this" pointer.
Clang returns with an error.
This patch fixes that.

error: expected unqualified-id
For example:
'''
struct A {
    void f() {
          __asm mov eax, this
              // error: expected unqualified-id
                  }
};
'''
Differential Revision: http://reviews.llvm.org/D15115

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

8 years ago[OPENMP 4.5] Fix test compatibility with 32 bit mode.
Alexey Bataev [Tue, 15 Dec 2015 11:38:29 +0000 (11:38 +0000)]
[OPENMP 4.5] Fix test compatibility with 32 bit mode.

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

8 years ago[OPENMP 4.5] Codegen for 'hint' clause of 'critical' directive
Alexey Bataev [Tue, 15 Dec 2015 10:55:09 +0000 (10:55 +0000)]
[OPENMP 4.5] Codegen for 'hint' clause of 'critical' directive
OpenMP 4.5 defines 'hint' clause for 'critical' directive. Patch adds codegen for this clause.

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

8 years agoclang/test/Analysis/padding_c.c: Suppress a test incompatible to i686-linux.
NAKAMURA Takumi [Tue, 15 Dec 2015 09:37:01 +0000 (09:37 +0000)]
clang/test/Analysis/padding_c.c: Suppress a test incompatible to i686-linux.

  error: 'warning' diagnostics expected but not seen:
    File clang/test/Analysis/padding_c.c Line 194 (directive at clang/test/Analysis/padding_c.c:193): Excessive padding in 'struct DefaultAttrAlign'
  1 error generated.

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

8 years ago[libclang] Add a flag to create the precompiled preamble on the first parse.
Benjamin Kramer [Tue, 15 Dec 2015 09:30:31 +0000 (09:30 +0000)]
[libclang] Add a flag to create the precompiled preamble on the first parse.

Summary:
The current default is to create the preamble on the first reparse, aka
second parse. This is useful for clients that do not want to block when
opening a file because serializing the preamble takes a bit of time.
However, this makes the reparse much more expensive and that may be on the
critical path as it's the first interaction a user has with the source code.

YouCompleteMe currently optimizes for the first code interaction by parsing
the file twice when loaded. That's just unnecessarily slow and this flag
helps to avoid that.

Reviewers: doug.gregor, klimek

Subscribers: cfe-commits

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

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

8 years agoAdd a new matcher to match character types.
Gabor Horvath [Tue, 15 Dec 2015 08:35:45 +0000 (08:35 +0000)]
Add a new matcher to match character types.

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