]> granicus.if.org Git - clang/log
clang
10 years agoModify how the loop hint attribute is printed as a lead-up to supporting constant...
Tyler Nowicki [Tue, 29 Jul 2014 17:21:32 +0000 (17:21 +0000)]
Modify how the loop hint attribute is printed as a lead-up to supporting constant expression values.

Reviewed by Aaron Ballman

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

10 years agoDataflowWorklist.h - "We should have a description here of what this code does, not...
Artyom Skrobov [Tue, 29 Jul 2014 16:10:25 +0000 (16:10 +0000)]
DataflowWorklist.h - "We should have a description here of what this code does, not just where it's used."

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

10 years agoAArch64: Resolve some FIXMEs in CGBuiltin left over from backend merge
Yi Kong [Tue, 29 Jul 2014 09:25:17 +0000 (09:25 +0000)]
AArch64: Resolve some FIXMEs in CGBuiltin left over from backend merge

Merge vrshr_n_v and vqshlu_n_v with ARM.

Remove FIXME comments for others as they can't actually be shared.

NFC.

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

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

10 years ago[OPENMP] Additional comments for implicit 'flush' clause + removed unused parameter...
Alexey Bataev [Tue, 29 Jul 2014 09:17:39 +0000 (09:17 +0000)]
[OPENMP] Additional comments for implicit 'flush' clause + removed unused parameter from method classof().

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

10 years ago3.5 => 3.6
Sylvestre Ledru [Tue, 29 Jul 2014 07:07:31 +0000 (07:07 +0000)]
3.5 => 3.6

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

10 years agoRevert "Emit column debug information for loads"
Tobias Grosser [Tue, 29 Jul 2014 06:53:14 +0000 (06:53 +0000)]
Revert "Emit column debug information for loads"

This broke the following gdb tests:

gdb.base__annota1.exp
gdb.base__consecutive.exp
gdb.python__py-symtab.exp
gdb.reverse__consecutive-precsave.exp
gdb.reverse__consecutive-reverse.exp

I will look into this.

This reverts commit 214162.

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

10 years agoEmit column debug information for loads
Tobias Grosser [Tue, 29 Jul 2014 06:10:47 +0000 (06:10 +0000)]
Emit column debug information for loads

This allows us to give more precise diagnostics.

Diego kindly tested the impact on debug info size: "The increase on average
debug sizes is 0.1%. The total file size increase is ~0%."

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

10 years ago[modules] Add testcase for a bug reduced from a selfhost issue. This bug was
Richard Smith [Tue, 29 Jul 2014 00:58:01 +0000 (00:58 +0000)]
[modules] Add testcase for a bug reduced from a selfhost issue. This bug was
never present in Clang trunk, but was present in some of my development work,
and it seems like a useful test to have.

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

10 years agoRevert accidentally-committed files in r214151.
Richard Smith [Tue, 29 Jul 2014 00:54:09 +0000 (00:54 +0000)]
Revert accidentally-committed files in r214151.

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

10 years ago[modules] Add missing #include, found by modules build. We need a class
Richard Smith [Tue, 29 Jul 2014 00:51:47 +0000 (00:51 +0000)]
[modules] Add missing #include, found by modules build. We need a class
definition in order to apply isa<...>.

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

10 years agoFix up handling of ARM options for controlling strict alignment.
Bob Wilson [Tue, 29 Jul 2014 00:23:18 +0000 (00:23 +0000)]
Fix up handling of ARM options for controlling strict alignment.

The -mstrict-align option was originally added in r167619 as a target-
independent option. It was then changed in r167623 to be implemented with an
ARM-specific backend option, even though the code remained in the
target-independent Clang::ConstructJob function. This means that if you used
the -mstrict-align option with a non-ARM target, you would still get the
-arm-strict-align option getting passed to the backend, which was harmless
but gross. The driver option was then replaced by the GCC-compatible
-m[no-]unaligned-access option (r189175) and modified to work with AArch64
(r208075). However, in the process, the help text for -mstrict-align was
incorrectly changed to show it as only being supported for AArch64. Even worse,
the logic for handling these options together with -mkernel was wrong for
AArch64, where -mkernel does not currently imply strict alignment.

This patch fixes up all of those things. Besides the obvious change to the
option help text, it moves the logic into the ARM and AArch64-specific parts
of the driver, so that the option will be correctly ignored for non-ARM
targets. <rdar://problem/17823697>

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

