]> granicus.if.org Git - clang/log
clang
7 years agoStop asserting when a meaningless -std= flag is passed for a non-compilation
Richard Smith [Tue, 14 Feb 2017 23:41:38 +0000 (23:41 +0000)]
Stop asserting when a meaningless -std= flag is passed for a non-compilation
input kind; go back to silently ignoring the flag.

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

7 years agoDo not implicitly instantiate the definition of a class template specialization
Richard Smith [Tue, 14 Feb 2017 23:27:44 +0000 (23:27 +0000)]
Do not implicitly instantiate the definition of a class template specialization
that has been explicitly specialized!

We assume in various places that we can tell the template specialization kind
of a class type by looking at the declaration produced by TagType::getDecl.
That was previously not quite true: for an explicit specialization, we could
have first seen a template-id denoting the specialization (with a use that does
not trigger an implicit instantiation of the defintiion) and then seen the
first explicit specialization declaration. TagType::getDecl would previously
return an arbitrary declaration when called on a not-yet-defined class; it
now consistently returns the most recent declaration in that case.

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

7 years agoImprove diagnostic reporting when using __declspec without enabling __declspec as...
Aaron Ballman [Tue, 14 Feb 2017 22:47:20 +0000 (22:47 +0000)]
Improve diagnostic reporting when using __declspec without enabling __declspec as a keyword.

Fixes PR31936.

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

7 years ago[Driver] Report available language standards on user error
Richard Smith [Tue, 14 Feb 2017 22:44:20 +0000 (22:44 +0000)]
[Driver] Report available language standards on user error

In case user did not provide valid standard name for -std option, available
values (with short description) will be reported.

Patch by PaweÅ‚ Å»ukowski!

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

7 years agoMS inline asm: Filter MXCSR out of the inferred clobber list
Reid Kleckner [Tue, 14 Feb 2017 21:38:17 +0000 (21:38 +0000)]
MS inline asm: Filter MXCSR out of the inferred clobber list

Since r295004, LLVM has started modelling this new register, but we
don't have GCC constraint inline asm spellings for it yet.

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

7 years ago[profiling] Update test cases to deal with name variable change (NFC)
Vedant Kumar [Tue, 14 Feb 2017 20:03:56 +0000 (20:03 +0000)]
[profiling] Update test cases to deal with name variable change (NFC)

This is a re-try of r295085: fix up some test cases that assume that
profile name variables are preserved by the instrprof pass.

This catches one additional case in test/CoverageMapping/unused_names.c.

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

7 years agoRevert "[profiling] Update test case to deal with name variable change (NFC)"
Vedant Kumar [Tue, 14 Feb 2017 20:03:53 +0000 (20:03 +0000)]
Revert "[profiling] Update test case to deal with name variable change (NFC)"

This reverts commit r295085, because the corresponding llvm change was
reverted.

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

7 years agoFinish a comment + remove trailing whitespace. NFC
George Burgess IV [Tue, 14 Feb 2017 19:34:33 +0000 (19:34 +0000)]
Finish a comment + remove trailing whitespace. NFC

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

7 years ago[profiling] Update test case to deal with name variable change (NFC)
Vedant Kumar [Tue, 14 Feb 2017 18:49:03 +0000 (18:49 +0000)]
[profiling] Update test case to deal with name variable change (NFC)

The 'profn' name variables shouldn't show up after we run the instrprof
pass, see https://reviews.llvm.org/D29921 for more details.

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

7 years agoRemove unnecessary std::string construction
Reid Kleckner [Tue, 14 Feb 2017 18:38:40 +0000 (18:38 +0000)]
Remove unnecessary std::string construction

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

7 years agoFix some warnings in intrin.h
Reid Kleckner [Tue, 14 Feb 2017 18:38:19 +0000 (18:38 +0000)]
Fix some warnings in intrin.h

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

7 years ago[scan-build-py] move function report_directory from report module to analyze module
Laszlo Nagy [Tue, 14 Feb 2017 10:43:38 +0000 (10:43 +0000)]
[scan-build-py] move function report_directory from report module to analyze module

Differential Revision: https://reviews.llvm.org/D29255

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

7 years ago[clang-format] Remove dead code in FormatTestComments, NFC
Krasimir Georgiev [Tue, 14 Feb 2017 10:35:42 +0000 (10:35 +0000)]
[clang-format] Remove dead code in FormatTestComments, NFC

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

7 years ago[scan-build-py] use subprocess wrapper to execute build
Laszlo Nagy [Tue, 14 Feb 2017 10:30:50 +0000 (10:30 +0000)]
[scan-build-py] use subprocess wrapper to execute build

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

7 years ago[CodeGen][ObjC] Use the type of the captured field of the enclosing
Akira Hatanaka [Tue, 14 Feb 2017 06:46:55 +0000 (06:46 +0000)]
[CodeGen][ObjC] Use the type of the captured field of the enclosing
block or lambda.

