Commit Graph

36733 Commits

Author SHA1 Message Date
Robert Khasanov 3b6616c3a3 [SKX] Enabling SKX target (Skylake server chip)
a) add SKX support to Clang driver;
b) add tests for SKX target and AVX512BW, AVX512DQ, AVX512VL features into clang driver tests

Patch by Zinovy Nis <zinovy.y.nis@intel.com>

llvm-svn: 214306
2014-07-30 13:53:40 +00:00
Fraser Cormack 152493b635 Fix OpenCL/SPIR kernel_arg_type metadata node
This fixes a bug where kernel_arg_type was always changing 'unsigned ' to 'u'
for any parameter type, including non-canonical types.

Example:
  typedef unsigned int myunsignedint;
would report:
  "myunt"

llvm-svn: 214305
2014-07-30 13:41:12 +00:00
Daniel Jasper 71646ec206 clang-format: Understand 'typename' in placement new.
Before:
  new (aaaaaaaaaaaaaaaaaaaaaaaaaa(
      aaaaaaaaaaaaaaaaaaaaaaa)) typename aaaaaaaaaaaaaaaaaaaaaaaa();

After:
  new (aaaaaaaaaaaaaaaaaaaaaaaaaa(aaaaaaaaaaaaaaaaaaaaaaa))
      typename aaaaaaaaaaaaaaaaaaaaaaaa();

llvm-svn: 214300
2014-07-30 12:14:10 +00:00
Simon Atanasyan 1b0542ecee [Driver][Mips] Add function-wrapper so simplify creation of `Multilib` objects.
No functional changes.

llvm-svn: 214294
2014-07-30 09:15:10 +00:00
David Majnemer f8d3864dbe AST: Simplify some code
Iterator invalidation issues already force us to do one lookup and one
insert.
Don't use the particular bit-pattern of the 'Align' field to determine
whether or not we have already inserted into the TypeInfo DenseMap;
instead ask for an iterator to the TypeInfo entry.

llvm-svn: 214293
2014-07-30 08:42:33 +00:00
Manuel Klimek b0042c414e Fix some cases of incorrect handling of lifetime extended temporaries.
MaterializeTemporaryExpr already contains information about the lifetime
of the temporary; if the lifetime is not the full statement, we do not
want to emit a destructor at the end of the full statement for it.

llvm-svn: 214292
2014-07-30 08:34:42 +00:00
David Majnemer 8d5f9ab2cc MS ABI: Mangle alias templates used as template-template arguments
A templated using declaration may be used as a template-template
argument.

Unfortunately, the VS "14" chooses '?' as the sole marker for the
argument.  This is problematic because it presupposes the possibility of
using more than one template-aliases as arguments to the same template.

This fixes PR20047.

llvm-svn: 214290
2014-07-30 08:20:03 +00:00
Rafael Espindola eaa88c1eee Simplify the code.
Thanks to David Balkie for the suggestion.

llvm-svn: 214286
2014-07-30 04:40:23 +00:00
Rafael Espindola e122ee1fab Fix a use after free bug.
llvm-svn: 214281
2014-07-30 02:37:26 +00:00
David Majnemer 34b5749989 MS ABI: Consider alignment attributes on typedefs for layout
The MS ABI has a notion of 'required alignment' for fields; this
alignment supercedes pragma pack directives.

MSVC takes into account alignment attributes on typedefs when
determining whether or not a field has a certain required alignment.

Do the same in clang by tracking whether or not we saw such an attribute
when calculating the type's bitwidth and alignment.

This fixes PR20418.

Reviewers: rnk

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

llvm-svn: 214274
2014-07-30 01:30:47 +00:00
Larisse Voufo f73da98f48 Not all instantiated variable is odr-used. Do not mark non-odr-used variable template specializations as such.
llvm-svn: 214267
2014-07-30 00:49:55 +00:00
Richard Smith a0ce9c4651 [modules] Factor out ODR checking, to avoid unnecessary repeated work in
finishPendingActions loop.

llvm-svn: 214246
2014-07-29 23:23:27 +00:00
Richard Smith 00db2f13f8 PR20473: Don't "deduplicate" string literals with the same value but different
lengths! In passing, simplify string literal deduplication by relying on LLVM
to deduplicate the underlying constant values.