10 years agoAdd a location to MS inline asm blobs
Reid Kleckner [Mon, 28 Jul 2014 23:12:59 +0000 (23:12 +0000)]
Add a location to MS inline asm blobs

This isn't nearly as elaborate as the GCC inline asm which emits an
array of source locations, but it's very, very hard to trigger backend
diagnostics in MS inline asm because we parse it up front with good
source information, unlike GCC inline asm.

Currently I can trigger a "inline assembly requires more registers than
available" diagnostic with this code:

  void foo();
  void bar() {
    __asm pusha
    __asm call foo
    __asm popa
  }

However, if I committed that as a test case, I would have to remove it
once I fix PR20052.

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

10 years agoRemove a nonsense friend declaration.
Richard Smith [Mon, 28 Jul 2014 22:42:21 +0000 (22:42 +0000)]
Remove a nonsense friend declaration.

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

10 years ago[Debug Info] add DISubroutineType and its creation takes DITypeArray.
Manman Ren [Mon, 28 Jul 2014 22:24:34 +0000 (22:24 +0000)]
[Debug Info] add DISubroutineType and its creation takes DITypeArray.

This is the last patch to unique the type array of a subroutine type.
This is the paired commit with llvm r214132.

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

10 years ago[modules] PR20475: merging support for alias template declarations.
Richard Smith [Mon, 28 Jul 2014 21:16:37 +0000 (21:16 +0000)]
[modules] PR20475: merging support for alias template declarations.

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

10 years agoChange __INTx_TYPE__ to be always signed. This changes the value for
Joerg Sonnenberger [Mon, 28 Jul 2014 21:06:22 +0000 (21:06 +0000)]
Change __INTx_TYPE__ to be always signed. This changes the value for
char-based types from "char" to "signed char". Adjust stdint.h to use
__INTx_TYPE__ directly without prefixing it with signed and to use
__UINTx_TYPE__ for unsigned ones.

The value of __INTx_TYPE__ now matches GCC.

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

10 years ago[Debug Info] rename getTypeArray to getElements, setTypeArray to setArrays.
Manman Ren [Mon, 28 Jul 2014 19:14:41 +0000 (19:14 +0000)]
[Debug Info] rename getTypeArray to getElements, setTypeArray to setArrays.

This is the paired commit with llvm r214112.

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

10 years agoAdd another keyword-selection flag to CorrectionCandidateCallback.
Kaelyn Takata [Mon, 28 Jul 2014 18:14:02 +0000 (18:14 +0000)]
Add another keyword-selection flag to CorrectionCandidateCallback.

The new flag, WantFunctionLikeCasts, covers a subset of the keywords
covered by WantTypeSpecifiers that can be used in casts that look like
function calls, e.g. "return long(5);", while excluding the keywords
like "enum" and "const" that would be included when WantTypeSpecifiers
is true but cannot be used in something that looks like a function call.

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

10 years agoFix MSVC warnings about falling off the end of a non-void function
Reid Kleckner [Mon, 28 Jul 2014 17:48:12 +0000 (17:48 +0000)]
Fix MSVC warnings about falling off the end of a non-void function

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

10 years ago[AVX512] Add non-masking FP store intrinsics
Adam Nemet [Mon, 28 Jul 2014 17:14:45 +0000 (17:14 +0000)]
[AVX512] Add non-masking FP store intrinsics

Part of <rdar://problem/17688758>

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

10 years ago[AVX512] Add FP add/sub/mul intrinsics
Adam Nemet [Mon, 28 Jul 2014 17:14:42 +0000 (17:14 +0000)]
[AVX512] Add FP add/sub/mul intrinsics

Part of <rdar://problem/17688758>

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

10 years ago[AVX512] Reorder functions in avx512fintrin.h
Adam Nemet [Mon, 28 Jul 2014 17:14:40 +0000 (17:14 +0000)]
[AVX512] Reorder functions in avx512fintrin.h

There is no functional change here.

The idea is to have a similar order and categories of functions that we have
in avxintrin.h.

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

10 years ago[AVX512] Bring the formatting of avx512fintrin.h closer to avxintrin.h
Adam Nemet [Mon, 28 Jul 2014 17:14:38 +0000 (17:14 +0000)]
[AVX512] Bring the formatting of avx512fintrin.h closer to avxintrin.h

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