This is a follow-up to r281682, which fixed a bug in computeBlockInfo
where the captured VarDecl's type, rather than the captured field type
of the enclosing lambda or block, was used to compute the layout of a
block.

This commit makes similar changes to enterBlockScope. This is necessary
to correctly determine whether a block capture requires cleanup.

rdar://problem/30388124

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

7 years agoDelete useless / in comment. NFC.
George Burgess IV [Tue, 14 Feb 2017 05:52:57 +0000 (05:52 +0000)]
Delete useless / in comment. NFC.

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

7 years agoAdd a destruct-on-exit function to ASTContext.
George Burgess IV [Tue, 14 Feb 2017 05:37:36 +0000 (05:37 +0000)]
Add a destruct-on-exit function to ASTContext.

It looks like the only use of AddDeallocation is to indirectly call the
destructors of objects. In one case I found
(TypeAliasTemplateDecl::Common), the destructor is a nop, so registering
it to run later seems pointless.

All of the other *::Common types have non-trivial dtors, so deleting the
useless AddDeallocation felt somewhat fragile. Happy to kill it + turn
the is_trivial_dtor check into a static_assert if people think that'd be
better.

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

7 years agoclang/test/Parser/cxx1z-class-template-argument-deduction.cpp: Tweak to ignore thiscall.
NAKAMURA Takumi [Tue, 14 Feb 2017 03:18:24 +0000 (03:18 +0000)]
clang/test/Parser/cxx1z-class-template-argument-deduction.cpp: Tweak to ignore thiscall.

  Line 38: multiple overloads of 'f' instantiate to the same signature 'void (int) __attribute__((thiscall))'

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

7 years agoCanonicalize implicit deduction guide parameter types when forming a deduction
Richard Smith [Tue, 14 Feb 2017 01:49:59 +0000 (01:49 +0000)]
Canonicalize implicit deduction guide parameter types when forming a deduction
guide from a constructor.

The purpose of this change is to avoid triggering instantiation of the class
when substituting back into the deduction guide if it uses a typedef member.
We will still instantiate the class if the constructor (explicitly or
implicitly, directly or indirectly) uses the current instantiation in a way
that we can't canonicalize out, but that seems unavoidable.

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

7 years ago[c++1z] Add some more tests for class template argument deduction, add
Richard Smith [Tue, 14 Feb 2017 00:55:25 +0000 (00:55 +0000)]
[c++1z] Add some more tests for class template argument deduction, add
feature-test macro, and mark feature as done on status page.

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

7 years ago[MS ABI] Correctly mangling vbase destructors
David Majnemer [Tue, 14 Feb 2017 00:54:11 +0000 (00:54 +0000)]
[MS ABI] Correctly mangling vbase destructors

They are a little bit of a special case in the mangling. They are always
mangled without taking into account their virtual-ness of the
destructor. They are also mangled to return void, unlike the actual
destructor.

This fixes PR31931.

Differential Revision: https://reviews.llvm.org/D29912

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

7 years ago[c++1z] Synthesize implicit deduction guides from constructors on demand. Rank
Richard Smith [Tue, 14 Feb 2017 00:25:28 +0000 (00:25 +0000)]
[c++1z] Synthesize implicit deduction guides from constructors on demand. Rank
such guides below explicit ones, and ensure that references to the class's
template parameters are not treated as forwarding references.

We make a few tweaks to the wording in the current standard:
1) The constructor parameter list is copied faithfully to the deduction guide,
   without losing default arguments or a varargs ellipsis (which the standard
   wording loses by omission).
2) If the class template declares no constructors, we add a T() -> T<...> guide
   (which will only ever work if T has default arguments for all non-pack
   template parameters).
3) If the class template declares nothing that looks like a copy or move
   constructor, we add a T(T<...>) -> T<...> guide.
#2 and #3 follow from the "pretend we had a class type with these constructors"
philosophy for deduction guides.

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

7 years agoWhen the new expr's array size is an ICE, emit it as a constant expression.
Nick Lewycky [Mon, 13 Feb 2017 23:49:55 +0000 (23:49 +0000)]
When the new expr's array size is an ICE, emit it as a constant expression.

This bypasses integer sanitization checks which are redundant on the expression since it's been checked by Sema. Fixes a clang codegen assertion on "void test() { new int[0+1]{0}; }" when building with -fsanitize=signed-integer-overflow.

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

7 years ago[CodeCompletion] Code complete the '__auto_type' keyword
Alex Lorenz [Mon, 13 Feb 2017 23:35:59 +0000 (23:35 +0000)]
[CodeCompletion] Code complete the '__auto_type' keyword

rdar://29219185

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

7 years ago[CodeCompletion] Code complete the missing C++11 keywords
Alex Lorenz [Mon, 13 Feb 2017 23:19:40 +0000 (23:19 +0000)]
[CodeCompletion] Code complete the missing C++11 keywords