llvm-svn: 214222
2014-07-29 21:20:12 +00:00
Bob Wilson 9e6e0751b3 Support LIBRARY_PATH on all Darwin targets.
r197490 changed the behavior of LIBRARY_PATH to try to match GCC's behavior
for cross compilers and make clang work better on "bare metal" targets.
Unfortunately that change is breaking a number of MacPorts projects because
the LIBRARY_PATH environment variable is being ignored when compiling on a
64-bit host for a 32-bit target. Because the host and target architectures
differ, isCrossCompiling returns true. This does not make sense for Darwin,
where multiple architectures are supported natively via "fat" Mach-O slices
and where development is generally done against SDKs regardless. This patch
fixes the problem by overriding isCrossCompiling to return false for Darwin
toolchains.

llvm-svn: 214208
2014-07-29 20:17:52 +00:00
Larisse Voufo 4e673c95fb Fix typo.
llvm-svn: 214193
2014-07-29 18:45:54 +00:00
Larisse Voufo b6fab26109 Fix PR10177 where non-type template arguments to alias templates are not marked as used in dependent contexts. The fix actually forces non-dependent names to be checked at template definition time as expected from the standard.
llvm-svn: 214192
2014-07-29 18:44:19 +00:00
Tyler Nowicki 884fc613e6 Modify how the loop hint attribute is printed as a lead-up to supporting constant expression values.
Reviewed by Aaron Ballman

llvm-svn: 214185
2014-07-29 17:21:32 +00:00
Yi Kong 1083eb5c11 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

llvm-svn: 214173
2014-07-29 09:25:17 +00:00
Alexey Bataev 2b5f3f0124 [OPENMP] Additional comments for implicit 'flush' clause + removed unused parameter from method classof().
llvm-svn: 214172
2014-07-29 09:17:39 +00:00
Tobias Grosser b3af390087 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.

llvm-svn: 214163
2014-07-29 06:53:14 +00:00
Tobias Grosser 01b923d55b 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%."

llvm-svn: 214162
2014-07-29 06:10:47 +00:00
Bob Wilson 0874e538aa 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>

llvm-svn: 214148
2014-07-29 00:23:18 +00:00
Reid Kleckner 4db3256aec 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.