10 years ago[AVX512] Add CHECK-LABELs to test/CodeGen/avx512f-builtins.c
Adam Nemet [Mon, 28 Jul 2014 17:14:36 +0000 (17:14 +0000)]
[AVX512] Add CHECK-LABELs to test/CodeGen/avx512f-builtins.c

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

10 years agoObjective-C. Improve diagnostic when property is
Fariborz Jahanian [Mon, 28 Jul 2014 16:35:45 +0000 (16:35 +0000)]
Objective-C. Improve diagnostic when property is
not auto synthesized in current implementation.
rdar://17774815

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

10 years agoThread Safety Analysis: Replace the old and broken SExpr with the new
DeLesley Hutchins [Mon, 28 Jul 2014 15:57:27 +0000 (15:57 +0000)]
Thread Safety Analysis:  Replace the old and broken SExpr with the new
til::SExpr.  This is a large patch, with many small changes to pretty printing
and expression lowering to make the new SExpr representation equivalent in
functionality to the old.

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

10 years ago[TEST] Improve tests for #pragma clang optimize off/on
Dario Domizioli [Mon, 28 Jul 2014 14:33:17 +0000 (14:33 +0000)]
[TEST] Improve tests for #pragma clang optimize off/on

Added coverage for:
* More than one "off region" in the same file
* An "off region" falling off the end of an included file

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

10 years agoclang-format: [proto] Improve formatting of text-proto options.
Daniel Jasper [Mon, 28 Jul 2014 14:08:09 +0000 (14:08 +0000)]
clang-format: [proto] Improve formatting of text-proto options.

Initial patch and tests by Kaushik Sridharan, thank you!

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

10 years agoclang-format: Improve operator and template recognition.
Daniel Jasper [Mon, 28 Jul 2014 13:19:58 +0000 (13:19 +0000)]
clang-format: Improve operator and template recognition.

Before:
  static_assert(is_convertible < A &&, B > ::value, "AAA");

After:
  static_assert(is_convertible<A &&, B>::value, "AAA");

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

10 years ago[PowerPC] Support ELFv1/ELFv2 ABI selection via -mabi= option
Ulrich Weigand [Mon, 28 Jul 2014 13:17:52 +0000 (13:17 +0000)]
[PowerPC] Support ELFv1/ELFv2 ABI selection via -mabi= option

While Clang now supports both ELFv1 and ELFv2 ABIs, their use is currently
hard-coded via the target triple: powerpc64-linux is always ELFv1, while
powerpc64le-linux is always ELFv2.

These are of course the most common scenarios, but in principle it is
possible to support the ELFv2 ABI on big-endian or the ELFv1 ABI on
little-endian systems (and GCC does support that), and there are some
special use cases for that (e.g. certain Linux kernel versions could
only be built using ELFv1 on LE).

This patch implements the Clang side of supporting this, based on the
LLVM commit 214072.  The command line options -mabi=elfv1 or -mabi=elfv2
select the desired ABI if present.  (If not, Clang uses the same default
rules as now.)

Specifically, the patch implements the following changes based on the
presence of the -mabi= option:

In the driver:
- Pass the appropiate -target-abi flag to the back-end
- Select the correct dynamic loader version (/lib64/ld64.so.[12])

In the preprocessor:
- Define _CALL_ELF to the appropriate value (1 or 2)

In the compiler back-end:
- Select the correct ABI in TargetInfo.cpp
- Select the desired ABI for LLVM via feature (elfv1/elfv2)

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

10 years agoclang-format: Improve pointer/reference detection.
Daniel Jasper [Mon, 28 Jul 2014 12:24:21 +0000 (12:24 +0000)]
clang-format: Improve pointer/reference detection.

Before (with left pointer alignment):
  void f(int i = 0, SomeType* *temps = NULL);

After:
  void f(int i = 0, SomeType** temps = NULL);

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

10 years agoclang-format: Fix unary operator recognition.
Daniel Jasper [Mon, 28 Jul 2014 12:08:16 +0000 (12:08 +0000)]
clang-format: Fix unary operator recognition.

Before:
  int x = ~ * p;

After:
  int x = ~*p;

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