This commit adds context sensitive code completion support for the C++11
keywords that currently don't have completion results.

The following keywords are supported by this patch:

alignas
constexpr
static_assert
noexcept (as a function/method qualifier)
thread_local

The following special identifiers are also supported:

final (as a method qualifier or class qualifier)
override

rdar://29219185

Differential Revision: https://reviews.llvm.org/D28286

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

7 years ago[test] Make Lit tests C++11 Compatible - Objective-C++
Charles Li [Mon, 13 Feb 2017 23:09:56 +0000 (23:09 +0000)]
[test] Make Lit tests C++11 Compatible - Objective-C++

Set 5 Objective-C++ tests to run at gnu++98

Differential Revision: https://reviews.llvm.org/D29739

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

7 years ago[Test] Make Lit tests C++11 compatible - printf format string
Charles Li [Mon, 13 Feb 2017 18:57:06 +0000 (18:57 +0000)]
[Test] Make Lit tests C++11 compatible - printf format string

Different diagnostics when format string does not match
actual arg type.

This commit contains the first 2 of 3 tests reviewed in D29685

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

7 years ago[CodeGen] Treat auto-generated __dso_handle symbol as HiddenVisibility
Reid Kleckner [Mon, 13 Feb 2017 18:49:21 +0000 (18:49 +0000)]
[CodeGen] Treat auto-generated __dso_handle symbol as HiddenVisibility

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

Based on a patch by Roland McGrath

Reviewed By: phosek

Differential Revision: https://reviews.llvm.org/D29843

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

7 years ago[Test] Make Lit tests C++11 compatible - nounwind noexcept
Charles Li [Mon, 13 Feb 2017 17:56:30 +0000 (17:56 +0000)]
[Test] Make Lit tests C++11 compatible - nounwind noexcept

C++11 destructors are nothrow by default.

Differential Revision: https://reviews.llvm.org/D29859

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

7 years ago[ASTUnit] Clear out diagnostic state after creating the preamble.
Benjamin Kramer [Mon, 13 Feb 2017 16:16:43 +0000 (16:16 +0000)]
[ASTUnit] Clear out diagnostic state after creating the preamble.

If the preamble had diagnostic state this would leave behind invalid
state in the DiagnosticsEngine and crash later. The test case runs into
an assertion in DiagnosticsEngine::setSourceManager.

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

7 years ago[PM] Add support for instrumented PGO in the new pass manager (clang-side)
Davide Italiano [Mon, 13 Feb 2017 16:07:05 +0000 (16:07 +0000)]
[PM] Add support for instrumented PGO in the new pass manager (clang-side)

Differential Revision:  https://reviews.llvm.org/D29309

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

7 years agoFix r291495 -- Normalize LLVM_CMAKE_PATH in clang standalone build.
NAKAMURA Takumi [Mon, 13 Feb 2017 14:59:53 +0000 (14:59 +0000)]
Fix r291495 -- Normalize LLVM_CMAKE_PATH in clang standalone build.

CMake handles paths with slashes. It caused cmake/install failure on msbuild.exe.

Note, Other llvm-config-oriented variables have been normalized since they are stored in the cache attributed with PATH.

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

7 years ago[coroutines] NFC: Refactor Sema::CoroutineBodyStmt construction.
Gor Nishanov [Mon, 13 Feb 2017 05:05:02 +0000 (05:05 +0000)]
[coroutines] NFC: Refactor Sema::CoroutineBodyStmt construction.

Summary:
Sema::CheckCompletedCoroutineBody was growing unwieldy with building all of the substatements. Also, constructors for CoroutineBodyStmt had way too many parameters.

Instead,  CoroutineBodyStmt now defines CtorArgs structure with all of the required construction parameters.
CheckCompleteCoroutineBody delegates construction of individual substatements to short functions one per each substatement.

Also, added a drive-by fix of initializing CoroutinePromise to nullptr in ScopeInfo.h.
And addressed the FIXME that wanted to tail allocate extra room at the end of the CoroutineBodyStmt to hold parameter move expressions. (The comment was longer that the code that implemented tail allocation).

Reviewers: rsmith, EricWF

Subscribers: mehdi_amini, cfe-commits

Differential Revision: https://reviews.llvm.org/D28835

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

7 years agoRevert r294910 and recommit r294861 and r294862 with a target triple to hopefully...
Aaron Ballman [Sun, 12 Feb 2017 19:24:47 +0000 (19:24 +0000)]
Revert r294910 and recommit r294861 and r294862 with a target triple to hopefully appease the bots.

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

7 years agoRevert "Attributes on K&R C functions should not cause incompatible..."
Renato Golin [Sun, 12 Feb 2017 19:08:02 +0000 (19:08 +0000)]
Revert "Attributes on K&R C functions should not cause incompatible..."