llvm-svn: 214141
2014-07-28 23:12:59 +00:00
Manman Ren 67f005e3b2 [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.

llvm-svn: 214133
2014-07-28 22:24:34 +00:00
Richard Smith f59b735a80 [modules] PR20475: merging support for alias template declarations.
llvm-svn: 214124
2014-07-28 21:16:37 +00:00
Joerg Sonnenberger 3d9478cf3a 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.

llvm-svn: 214119
2014-07-28 21:06:22 +00:00
Manman Ren 51289892d2 [Debug Info] rename getTypeArray to getElements, setTypeArray to setArrays.
This is the paired commit with llvm r214112.

llvm-svn: 214113
2014-07-28 19:14:41 +00:00
Kaelyn Takata b04846b4cd 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.

llvm-svn: 214109
2014-07-28 18:14:02 +00:00
Adam Nemet fce1ad0b99 [AVX512] Add non-masking FP store intrinsics
Part of <rdar://problem/17688758>

llvm-svn: 214099
2014-07-28 17:14:45 +00:00
Adam Nemet a3ebe6214b [AVX512] Add FP add/sub/mul intrinsics
Part of <rdar://problem/17688758>

llvm-svn: 214098
2014-07-28 17:14:42 +00:00
Adam Nemet 0d5bb5530d [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.

llvm-svn: 214097
2014-07-28 17:14:40 +00:00
Adam Nemet 9a3ea60a2c [AVX512] Bring the formatting of avx512fintrin.h closer to avxintrin.h
llvm-svn: 214096
2014-07-28 17:14:38 +00:00
DeLesley Hutchins ea1f83385f 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.

llvm-svn: 214089
2014-07-28 15:57:27 +00:00
Daniel Jasper a382cbe4eb clang-format: [proto] Improve formatting of text-proto options.
Initial patch and tests by Kaushik Sridharan, thank you!

llvm-svn: 214084
2014-07-28 14:08:09 +00:00
Daniel Jasper 6ba1638f0b 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");

llvm-svn: 214075
2014-07-28 13:19:58 +00:00
Ulrich Weigand 8afad61a93 [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)

llvm-svn: 214074
2014-07-28 13:17:52 +00:00
Daniel Jasper 8184d66f4b 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);

llvm-svn: 214071
2014-07-28 12:24:21 +00:00
Daniel Jasper 2ac3fdfd4a clang-format: Fix unary operator recognition.
Before:
  int x = ~ * p;

After:
  int x = ~*p;

llvm-svn: 214070
2014-07-28 12:08:16 +00:00
Daniel Jasper 8b76d608b8 clang-format: Fix formatting of lock annotations in lambda definitions.
Before:
  SomeFunction([](int i)LOCKS_EXCLUDED(a) {});

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

llvm-svn: 214069
2014-07-28 12:08:06 +00:00
Artyom Skrobov 12ce6d91a1 Factoring DataflowWorklist out of LiveVariables and UninitializedValues analyses
llvm-svn: 214064
2014-07-28 08:47:38 +00:00
Brad Smith 636b6a2fd7 Add missing override keyword to OpenBSD IsIntegratedAssemblerDefault().
llvm-svn: 214060
2014-07-28 01:57:32 +00:00
Nico Weber c153d2427c Wrap to 80 columns. No behavior change.
llvm-svn: 214059
2014-07-28 00:02:09 +00:00
Richard Smith 9303357e73 Fix default argument comma disambiguation bug following the 'template' keyword.
llvm-svn: 214051
2014-07-27 05:38:12 +00:00
Richard Smith 4137af286f 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!

llvm-svn: 214050
2014-07-27 05:12:49 +00:00
Richard Smith f1b4b8bf79 [modules] Add some missing record names. We really should be generating this from a .def file or similar...
llvm-svn: 214049
2014-07-27 04:29:04 +00:00
Richard Smith a27c26e7d8 [modules] Add abbreviation for ImplicitCastExpr. This is the most common
record type in LLVM's IR module.

llvm-svn: 214048
2014-07-27 04:19:32 +00:00
Nico Weber 21ad7e5243 Wrap to 80 columns. No behavior change.
llvm-svn: 214047
2014-07-27 04:09:29 +00:00
Nico Weber 6381633c63 Wrap to 80 columns. No behavior change.
llvm-svn: 214038
2014-07-26 23:20:08 +00:00
Nico Weber 61281faa45 Wrap to 80 columns, no functionality change.
llvm-svn: 214036
2014-07-26 22:15:25 +00:00
Fariborz Jahanian 6c9ee7b0c8 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

llvm-svn: 214032
2014-07-26 20:52:26 +00:00
Richard Smith 01b2cb4772 [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.

llvm-svn: 214024
2014-07-26 06:37:51 +00:00
David Majnemer 24b283005d 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

llvm-svn: 214018
2014-07-26 05:41:31 +00:00
Richard Trieu 97bacec221 If a template argument is non-evaluable expression, use the profile ID to see
if the two arguments are equal.

llvm-svn: 214008
2014-07-26 02:10:52 +00:00
Reid Kleckner ab2090d107 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

llvm-svn: 214004
2014-07-26 01:34:32 +00:00
Reid Kleckner 3f76ac7daa Remove an extra parameter and C++11 for loop-ify this code
llvm-svn: 214003
2014-07-26 01:30:05 +00:00
Jordan Rose 6dcdaa6af3 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.

llvm-svn: 214002
2014-07-26 01:22:02 +00:00
Tom Stellard 14e03967ab R600: Add processor type for Mullins
llvm-svn: 213999
2014-07-26 01:05:20 +00:00
Richard Smith a0cbfc9d75 Improve -UNDEBUG binary size. We don't need a different assert fail message for
each different enum value here.

llvm-svn: 213996
2014-07-26 00:47:13 +00:00
Bob Wilson 25363c00e4 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!

llvm-svn: 213993
2014-07-26 00:37:28 +00:00
Reid Kleckner 852361d217 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.

llvm-svn: 213990
2014-07-26 00:12:26 +00:00
Reid Kleckner 19819446eb 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.

llvm-svn: 213976
2014-07-25 21:39:46 +00:00
Joerg Sonnenberger c888757a2d Now that PIC generation on PPC32 is supported, hook up linking support
for NetBSD.

llvm-svn: 213972
2014-07-25 20:57:24 +00:00
Warren Hunt f6be4cb4cb Revert r213437
We no longer plan to use __except_hander3 and rather use custom 
personality functions per __try block.

llvm-svn: 213971
2014-07-25 20:52:51 +00:00
Fariborz Jahanian a57d91c2ae Objective-C. Warn if protocol used in an @protocol
expression is a forward declaration as this results
in undefined behavior. rdar://17768630

llvm-svn: 213968
2014-07-25 19:45:01 +00:00
Rafael Espindola 42db11e1f2 Return a StringRef in getDefaultUniversalArchName.
Patch by Stephen Drake.

llvm-svn: 213964
2014-07-25 19:22:51 +00:00
Simon Atanasyan 5116b4a9f9 [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.

llvm-svn: 213937
2014-07-25 11:20:21 +00:00
James Molloy 8a157bf8f2 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.

llvm-svn: 213935
2014-07-25 10:19:47 +00:00
Alexey Bataev d6c57554f9 [OPENMP] Improved codegen for outlined functions for 'parallel' directives.
llvm-svn: 213927
2014-07-25 07:55:17 +00:00
Alexey Bataev caf09b01fc [OPENMP] Improved DSA processing of the loop control variables for loop directives.
llvm-svn: 213925
2014-07-25 06:27:47 +00:00
Richard Smith daa69e00f5 [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.

llvm-svn: 213922
2014-07-25 04:40:03 +00:00
Ehsan Akhgari 2f93b448a8 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

llvm-svn: 213916
2014-07-25 02:27:14 +00:00
Richard Smith c6abd96bff 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).

llvm-svn: 213913
2014-07-25 01:12:44 +00:00
Richard Trieu d86c901f29 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.

llvm-svn: 213912
2014-07-25 00:24:02 +00:00
Richard Trieu 116083159c Print "(default)" for default template template arguments to match the
printing of other types.

llvm-svn: 213902
2014-07-24 23:14:16 +00:00
Mark Heffernan c888e41c0c Add support for #pragma nounroll.
llvm-svn: 213885
2014-07-24 18:09:38 +00:00
Aaron Ballman 31f42318d8 Improving the "integer constant too large" diagnostics based on post-commit feedback from Richard Smith. Amends r213657.
llvm-svn: 213865
2014-07-24 14:51:23 +00:00
Tim Northover 02a979fd1e 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

llvm-svn: 213852
2014-07-24 10:25:34 +00:00
Alexey Bataev 82bad8b026 [OPENMP] Initial parsing and sema analysis for clause 'seq_cst' of 'atomic' directive.
llvm-svn: 213846
2014-07-24 08:55:34 +00:00
Alexey Bataev 459dec0ca2 [OPENMP] Initial parsing and sema analysis for clause 'capture' in 'atomic' directive.
llvm-svn: 213842
2014-07-24 06:46:57 +00:00
David Majnemer 65f8732c14 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.

llvm-svn: 213841
2014-07-24 06:09:19 +00:00
Richard Trieu 3880089fc7 Add support for nullptr template arguments to template type diffing.
llvm-svn: 213840
2014-07-24 04:24:50 +00:00
Richard Smith 73a29662b9 Simplify MacroInfo lifetime management. We don't need three different functions
to destroy one of these.

llvm-svn: 213837
2014-07-24 03:25:00 +00:00
Alexey Bataev 8b9cb9833f [OPENMP] Fixed DSA detecting for function parameters: by default they must be private.
llvm-svn: 213835
2014-07-24 02:33:58 +00:00
Richard Smith 78bb36f159 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.

llvm-svn: 213834
2014-07-24 02:27:39 +00:00
Richard Smith ee0c4c1673 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.

llvm-svn: 213825
2014-07-24 01:13:23 +00:00
Richard Smith 33b44ab2b7 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.

llvm-svn: 213820
2014-07-23 23:50:25 +00:00
Reid Kleckner 142dd46c2a Add a missing Invalid check to SubobjectDesignator::isOnePastEnd()
The class seems to have an invariant that Entries is non-empty if
Invalid is false.  It appears this method was previously private, and
all internal uses checked Invalid.  Now there is an external caller, so
check Invalid to avoid array OOB underflow.

Fixes PR20420.

llvm-svn: 213816
2014-07-23 23:24:25 +00:00
Richard Smith a507bfc6b9 PR20228: don't retain a pointer to a vector element after the container has been resized.
llvm-svn: 213790
2014-07-23 20:07:08 +00:00
Mark Heffernan 450c23843e In unroll pragma syntax and loop hint metadata, change "enable" forms to a new form using the string "full".
llvm-svn: 213771
2014-07-23 17:31:31 +00:00
Ben Langmuir b537a3a651 Add stopgap option -fmodule-implementation-of <name>
This flag specifies that we are building an implementation file of the
module <name>, preventing importing <name> as a module. This does not
consider this to be the 'current module' for the purposes of doing
modular checks like decluse or non-modular-include warnings, unlike
-fmodule-name.

This is needed as a stopgap until:
1) we can resolve relative includes to a VFS-mapped module (or can
   safely import a header textually and as part of a module)

and ideally
2) we can safely do incremental rebuilding when implementation files
   import submodules.

llvm-svn: 213767
2014-07-23 15:30:23 +00:00
Daniel Jasper 3dfa09bbbc Prevent assert in ASTMatchFinder.
If nodes without memoization data (e.g. TypeLocs) are bound to specific
names, that effectively prevents memoization as those elements cannot be
compared effectively. If it is tried anyway, this can lead to an assert
as demonstrated in the new test.

In the long term, the better solution will be to enable DynTypedNodes
without memoization data. For now, simply skip memoization instead.

llvm-svn: 213751
2014-07-23 13:17:47 +00:00
Tim Northover 40956e64f2 AArch64: update Clang for merged arm64/aarch64 triples.
The main subtlety here is that the Darwin tools still need to be given "-arch
arm64" rather than "-arch aarch64". Fortunately this already goes via a custom
function to handle weird edge-cases in other architectures, and it tested.

I removed a few arm64_be tests because that really isn't an interesting thing
to worry about. No-one using big-endian is also referring to the target as
arm64 (at least as far as toolchains go). Mostly they date from when arm64 was
a separate target and we *did* need a parallel name simply to test it at all.
Now aarch64_be is sufficient.

llvm-svn: 213744
2014-07-23 12:32:58 +00:00
Daniel Sanders 54d8ee6d7b [mips] -mno-shared should only be given to the assembler when -fPIC/-fpic/-fPIE/-fpie is not in effect.
This fixes compiler recursion on MIPS32r2.

llvm-svn: 213741
2014-07-23 12:06:13 +00:00
Alexey Bataev 67a4f22f12 [OPENMP] Initial parsing and sema analysis for 'update' clause of 'atomic' directive.
llvm-svn: 213735
2014-07-23 10:25:33 +00:00
Simon Atanasyan c92717f2f6 [Driver][Mips] Restore FIXME comment was removed accidentally.
llvm-svn: 213734
2014-07-23 09:27:10 +00:00
Yi Kong cd08139865 Add module map entry for ARM ACLE header file
llvm-svn: 213731
2014-07-23 09:00:21 +00:00
Alexey Bataev dea4761c06 [OPENMP] Initial parsing an sema analysis for 'write' clause of 'atomic' directive.
llvm-svn: 213728
2014-07-23 07:46:59 +00:00
Nico Weber 9386c82d56 Improve diagnostic on default-initializing const variables (PR20208).
This tweaks the diagnostic wording slighly, and adds a fixit on a note.
An alternative would be to add the fixit directly on the diagnostic, see
the review thread linked to from the bug for a few notes on that approach.

llvm-svn: 213725
2014-07-23 05:16:10 +00:00
Richard Smith a593419593 AST printer: fix double space before base class with no access specifier.
llvm-svn: 213719
2014-07-23 03:22:10 +00:00
Richard Smith a4bb292095 When pretty-printing a declaration of a pack, put the ellipsis before the name
being declared, not at the end. When pretty-printing a non-type template
parameter, put the name of the parameter in the middle of the type, not at the
end.

llvm-svn: 213718
2014-07-23 03:17:06 +00:00