10 years agoclang-format: Fix formatting of lock annotations in lambda definitions.
Daniel Jasper [Mon, 28 Jul 2014 12:08:06 +0000 (12:08 +0000)]
clang-format: Fix formatting of lock annotations in lambda definitions.

Before:
  SomeFunction([](int i)LOCKS_EXCLUDED(a) {});

After:
  SomeFunction([](int i) LOCKS_EXCLUDED(a) {});

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

10 years agoDataflowWorklist.h: Appease msc17 -- Split a private constructor to DataflowWorklistBase.
NAKAMURA Takumi [Mon, 28 Jul 2014 11:33:49 +0000 (11:33 +0000)]
DataflowWorklist.h: Appease msc17 -- Split a private constructor to DataflowWorklistBase.

MSC17 isn't capable to invoke other constructors in its scope.

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

10 years agoFactoring DataflowWorklist out of LiveVariables and UninitializedValues analyses
Artyom Skrobov [Mon, 28 Jul 2014 08:47:38 +0000 (08:47 +0000)]
Factoring DataflowWorklist out of LiveVariables and UninitializedValues analyses

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

10 years agoAdd missing override keyword to OpenBSD IsIntegratedAssemblerDefault().
Brad Smith [Mon, 28 Jul 2014 01:57:32 +0000 (01:57 +0000)]
Add missing override keyword to OpenBSD IsIntegratedAssemblerDefault().

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

10 years agoWrap to 80 columns. No behavior change.
Nico Weber [Mon, 28 Jul 2014 00:02:09 +0000 (00:02 +0000)]
Wrap to 80 columns. No behavior change.

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

10 years agoFix default argument comma disambiguation bug following the 'template' keyword.
Richard Smith [Sun, 27 Jul 2014 05:38:12 +0000 (05:38 +0000)]
Fix default argument comma disambiguation bug following the 'template' keyword.

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

10 years agoWhen looking for temporary dtors while building the CFG, do not walk into
Richard Smith [Sun, 27 Jul 2014 05:12:49 +0000 (05:12 +0000)]
When looking for temporary dtors while building the CFG, do not walk into
lambda expressions (other than their capture initializers) nor blocks. Do walk
into default argument expressions and default initializer expressions.

These bugs were causing us to produce broken CFGs whenever a lambda expression
was used to initialize a libstdc++ std::function object!

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

10 years ago[modules] Add some missing record names. We really should be generating this from...
Richard Smith [Sun, 27 Jul 2014 04:29:04 +0000 (04:29 +0000)]
[modules] Add some missing record names. We really should be generating this from a .def file or similar...

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

10 years ago[modules] Add abbreviation for ImplicitCastExpr. This is the most common
Richard Smith [Sun, 27 Jul 2014 04:19:32 +0000 (04:19 +0000)]
[modules] Add abbreviation for ImplicitCastExpr. This is the most common
record type in LLVM's IR module.

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

10 years agoWrap to 80 columns. No behavior change.
Nico Weber [Sun, 27 Jul 2014 04:09:29 +0000 (04:09 +0000)]
Wrap to 80 columns. No behavior change.

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

10 years agoWrap to 80 columns. No behavior change.
Nico Weber [Sat, 26 Jul 2014 23:20:08 +0000 (23:20 +0000)]
Wrap to 80 columns. No behavior change.

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

10 years agoWrap to 80 columns, no functionality change.
Nico Weber [Sat, 26 Jul 2014 22:15:25 +0000 (22:15 +0000)]
Wrap to 80 columns, no functionality change.

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

10 years agoObjective-C. Issue more warning diagnostic when certain
Fariborz Jahanian [Sat, 26 Jul 2014 20:52:26 +0000 (20:52 +0000)]
Objective-C. Issue more warning diagnostic when certain
properties are not synthesized in property auto-synthesis,
as it can potentiall lead to runtime errors.
rdar://17774815

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

10 years ago[Driver][Mips] Check output of -dynamic-linker arguments by the Clang driver
Simon Atanasyan [Sat, 26 Jul 2014 09:52:21 +0000 (09:52 +0000)]
[Driver][Mips] Check output of -dynamic-linker arguments by the Clang driver
for a couple of MIPS toolchains.

No functional changes.

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