...function type with a redeclaration having the same attribute. Fixing this
introduced a secondary problem where we were assuming that K&R functions
could not be attributed types when reporting old-style function definitions
that are not preceded by a prototype."

Also Revert "Hopefully fixes a compile error introduced by r294861."

This reverts commit r294862, r294861, as they bork the ARM builds and
haven't fix it back.

Also, please, short commit titles, long commit decsriptions...

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

7 years agoASTReader: Refactor common code for writing function definitions, to match the writin...
David Blaikie [Sun, 12 Feb 2017 18:45:31 +0000 (18:45 +0000)]
ASTReader: Refactor common code for writing function definitions, to match the writing code

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

7 years ago[Driver] Use stem() and not filename().
Davide Italiano [Sat, 11 Feb 2017 23:44:37 +0000 (23:44 +0000)]
[Driver] Use stem() and not filename().

On Windows the filename might have an extension, namely
`.exe`, so the search will fail. Sorry, I don't have a
good way to test this as it seems to fail only in some
weird configurations. r284430 has the same modification
for Fuchsia.

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

7 years agoCodeGen: use # as the comment leader for ARC marker
Saleem Abdulrasool [Sat, 11 Feb 2017 23:03:13 +0000 (23:03 +0000)]
CodeGen: use # as the comment leader for ARC marker

Use # as the comment leader for AArch64 auto-release elision marker.
This is to keep it in sync with the value used in swift.  When building
libdispatch for Linux AArch64, the auto-release elision marker was
emitted.  However, ELF uses # as the comment leader while MachO accepts
both ; and #.  Use the common marker for it instead.

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

7 years agoCodeGen: annotate ObjC ARC functions with ABI constraints
Saleem Abdulrasool [Sat, 11 Feb 2017 21:34:18 +0000 (21:34 +0000)]
CodeGen: annotate ObjC ARC functions with ABI constraints

Certain ARC runtime functions have an ABI contract of being forwarding.
Annotate the functions with the appropriate `returned` attribute on the
arguments.  This hoists some of the runtime ABI contract information
into the frontend rather than the backend transformations.

The test adjustments are to mark the returned function parameter as
such.  The minor change to the IR output is due to the fact that the
returned reference of the object causes it to extend the lifetime of the
object by returning an autoreleased return value.  The result is that
the explicit objc_autorelease call is no longer formed, as autorelease
elision is now possible on the return.

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

7 years agotest: ignore some warnings in test code (NFC)
Saleem Abdulrasool [Sat, 11 Feb 2017 21:34:15 +0000 (21:34 +0000)]
test: ignore some warnings in test code (NFC)

Silence some diagnostics which clang now generates.  This makes it
easier to see the failures in lit output.  NFC.

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

7 years ago[AVR] Fix __AVR_xxx macro definitions; authored by Peter Wu
Dylan McKay [Sat, 11 Feb 2017 21:06:07 +0000 (21:06 +0000)]
[AVR] Fix __AVR_xxx macro definitions; authored by Peter Wu

Summary:
The -mmcu option for GCC sets macros like __AVR_ATmega328P__ (with the trailing
underscores), be sure to include these underscores for Clangs -mcpu option.

See "AVR Built-in Macros" in https://gcc.gnu.org/onlinedocs/gcc/AVR-Options.html

Reviewers: jroelofs, dylanmckay

Reviewed By: jroelofs, dylanmckay

Subscribers: efriedma, cfe-commits

Differential Revision: https://reviews.llvm.org/D29817

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

7 years agoHopefully fixes a compile error introduced by r294861.
Aaron Ballman [Sat, 11 Feb 2017 18:00:32 +0000 (18:00 +0000)]
Hopefully fixes a compile error introduced by r294861.

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

7 years agoAttributes on K&R C functions should not cause incompatible function type with a...
Aaron Ballman [Sat, 11 Feb 2017 17:49:53 +0000 (17:49 +0000)]
Attributes on K&R C functions should not cause incompatible function type with a redeclaration having the same attribute. Fixing this introduced a secondary problem where we were assuming that K&R functions could not be attributed types when reporting old-style function definitions that are not preceded by a prototype.

This patch fixes PR31020.

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

7 years agodocs: update docs for objc_storeStrong behaviour
Saleem Abdulrasool [Sat, 11 Feb 2017 17:24:09 +0000 (17:24 +0000)]
docs: update docs for objc_storeStrong behaviour

objc_storeStrong does not return a value.

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

7 years agoCodeGen: rename variables to adhere to naming convention
Saleem Abdulrasool [Sat, 11 Feb 2017 17:24:07 +0000 (17:24 +0000)]
CodeGen: rename variables to adhere to naming convention

Adjust style before making more intrusive changes.  NFC.

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

7 years agoSema: simplify conditional execution (NFC)
Saleem Abdulrasool [Sat, 11 Feb 2017 17:24:04 +0000 (17:24 +0000)]
Sema: simplify conditional execution (NFC)