10 years ago[modules] Improve abbreviations for C++:
Richard Smith [Sat, 26 Jul 2014 06:37:51 +0000 (06:37 +0000)]
[modules] Improve abbreviations for C++:

 * Add abbreviation for CXXMethodDecl and for FunctionProtoType. These come up
   a *lot* in C++ modules.
 * Allow typedef declarations to use the abbreviation if they're class members,
   or if they're used.

In passing, add more record name records for Clang AST node kinds.

The downside is that we had already used up our allotment of 12 abbreviations,
so this pushes us to an extra bit on each record to support the extra abbrev
kinds, which increases file size by ~1%. This patch *barely* pays for that
through the other improvements, but we've got room for another 18 abbrevs,
so we should be able to make it much more profitable with future changes.

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

10 years agoParse: Don't crash on trailing whitespace before EOF
David Majnemer [Sat, 26 Jul 2014 05:41:31 +0000 (05:41 +0000)]
Parse: Don't crash on trailing whitespace before EOF

Parser::ParseDeclarationSpecifiers eagerly updates the source range of
the DeclSpec with the current token position.  However, it might not
consume any more tokens.

Fix this by only setting the start of the range, not the end.  This way
the SourceRange will be invalid if we don't consume any more tokens.

This fixes PR20413.

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

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

10 years agoclang/test/CodeGenCXX/microsoft-abi-byval-thunks.cpp: Fix for -Asserts, like CHECK64...
NAKAMURA Takumi [Sat, 26 Jul 2014 04:12:34 +0000 (04:12 +0000)]
clang/test/CodeGenCXX/microsoft-abi-byval-thunks.cpp: Fix for -Asserts, like CHECK64 does.

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

10 years agoIf a template argument is non-evaluable expression, use the profile ID to see
Richard Trieu [Sat, 26 Jul 2014 02:10:52 +0000 (02:10 +0000)]
If a template argument is non-evaluable expression, use the profile ID to see
if the two arguments are equal.

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

10 years agoMS ABI: Use musttail for vtable thunks that pass arguments by value
Reid Kleckner [Sat, 26 Jul 2014 01:34:32 +0000 (01:34 +0000)]
MS ABI: Use musttail for vtable thunks that pass arguments by value

This moves some memptr specific code into the generic thunk emission
codepath.

Fixes PR20053.

Reviewers: majnemer

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

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

10 years agoRemove an extra parameter and C++11 for loop-ify this code
Reid Kleckner [Sat, 26 Jul 2014 01:30:05 +0000 (01:30 +0000)]
Remove an extra parameter and C++11 for loop-ify this code

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

10 years agoAdd a missing close quote in "while building module 'Foo:" diagnostic.
Jordan Rose [Sat, 26 Jul 2014 01:22:02 +0000 (01:22 +0000)]
Add a missing close quote in "while building module 'Foo:" diagnostic.

This isn't a real diagnostic kind, only a location note, and this form isn't even
used if the SourceManager can provide a valid presumed location. But still.

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

10 years agoR600: Add processor type for Mullins
Tom Stellard [Sat, 26 Jul 2014 01:05:20 +0000 (01:05 +0000)]
R600: Add processor type for Mullins

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

10 years agoRevert new test from 213993.
Bob Wilson [Sat, 26 Jul 2014 00:51:28 +0000 (00:51 +0000)]
Revert new test from 213993.

It requires an arm backend and also writes output in the test directory.

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

10 years agoImprove -UNDEBUG binary size. We don't need a different assert fail message for
Richard Smith [Sat, 26 Jul 2014 00:47:13 +0000 (00:47 +0000)]
Improve -UNDEBUG binary size. We don't need a different assert fail message for
each different enum value here.

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

10 years agoUse -enable-global-merge option to match llvm r210639. <rdar://problem/17803206>
Bob Wilson [Sat, 26 Jul 2014 00:37:28 +0000 (00:37 +0000)]
Use -enable-global-merge option to match llvm r210639. <rdar://problem/17803206>

llvm revision 210639 renamed the -global-merge backend option to
-enable-global-merge. This change simply updates clang to match that.

Patch by Steven Wu!

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

10 years agoclang/test/CodeGenCXX/cxx1y-variable-template-linkage.cpp: Appease -Asserts build.
NAKAMURA Takumi [Sat, 26 Jul 2014 00:28:09 +0000 (00:28 +0000)]
clang/test/CodeGenCXX/cxx1y-variable-template-linkage.cpp: Appease -Asserts build.

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

10 years agoMS ABI: Ensure 'this' is first for byval+sret methods
Reid Kleckner [Sat, 26 Jul 2014 00:12:26 +0000 (00:12 +0000)]
MS ABI: Ensure 'this' is first for byval+sret methods

Previously we were building up the inalloca struct in the usual pattern
of return type followed by arguments.  However, on Windows, 'this'
always precedes the 'sret' parameter, so we need to insert it into the
struct first as a special case.

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

10 years agoAdd test case for fix of linkage bug that miscompiled variable templates instantiated...
Larisse Voufo [Fri, 25 Jul 2014 23:58:13 +0000 (23:58 +0000)]
Add test case for fix of linkage bug that miscompiled variable templates instantiated from similarly named local types (cf. r212233)

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

10 years agoFix my broken test case in NDEBUG :(
Reid Kleckner [Fri, 25 Jul 2014 21:52:11 +0000 (21:52 +0000)]
Fix my broken test case in NDEBUG  :(

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

10 years agoFix my busted FileCheck invocation
Reid Kleckner [Fri, 25 Jul 2014 21:48:10 +0000 (21:48 +0000)]
Fix my busted FileCheck invocation

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

10 years agoMS ABI: Don't push destructor cleanups for aggregate parameters in thunks
Reid Kleckner [Fri, 25 Jul 2014 21:39:46 +0000 (21:39 +0000)]
MS ABI: Don't push destructor cleanups for aggregate parameters in thunks

The target method of the thunk will perform the cleanup.  This can't be
tested in 32-bit x86 yet because passing something by value would create
an inalloca, and we refuse to generate broken code for that.

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

10 years agoNow that PIC generation on PPC32 is supported, hook up linking support
Joerg Sonnenberger [Fri, 25 Jul 2014 20:57:24 +0000 (20:57 +0000)]
Now that PIC generation on PPC32 is supported, hook up linking support
for NetBSD.

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

10 years agoRevert r213437
Warren Hunt [Fri, 25 Jul 2014 20:52:51 +0000 (20:52 +0000)]
Revert r213437
We no longer plan to use __except_hander3 and rather use custom
personality functions per __try block.

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

10 years agoObjective-C. Warn if protocol used in an @protocol
Fariborz Jahanian [Fri, 25 Jul 2014 19:45:01 +0000 (19:45 +0000)]
Objective-C. Warn if protocol used in an @protocol
expression is a forward declaration as this results
in undefined behavior. rdar://17768630

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

10 years agoReturn a StringRef in getDefaultUniversalArchName.
Rafael Espindola [Fri, 25 Jul 2014 19:22:51 +0000 (19:22 +0000)]
Return a StringRef in getDefaultUniversalArchName.

Patch by Stephen Drake.

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

10 years agoclang-cl: Add support for /Zp
David Majnemer [Fri, 25 Jul 2014 17:30:10 +0000 (17:30 +0000)]
clang-cl: Add support for /Zp

CL's /Zp flag is analogous to GCC's -fpack-struct, it controls the
default maximum alignment of records.

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

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

10 years ago[Driver][Mips] Remove "fp64" directories from the mips-mti-linux-gnu toolchain
Simon Atanasyan [Fri, 25 Jul 2014 11:20:21 +0000 (11:20 +0000)]
[Driver][Mips] Remove "fp64" directories from the mips-mti-linux-gnu toolchain
directories description. Released version of this toolchain has not separate
libraries for -mfp64 command line option.

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

10 years agoRevert part of r206963
James Molloy [Fri, 25 Jul 2014 10:19:47 +0000 (10:19 +0000)]
Revert part of r206963

Specifically the part where we removed a warning to be compatible with GCC, which has been widely regarded as a bad idea.

I'm not quite happy with how obtuse this warning is, especially in the fairly common case of a 32-bit integer literal, so I've got another patch awaiting review that adds a fixit to reduce confusion.

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

10 years ago[OPENMP] Improved codegen for outlined functions for 'parallel' directives.
Alexey Bataev [Fri, 25 Jul 2014 07:55:17 +0000 (07:55 +0000)]
[OPENMP] Improved codegen for outlined functions for 'parallel' directives.

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

10 years ago[OPENMP] Improved DSA processing of the loop control variables for loop directives.
Alexey Bataev [Fri, 25 Jul 2014 06:27:47 +0000 (06:27 +0000)]
[OPENMP] Improved DSA processing of the loop control variables for loop directives.

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

10 years ago[modules] Substantially improve handling of #undef:
Richard Smith [Fri, 25 Jul 2014 04:40:03 +0000 (04:40 +0000)]
[modules] Substantially improve handling of #undef:

 * Track override set across module load and save
 * Track originating module to allow proper re-export of #undef
 * Make override set properly transitive when it picks up a #undef

This fixes nearly all of the remaining macro issues with self-host.

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

10 years agoFix test/CodeGen/ms-inline-asm.c from r213916.
Ehsan Akhgari [Fri, 25 Jul 2014 02:39:33 +0000 (02:39 +0000)]
Fix test/CodeGen/ms-inline-asm.c from r213916.

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

10 years agoFix test/CodeGen/ms-inline-asm.cpp from r213916.
Ehsan Akhgari [Fri, 25 Jul 2014 02:35:50 +0000 (02:35 +0000)]
Fix test/CodeGen/ms-inline-asm.cpp from r213916.

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

10 years agoclang-cl: Merge adjacent single-line __asm blocks
Ehsan Akhgari [Fri, 25 Jul 2014 02:27:14 +0000 (02:27 +0000)]
clang-cl: Merge adjacent single-line __asm blocks

Summary:
This patch extends the __asm parser to make it keep parsing input tokens
as inline assembly if a single-line __asm line is followed by another line
starting with __asm too.  It also makes sure that we correctly keep
matching braces in such situations by separating the notions of how many
braces we are matching and whether we are in single-line asm block mode.

Reviewers: rnk

Subscribers: cfe-commits

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

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

10 years agoPR20445: Properly transform the initializer in a CXXNewExpr rather than running
Richard Smith [Fri, 25 Jul 2014 01:12:44 +0000 (01:12 +0000)]
PR20445: Properly transform the initializer in a CXXNewExpr rather than running
it through the normal TreeTransform logic for Exprs (which will strip off
implicit parts of the initialization and never re-create them).

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

10 years agoPass the PrintingPolicy when converting types to strings in template type
Richard Trieu [Fri, 25 Jul 2014 00:24:02 +0000 (00:24 +0000)]
Pass the PrintingPolicy when converting types to strings in template type
diffing.  This removes extra "struct"/"class" in the type names and gives
"bool" instead of "_Bool" for booleans.

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

10 years agoPrint "(default)" for default template template arguments to match the
Richard Trieu [Thu, 24 Jul 2014 23:14:16 +0000 (23:14 +0000)]
Print "(default)" for default template template arguments to match the
printing of other types.

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

10 years agoUse ELF in the clang-interpreter on windows.
Rafael Espindola [Thu, 24 Jul 2014 20:47:42 +0000 (20:47 +0000)]
Use ELF in the clang-interpreter on windows.

We don't support loading COFF files yet.

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

10 years agoPreserve libclang ABI compatibility with the 3.5 release
Reid Kleckner [Thu, 24 Jul 2014 18:22:15 +0000 (18:22 +0000)]
Preserve libclang ABI compatibility with  the 3.5 release

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

10 years agoAdd support for #pragma nounroll.
Mark Heffernan [Thu, 24 Jul 2014 18:09:38 +0000 (18:09 +0000)]
Add support for #pragma nounroll.

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

10 years agoAttempt at fixing the windows shared build.
Rafael Espindola [Thu, 24 Jul 2014 17:38:18 +0000 (17:38 +0000)]
Attempt at fixing the windows shared build.

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

10 years agoUse MCJIT.
Rafael Espindola [Thu, 24 Jul 2014 17:13:09 +0000 (17:13 +0000)]
Use MCJIT.

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

10 years agoRemove the last use of llvm::ExecutionEngine::create.
Rafael Espindola [Thu, 24 Jul 2014 15:54:23 +0000 (15:54 +0000)]
Remove the last use of llvm::ExecutionEngine::create.

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

10 years agoImproving the "integer constant too large" diagnostics based on post-commit feedback...
Aaron Ballman [Thu, 24 Jul 2014 14:51:23 +0000 (14:51 +0000)]
Improving the "integer constant too large" diagnostics based on post-commit feedback from Richard Smith. Amends r213657.

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

10 years agoSetting the documentation heading for #pragma unroll, which should not be with the...
Aaron Ballman [Thu, 24 Jul 2014 14:13:59 +0000 (14:13 +0000)]
Setting the documentation heading for #pragma unroll, which should not be with the heading for #pragma clang loop.

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

10 years ago[CMake] LexTests: Prune redundant libdep(s).
NAKAMURA Takumi [Thu, 24 Jul 2014 11:44:03 +0000 (11:44 +0000)]
[CMake] LexTests: Prune redundant libdep(s).

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

10 years agoMachO: use "arm64" as the triple name in modules.
Tim Northover [Thu, 24 Jul 2014 10:25:34 +0000 (10:25 +0000)]
MachO: use "arm64" as the triple name in modules.

Current versions of ld64 can't cope with "aarch64" being stored. I'm fixing
that, but in the transitionary period we'll need to still emit "arm64".

rdar://problem/17783765

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

10 years ago[OPENMP] Initial parsing and sema analysis for clause 'seq_cst' of 'atomic' directive.
Alexey Bataev [Thu, 24 Jul 2014 08:55:34 +0000 (08:55 +0000)]
[OPENMP] Initial parsing and sema analysis for clause 'seq_cst' of 'atomic' directive.

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

10 years ago[OPENMP] Initial parsing and sema analysis for clause 'capture' in 'atomic' directive.
Alexey Bataev [Thu, 24 Jul 2014 06:46:57 +0000 (06:46 +0000)]
[OPENMP] Initial parsing and sema analysis for clause 'capture' in 'atomic' directive.

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

10 years agoMS ABI: -fno-rtti-data wasn't data-free enough
David Majnemer [Thu, 24 Jul 2014 06:09:19 +0000 (06:09 +0000)]
MS ABI: -fno-rtti-data wasn't data-free enough

While -fno-rtti-data would correctly avoid referencing the RTTI complete
object locator in the VFTable itself, it would emit them anyway.

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

10 years agoAdd support for nullptr template arguments to template type diffing.
Richard Trieu [Thu, 24 Jul 2014 04:24:50 +0000 (04:24 +0000)]
Add support for nullptr template arguments to template type diffing.

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

10 years ago[modules] Slightly expand module semantics documentation.
Richard Smith [Thu, 24 Jul 2014 03:42:38 +0000 (03:42 +0000)]
[modules] Slightly expand module semantics documentation.

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

10 years agoSimplify MacroInfo lifetime management. We don't need three different functions
Richard Smith [Thu, 24 Jul 2014 03:25:00 +0000 (03:25 +0000)]
Simplify MacroInfo lifetime management. We don't need three different functions
to destroy one of these.

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

10 years ago[OPENMP] Fixed DSA detecting for function parameters: by default they must be private.
Alexey Bataev [Thu, 24 Jul 2014 02:33:58 +0000 (02:33 +0000)]
[OPENMP] Fixed DSA detecting for function parameters: by default they must be private.

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

10 years agoTake the canonical type when forming a canonical template argument with
Richard Smith [Thu, 24 Jul 2014 02:27:39 +0000 (02:27 +0000)]
Take the canonical type when forming a canonical template argument with
'nullptr' value. Fixes profiling of such template arguments to always give the
same value.

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

10 years agoRemove unused Prev pointer from MacroInfo chain.
Richard Smith [Thu, 24 Jul 2014 01:13:23 +0000 (01:13 +0000)]
Remove unused Prev pointer from MacroInfo chain.

Remove pointless MICache: it only ever contained up to 1 object, and was only
non-empty when recovering from an error. There's no performance or memory win
from maintaining this cache.

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

10 years agoReplace r213816's fix with a different one. It's not meaningful to call
Richard Smith [Wed, 23 Jul 2014 23:50:25 +0000 (23:50 +0000)]
Replace r213816's fix with a different one. It's not meaningful to call
isOnePastTheEnd on an invalid designator, so assert and push the check into the
one caller that wasn't already checking.

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

10 years agoSplit -Winvalid-command-line-argument into -Wignored-optimization-argument
Reid Kleckner [Wed, 23 Jul 2014 23:29:01 +0000 (23:29 +0000)]
Split -Winvalid-command-line-argument into -Wignored-optimization-argument

Reviewers: rsmith, nlewycky

Subscribers: cfe-commits

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

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