The conditional cast is unnecessary since we know that it will always
succeed.  NFC.

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

7 years agoMake helpers static. NFC.
Benjamin Kramer [Sat, 11 Feb 2017 12:21:17 +0000 (12:21 +0000)]
Make helpers static. NFC.

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

7 years agoUpdate XFAIL line after r294781.
Benjamin Kramer [Sat, 11 Feb 2017 02:00:03 +0000 (02:00 +0000)]
Update XFAIL line after r294781.

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

7 years agoMove test include file from include/ to Inputs/
Richard Trieu [Sat, 11 Feb 2017 00:52:01 +0000 (00:52 +0000)]
Move test include file from include/ to Inputs/

The Inputs/ directory is the recommended location for extra files for test
cases.  No functional change.

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

7 years ago[c++1z] Tests for class template argument deduction in dependent contexts.
Richard Smith [Fri, 10 Feb 2017 23:10:17 +0000 (23:10 +0000)]
[c++1z] Tests for class template argument deduction in dependent contexts.

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

7 years agoDon't let EvaluationModes dictate whether an invalid base is OK
George Burgess IV [Fri, 10 Feb 2017 22:52:29 +0000 (22:52 +0000)]
Don't let EvaluationModes dictate whether an invalid base is OK

What we want to actually control this behavior is something more local
than an EvalutationMode. Please see the linked revision for more
discussion on why/etc.

This fixes PR31843.

Differential Revision: https://reviews.llvm.org/D29469

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

7 years ago[c++1z] Diagnose attempts to use variables with deduced class template
Richard Smith [Fri, 10 Feb 2017 22:35:37 +0000 (22:35 +0000)]
[c++1z] Diagnose attempts to use variables with deduced class template
specialization types from within their own initializers.

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

7 years ago[c++1z] Require an initializer for deduced class template specialization types.
Richard Smith [Fri, 10 Feb 2017 21:40:29 +0000 (21:40 +0000)]
[c++1z] Require an initializer for deduced class template specialization types.

It's actually meaningful and useful to allow such variables to have no
initializer, but we are strictly following the standard here until the C++
committee reaches consensus on allowing this.

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

7 years ago[XRay] Implement powerpc64le xray.
Tim Shen [Fri, 10 Feb 2017 21:03:24 +0000 (21:03 +0000)]
[XRay] Implement powerpc64le xray.

Summary:
powerpc64 big-endian is not supported, but I believe that most logic can
be shared, except for xray_powerpc64.cc.

Also add a function InvalidateInstructionCache to xray_util.h, which is
copied from llvm/Support/Memory.cpp. I'm not sure if I need to add a unittest,
and I don't know how.

Reviewers: dberris, echristo, iteratee, kbarton, hfinkel

Subscribers: mehdi_amini, nemanjai, mgorny, llvm-commits

Differential Revision: https://reviews.llvm.org/D29742

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

7 years ago[c++1z] Enforce restriction that deduction guide is declared in the same scope as...
Richard Smith [Fri, 10 Feb 2017 20:39:58 +0000 (20:39 +0000)]
[c++1z] Enforce restriction that deduction guide is declared in the same scope as its template.

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

7 years ago[c++1z] Disallow deduction guides with deduced types that don't syntactically match...
Richard Smith [Fri, 10 Feb 2017 19:49:50 +0000 (19:49 +0000)]
[c++1z] Disallow deduction guides with deduced types that don't syntactically match the template being deduced.

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

7 years agoclang-format: don't break code using __has_include, PR31908
Nico Weber [Fri, 10 Feb 2017 19:36:52 +0000 (19:36 +0000)]
clang-format: don't break code using __has_include, PR31908

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

7 years ago[libclang] [OpenCL] Expose half type.
Joey Gouly [Fri, 10 Feb 2017 15:51:11 +0000 (15:51 +0000)]
[libclang] [OpenCL] Expose half type.

Expose the half type (fp16) through libclang and the python bindings.

It seems CXType_LastBuiltin was not updated in b2ea6d9 ("Enable
support for __float128 in Clang", 2016-04-13), so update it now.

Add an Index test for OpenCL types; in the future we will add other
OpenCL types such as images to this test.

Patch by Sven van Haastregt.

Differential Revision: https://reviews.llvm.org/D29718

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

7 years agoWdocumentation fixes
Simon Pilgrim [Fri, 10 Feb 2017 12:14:01 +0000 (12:14 +0000)]
Wdocumentation fixes

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

7 years agoTemporarily revert "For X86-64 linux and PPC64 linux align int128 to 16 bytes."
Eric Christopher [Fri, 10 Feb 2017 04:35:21 +0000 (04:35 +0000)]
Temporarily revert "For X86-64 linux and PPC64 linux align int128 to 16 bytes."
until we can get better TargetMachine::isCompatibleDataLayout to compare - otherwise
we can't code generate existing bitcode without a string equality data layout.

This reverts commit r294703.

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

7 years agoFor X86-64 linux and PPC64 linux align int128 to 16 bytes.
Eric Christopher [Fri, 10 Feb 2017 03:32:34 +0000 (03:32 +0000)]
For X86-64 linux and PPC64 linux align int128 to 16 bytes.

For other platforms we should find out what they need and likely
make the same change, however, a smaller additional change is easier
for platforms we know have it specified in the ABI.

clang support for r294702

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

7 years ago[c++1z] In class template argument deduction, all declarators must deduce the same...
Richard Smith [Fri, 10 Feb 2017 03:27:13 +0000 (03:27 +0000)]
[c++1z] In class template argument deduction, all declarators must deduce the same type (just like with auto deduction).

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

7 years ago[Concepts] Class template associated constraints
Hubert Tong [Fri, 10 Feb 2017 02:46:19 +0000 (02:46 +0000)]
[Concepts] Class template associated constraints

Summary:
This adds associated constraints as a property of class templates.
An error is produced if redeclarations are not similarly constrained.

Reviewers: rsmith, faisalv, aaron.ballman

Reviewed By: rsmith

Subscribers: cfe-commits, nwilson

Differential Revision: https://reviews.llvm.org/D25674

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

7 years ago[c++1z] P0512R0: support for 'explicit' specifier on deduction-guides.
Richard Smith [Fri, 10 Feb 2017 02:19:05 +0000 (02:19 +0000)]
[c++1z] P0512R0: support for 'explicit' specifier on deduction-guides.

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

7 years agoSink IsExplicitSpecified flag from CXXConstructorDecl and CXXConversionDecl
Richard Smith [Fri, 10 Feb 2017 01:32:04 +0000 (01:32 +0000)]
Sink IsExplicitSpecified flag from CXXConstructorDecl and CXXConversionDecl
into FunctionDecl. Makes CXXConversionDecl 8 bytes smaller. No functionality
change intended.

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

7 years agoUpdate C style comments to C++ style.
Eric Christopher [Fri, 10 Feb 2017 00:20:26 +0000 (00:20 +0000)]
Update C style comments to C++ style.

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

7 years agoFix the -Werror build by removing an unused default in a fully covered switch
David Blaikie [Fri, 10 Feb 2017 00:06:38 +0000 (00:06 +0000)]
Fix the -Werror build by removing an unused default in a fully covered switch

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

7 years agoAdd support for armv7ve flag in clang (PR31358).
George Burgess IV [Thu, 9 Feb 2017 23:30:10 +0000 (23:30 +0000)]
Add support for armv7ve flag in clang (PR31358).

This is a followup change to add v7ve support to clang for gcc
compatibility. Please see r294661.

Patch by Manoj Gupta.

Differential Revision: https://reviews.llvm.org/D29773

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

7 years agoDon't try to link to the 4.0 release notes
Hans Wennborg [Thu, 9 Feb 2017 23:26:34 +0000 (23:26 +0000)]
Don't try to link to the 4.0 release notes

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

7 years agoDisallow explicit instantiation and explicit specialization for deduction guides.
Richard Smith [Thu, 9 Feb 2017 22:47:51 +0000 (22:47 +0000)]
Disallow explicit instantiation and explicit specialization for deduction guides.

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

7 years agoDiagnose attempts to explicitly instantiate a template at class scope. Previously...
Richard Smith [Thu, 9 Feb 2017 22:14:25 +0000 (22:14 +0000)]
Diagnose attempts to explicitly instantiate a template at class scope. Previously Clang would simply ignore the 'template' keyword in this case.

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

7 years ago[DebugInfo] Added support to Clang FE for generating debug info for preprocessor...
Amjad Aboud [Thu, 9 Feb 2017 22:07:24 +0000 (22:07 +0000)]
[DebugInfo] Added support to Clang FE for generating debug info for preprocessor macros.

Added "-fdebug-macro" flag (and "-fno-debug-macro" flag) to enable (and to disable) emitting macro debug info.
Added CC1 "-debug-info-macro" flag that enables emitting macro debug info.

Differential Revision: https://reviews.llvm.org/D16135

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

7 years ago[docs] coverage: Clarify which flags enable gcov-style profiling (NFC)
Vedant Kumar [Thu, 9 Feb 2017 21:33:21 +0000 (21:33 +0000)]
[docs] coverage: Clarify which flags enable gcov-style profiling (NFC)

Point out that --coverage and -ftest-coverage, which is what most people
are used to, do not enable clang's frontend based coverage pass.

Suggested by Benn Bolay!

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

7 years ago[CodeGen] Remove unneeded `private`. NFCI.
Davide Italiano [Thu, 9 Feb 2017 21:19:51 +0000 (21:19 +0000)]
[CodeGen] Remove unneeded `private`. NFCI.

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

7 years agoRename IsExplicitSpecialization -> IsMemberSpecialization when we're talking
Richard Smith [Thu, 9 Feb 2017 21:04:43 +0000 (21:04 +0000)]
Rename IsExplicitSpecialization -> IsMemberSpecialization when we're talking
about member specializations to avoid ambiguous and confusing terminology.

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

7 years ago[c++1z] P0091R3: Basic support for deducing class template arguments via deduction...
Richard Smith [Thu, 9 Feb 2017 19:17:44 +0000 (19:17 +0000)]
[c++1z] P0091R3: Basic support for deducing class template arguments via deduction-guides.

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

7 years ago[windows] Fix test for cl driver.
Marcos Pividori [Thu, 9 Feb 2017 18:40:52 +0000 (18:40 +0000)]
[windows] Fix test for cl driver.

cl-link.c test was failing after r294604 because of the change in the order of
parameters.

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

7 years ago[MS] Implement the __fastfail intrinsic as a builtin
Reid Kleckner [Thu, 9 Feb 2017 18:31:06 +0000 (18:31 +0000)]
[MS] Implement the __fastfail intrinsic as a builtin

__fastfail terminates the process immediately with a special system
call. It does not run any process shutdown code or exception recovery
logic.

Fixes PR31854

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

7 years ago[windows] [asan] Add wholearchive flag when including asan_cxx lib.
Marcos Pividori [Thu, 9 Feb 2017 18:22:35 +0000 (18:22 +0000)]
[windows] [asan] Add wholearchive flag when including asan_cxx lib.

We need -wholearchive for asan_cxx, the same than for asan.
Clang Driver will add asan_cxx at the beginning of the arg list that we pass to
the linker. To ensure that all the static libraries are linked to asan_cxx, we
force the linker to include the object files in asan_cxx.

This fixes some linker errors when compiling with address sanitizer for MT and
passing the static library libFuzzer.

Differential Revision: https://reviews.llvm.org/D29754

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

7 years ago[clang-format] Fix typo in comment.
Krasimir Georgiev [Thu, 9 Feb 2017 09:02:13 +0000 (09:02 +0000)]
[clang-format] Fix typo in comment.

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

7 years ago[X86] Fix copy and paste bug in clzero test from r294559.
Craig Topper [Thu, 9 Feb 2017 06:22:43 +0000 (06:22 +0000)]
[X86] Fix copy and paste bug in clzero test from r294559.

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

7 years ago[X86] Clzero flag addition and inclusion under znver1
Craig Topper [Thu, 9 Feb 2017 06:10:14 +0000 (06:10 +0000)]
[X86] Clzero flag addition and inclusion under znver1

1. Adds the command line flag for clzero.
2. Includes the clzero flag under znver1.
3. Defines the macro for clzero.
4. Adds a new file which has the intrinsic definition for clzero instruction.

Patch by Ganesh Gopalasubramanian with some additional tests from me.

Differential revision: https://reviews.llvm.org/D29386

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

7 years agoAdd check that "#define unix 1" is present for the PS4 target.
Douglas Yung [Thu, 9 Feb 2017 00:07:38 +0000 (00:07 +0000)]
Add check that "#define unix 1" is present for the PS4 target.

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

7 years ago[sancov] pc_guard_init is called at least once per DSO.
Mike Aizatsky [Wed, 8 Feb 2017 21:28:39 +0000 (21:28 +0000)]
[sancov] pc_guard_init is called at least once per DSO.

Summary: Documentation update for https://reviews.llvm.org/D29662

Differential Revision: https://reviews.llvm.org/D29722

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

7 years agoInitialize builtins during modular codegen
David Blaikie [Wed, 8 Feb 2017 20:51:11 +0000 (20:51 +0000)]
Initialize builtins during modular codegen

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

7 years agoMore fixes for places where 'decltype(auto)' is permitted in the C++ grammar but...
Richard Smith [Wed, 8 Feb 2017 20:39:08 +0000 (20:39 +0000)]
More fixes for places where 'decltype(auto)' is permitted in the C++ grammar but makes no sense.

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

7 years agoDon't crash on 'decltype(auto)::'. Rather than treating it as a meaningless
Richard Smith [Wed, 8 Feb 2017 19:58:48 +0000 (19:58 +0000)]
Don't crash on 'decltype(auto)::'. Rather than treating it as a meaningless
nested-name-specifier (as the standard appears to require), treat it as the
type specifier 'decltype(auto)' followed by a nested-name-specifier starting
with '::'.

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

7 years ago[Lit Test] Make tests C++11 compatible - Parse OpenMP
Charles Li [Wed, 8 Feb 2017 19:46:15 +0000 (19:46 +0000)]
[Lit Test] Make tests C++11 compatible - Parse OpenMP

Differential Revision: https://reviews.llvm.org/D29725

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

7 years ago[MS] Fix C++ destructor thunk line info for a declaration
Reid Kleckner [Wed, 8 Feb 2017 16:09:32 +0000 (16:09 +0000)]
[MS] Fix C++ destructor thunk line info for a declaration

Sometimes the MS ABI needs to emit thunks for declarations that don't
have bodies. Destructor thunks make calls to inlinable functions, so
they need line info or LLVM will complain.

Fixes PR31893

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

7 years ago[clang-format] Move OriginalPrefix from base to subclass.
Krasimir Georgiev [Wed, 8 Feb 2017 14:45:19 +0000 (14:45 +0000)]
[clang-format] Move OriginalPrefix from base to subclass.

Summary:
OriginalPrefix is only needed for line comment sections. Moved from the base class to the child class.
No functional changes.

Reviewers: djasper

Reviewed By: djasper

Subscribers: cfe-commits, klimek

Differential Revision: https://reviews.llvm.org/D29716

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

7 years ago[clang-format] Move comment tests to their own file.
Krasimir Georgiev [Wed, 8 Feb 2017 12:53:18 +0000 (12:53 +0000)]
[clang-format] Move comment tests to their own file.

Summary: With a growing suite of comment-related tests, it makes sense to take them out of the main test file. No functional changes.

Reviewers: djasper

Reviewed By: djasper

Subscribers: cfe-commits, klimek, mgorny

Differential Revision: https://reviews.llvm.org/D29713

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

7 years ago[clang-format] Break before a sequence of line comments aligned with the next line.
Krasimir Georgiev [Wed, 8 Feb 2017 10:30:44 +0000 (10:30 +0000)]
[clang-format] Break before a sequence of line comments aligned with the next line.

Summary:
Make the comment alignment respect sections of line comments originally alinged
with the next token. Until now the decision how to break a continuous sequence
of line comments into sections was taken without reference to the next token.

source:
```
class A {
public: // comment about public
  // comment about a
  int a;
}
```

format before:
```
class A {
public: // comment about public
        // comment about a
  int a;
}
```

format after:
```
class A {
public: // comment about public
  // comment about a
  int a;
}
```

Reviewers: djasper, klimek

Reviewed By: klimek

Subscribers: cfe-commits, klimek

Differential Revision: https://reviews.llvm.org/D29626

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

7 years ago[X86] Add -mprefetchwt1/-mno-prefetchwt1 command line options and __PREFETCHWT1__...
Craig Topper [Wed, 8 Feb 2017 08:23:40 +0000 (08:23 +0000)]
[X86] Add -mprefetchwt1/-mno-prefetchwt1 command line options and __PREFETCHWT1__ define to match gcc.

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

7 years ago[X86] Add -msgx/-mno-sgx command line options and __SGX__ define to match gcc.
Craig Topper [Wed, 8 Feb 2017 08:23:17 +0000 (08:23 +0000)]
[X86] Add -msgx/-mno-sgx command line options and __SGX__ define to match gcc.

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

7 years ago[X86] Update command line documentation for -mclwb and -mmovbe which I forgot in...
Craig Topper [Wed, 8 Feb 2017 07:57:01 +0000 (07:57 +0000)]
[X86] Update command line documentation for -mclwb and -mmovbe which I forgot in my previous commits.

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

7 years ago[X86] Add -mmpx/-mno-mpx command line options and __MPX__ define to match gcc.
Craig Topper [Wed, 8 Feb 2017 07:56:42 +0000 (07:56 +0000)]
[X86] Add -mmpx/-mno-mpx command line options and __MPX__ define to match gcc.

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

7 years ago[X86] Add -mclwb/-mno-clwb command line arguments and __CLWB__ define to match gcc.
Craig Topper [Wed, 8 Feb 2017 07:36:58 +0000 (07:36 +0000)]
[X86] Add -mclwb/-mno-clwb command line arguments and __CLWB__ define to match gcc.

In the future, we should also add a clwb intrinsic to the backend, a frontend builtin, and an instrinsic header file.

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

7 years ago[X86] Remove 'umip' feature flag.
Craig Topper [Wed, 8 Feb 2017 07:13:22 +0000 (07:13 +0000)]
[X86] Remove 'umip' feature flag.

This feature flag indicates that the processor has support for removing certain instructions from user mode software. But the feature flag by itself doesn't indicate if the support is enabled in the OS. The affected instructions aren't even instructions the compiler would emit. So I don't think think this feature flag should be in the compiler.

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

7 years ago[X86] Add -mmovbe/-mno-movbe command line options to match gcc.
Craig Topper [Wed, 8 Feb 2017 07:13:19 +0000 (07:13 +0000)]
[X86] Add -mmovbe/-mno-movbe command line options to match gcc.

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

7 years ago[X86] Add -mclflushopt/-mno-clflushopt command line support and __CLFLUSHOPT__ define...
Craig Topper [Wed, 8 Feb 2017 06:48:58 +0000 (06:48 +0000)]
[X86] Add -mclflushopt/-mno-clflushopt command line support and __CLFLUSHOPT__ define to match gcc.

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