Commit Graph

58922 Commits

Author SHA1 Message Date
Alexandros Lamprineas eb73228888 - Refactored ARMTargetInfo in order to use the API of llvm/lib/Support/TargetParser.cpp
for extracting target specific information.
- Patch for commit 241267: ShouldUseInlineAtomic was set incorrectly when subArch was
  not specified, causing regressions.

Change-Id: Iabb35d59722f4972f1a3ab4365880add5bbcfdcc
llvm-svn: 241343
2015-07-03 11:57:23 +00:00
Daniel Jasper 5a3de1d0e1 clang-format: [JS] Allow line breaks after TypeScript type colons.
llvm-svn: 241339
2015-07-03 10:37:23 +00:00
Daniel Jasper 043ac05010 clang-format: [Java/JS] Properly support instanceof and its precedence.
llvm-svn: 241337
2015-07-03 10:12:53 +00:00
Alexey Bataev 81c7ea0ec3 [OPENMP 4.0] Fixed codegen for 'cancellation point' construct.
Generate the next code for 'cancellation point':
if (__kmpc_cancellationpoint()) {
  __kmpc_cancel_barrier();
  <exit construct>;
}

llvm-svn: 241336
2015-07-03 09:56:58 +00:00
Yaron Keren 40178c352e Revert r241330. It compiled with Visual C++ 2013 and gcc 4.9.1 (mingw) but now fails the bots.
llvm-svn: 241335
2015-07-03 09:30:33 +00:00
Yaron Keren 452670165c Replace some const std::string & with llvm::StringRef or std::string
and std::move to avoid implicit std::string construction.

Patch by Eugene Kosov.

llvm-svn: 241330
2015-07-03 09:16:20 +00:00
NAKAMURA Takumi 24536c8b47 clang/test/CodeGenCXX/trap-fnattr.cpp: Tweak to match MS-mangled names.
llvm-svn: 241328
2015-07-03 08:21:27 +00:00
Justin Bogner 2d74ae53f2 Driver: Replace a couple of out of date terms in the docs
The Job base class was removed in r241310, so replace a couple of
references to it with Command. Also change another use of Job with
Action, since that's the term used in the source.

llvm-svn: 241327
2015-07-03 08:03:43 +00:00
Yaron Keren d30f5ffddc Revert r241319, investigating.
llvm-svn: 241321
2015-07-03 05:31:54 +00:00
Yaron Keren 25bb2e4709 Replace some const std::string & with llvm::StringRef or std::string
and std::move to avoid implicit std::string construction.

Part 1/2.

Patch by Eugene Kosov.

llvm-svn: 241319
2015-07-03 05:09:59 +00:00
Akira Hatanaka 6f9cfaf85b Make corrections to r241314.
The return type of a function follows the signext attribute.

llvm-svn: 241315
2015-07-03 01:05:19 +00:00
Akira Hatanaka 5720be5e34 Fix test case to appease buildbot.
Test case trap-fnattr.cpp was failng on clang-ppc64-elf-linux2 because ppc64
sign-extends the i32 return value.
 
This is a follow-up to r241306.

llvm-svn: 241314
2015-07-03 00:50:30 +00:00
Justin Bogner 0cd9248d9e Driver: Remove the Job class. NFC
We had a strange relationship here where we made a list of Jobs
inherit from a single Job, but there weren't actually any places where
this arbitrary nesting was used or needed.

Simplify all of this by removing Job entirely and updating all of the
users to either work with a JobList or a single Command.

llvm-svn: 241310
2015-07-02 22:52:08 +00:00
Justin Bogner 94817612e2 Driver: Don't use reserved names. NFC
llvm-svn: 241309
2015-07-02 22:52:04 +00:00
Akira Hatanaka 85365cd72a Attach attribute "trap-func-name" to call sites of llvm.trap and llvm.debugtrap.
This is needed to use clang's command line option "-ftrap-function" for LTO and
enable changing the trap function name on a per-call-site basis.

rdar://problem/21225723

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

llvm-svn: 241306
2015-07-02 22:15:41 +00:00
Benjamin Kramer 642f173ae9 Switch users of the 'for (StmtRange range = stmt->children(); range; ++range)‘ pattern to range for loops.
The pattern was born out of the lack of range-based for loops in C++98
and is somewhat obscure. No functionality change intended.

llvm-svn: 241300
2015-07-02 21:03:14 +00:00
Benjamin Kramer 9c218592c8 [CodeGen] Use llvm::join to simplify string joining.
While there replace stable_sort of std::string with just sort, stability
is not necessary for "simple" value types. No functional change intended.

llvm-svn: 241299
2015-07-02 21:02:39 +00:00
Justin Bogner 4dc5adc731 InstrProf: Add a comment to clarify an argument
llvm-svn: 241296
2015-07-02 20:47:25 +00:00
Kit Barton b61173e791 This patch adds support for the vector merge even word and vector merge odd word
instructions introduced in POWER8.

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

All builtins are added in altivec.h and guarded with the POWER8_VECTOR macro.

Phabricator review: http://reviews.llvm.org/D10736

llvm-svn: 241293
2015-07-02 19:29:05 +00:00
Gabor Horvath 2ed9456015 [Static Analyzer] No longer include the full path of the source file in the single file tests' bug identifiers.
llvm-svn: 241292
2015-07-02 19:20:46 +00:00
Davide Italiano 18960b9bb7 [Sema] Range-loopify SemaTemplateInstantiateDecl.cpp. NFC.
llvm-svn: 241291
2015-07-02 19:20:11 +00:00
Rafael Espindola 5ab8e2e85c Revert "Refactored ARMTargetInfo in order to use the API of llvm/lib/Support/TargetParser.cpp for extracting target specific information."
This reverts commit r241267. Tests were failing on the bots.

llvm-svn: 241275
2015-07-02 15:14:10 +00:00
Daniel Jasper f144620cc1 clang-format: [JS] Treat regex literals like string literals.
Using the token type "unknown" can interfere badly with
WhitespaceManager's way of handling multiline comments.

llvm-svn: 241273
2015-07-02 15:00:44 +00:00
Yaron Keren 07d4496ab7 Remove whitespace from start of line, NFC.
llvm-svn: 241272
2015-07-02 14:44:35 +00:00
Alexandros Lamprineas ec44b157f1 Refactored ARMTargetInfo in order to use the API of llvm/lib/Support/TargetParser.cpp
for extracting target specific information.

Change-Id: Ia0b83ecdb8d9223f9c4ef38dd9206969f78e53f3
llvm-svn: 241267
2015-07-02 14:21:40 +00:00
Daniel Jasper f737215288 clang-format: [JS] Skip comments when applying the regex-literal heuristic
llvm-svn: 241264
2015-07-02 14:14:04 +00:00
Aaron Ballman 8f4699a8c6 When testing for anyOf(), the test should not be for an exact type match for all members of the set. Instead, test that all members are convertible to the common type.
llvm-svn: 241263
2015-07-02 14:02:41 +00:00
Daniel Jasper 55c384e039 clang-format: [JS] Fix bug in regex literal parsing.
The lexer wasn't properly reset leading to unexpected deletions.

llvm-svn: 241262
2015-07-02 14:01:34 +00:00
Alexandros Lamprineas 73b076159b test commit
Change-Id: Ibaa2e1115544ddfa491335b81226819fd9cc04b4
llvm-svn: 241260
2015-07-02 13:21:34 +00:00
Daniel Jasper c553ae13b5 clang-format: [JS] Support regex literals at the start of a file.
llvm-svn: 241259
2015-07-02 13:20:45 +00:00
Ben Langmuir a525400d37 [Modules] Be consistent about finding a module for framework headers
We use findModuleForHeader() in several places, but in header search we
were not calling it when a framework module didn't show up with the
expected name, which would then lead to unexpected non-modular includes.
Now we will find the module unconditionally for frameworks.  For regular
frameworks, we use the spelling of the module name from the module map
file, and for inferred ones we use the canonical directory name.

In the future we might want to lock down framework modules sufficiently
that these name mismatches cannot happen.

rdar://problem/20465870

llvm-svn: 241258
2015-07-02 13:19:48 +00:00
Daniel Jasper 553a5b0041 clang-format: [JS] Fix character counting in template strings.
Some counts were off, we don't need to take the leading newlines of the
first ` into account and some tests were just wrong.

llvm-svn: 241257
2015-07-02 13:08:28 +00:00
Aaron Ballman 9b869aa4a1 Implement an AST matcher for C++ exception catch handlers that can catch any exception type (...).
llvm-svn: 241256
2015-07-02 12:53:22 +00:00
Alexey Bataev 80909878ad [OPENMP 4.0] Initial support for 'omp cancel' construct.
Implemented parsing/sema analysis + (de)serialization.

llvm-svn: 241253
2015-07-02 11:25:17 +00:00
David Majnemer 1023668bc2 [MS ABI] nullptr data member ptrs are mangled differently for classes vs fns
It turns out that nullptr pointers to data members act differently in
function templates vs class templates.  Class templates use a variable
width representation proportional to the number of fields needed to
materialize it.  Function templates always use a single '0' template
parameter.  However, using '0' all the time is problematic if the class
uses single or multiple inheritance.  In those cases, use -1.

llvm-svn: 241251
2015-07-02 09:43:11 +00:00
Peter Collingbourne f58ff5b09d Specify --target, hopefully fixing non-x86 bots.
llvm-svn: 241248
2015-07-02 09:10:31 +00:00
Nico Weber e4f974c6fb Revert 241171, 241187, 241199 (32-bit SEH).
It still doesn't produce quite the right code, test binaries built with this
enabled fail some tests.

llvm-svn: 241244
2015-07-02 06:10:53 +00:00
Ted Kremenek 2b41771909 Parse 'technical term' format specifier.
Objective-C format strings now support modifier flags
that can be attached to a '@' conversion.  Currently
the only one supported, as of iOS 9 and OS X 10.11,
is the new "technical term", denoted by the flag "tt",
for example:

  %[tt]@

instead of just:

  %@

The 'tt' stands for "technical term", which is used
by the string-localization facilities on Darwin to
add the appropriate spacing or quotation depending
the language locale.

Implements <rdar://problem/20374720>.

llvm-svn: 241243
2015-07-02 05:39:16 +00:00
Ted Kremenek 7a1ef0ddca Change OptionalFlag::setPosition() to set the flag as well.
This change reduces some unnecessary boilerplate
since all calls to 'setPosition' are currently paired
with setting the flag of OptionalFlag.

No functionality change.

llvm-svn: 241242
2015-07-02 05:39:10 +00:00
Yaron Keren 1c0070c65d Support mingw-w64 and mingw.org toolchains at any install location.
No more hardcoded paths: clang will use -sysroot as gcc root location if
provided. Otherwise, it will search for gcc on the path. If not found it
will use the driver installed location.

 http://reviews.llvm.org/D5268

Patch by Ruben Van Boxem, Martell Malone, Yaron Keren.
Reviewed by Reid Kleckner.

llvm-svn: 241241
2015-07-02 04:45:27 +00:00
Alexey Bataev bb045d412f [OPENMP 4.0] Fixed test for 'cancellation point' directive.
Added explicit target to pch test

llvm-svn: 241240
2015-07-02 04:36:13 +00:00
Alexey Bataev 0f34da12e4 [OPENMP 4.0] Codegen for 'cancellation point' directive.
The next code is generated for this construct:
```
if (__kmpc_cancellationpoint(ident_t *loc, kmp_int32 global_tid, kmp_int32 cncl_kind) != 0)
  <exit from outer innermost construct>;
```

llvm-svn: 241239
2015-07-02 04:17:07 +00:00
Alexey Bataev 0039651304 [OPENMP] Introduced type trait "__builtin_omp_required_simd_align" for default simd alignment.
Adds type trait "__builtin_omp_required_simd_align" after discussions here http://reviews.llvm.org/D9894
Differential Revision: http://reviews.llvm.org/D10597

llvm-svn: 241237
2015-07-02 03:40:19 +00:00
Peter Collingbourne c3ca6e563b Specify -arch:IA32. Should fix hexagon bot.
llvm-svn: 241229
2015-07-02 02:14:50 +00:00
Peter Collingbourne 2659fb370e Make getArchNameForCompilerRTLib return the right thing on 32-bit Windows. Fixes the tests there.
llvm-svn: 241228
2015-07-02 02:07:43 +00:00
Peter Collingbourne 581f438f4c Driver: add support for linking the UBSan runtime library on Windows.
On Windows the user may invoke the linker directly, so we might not have an
opportunity to add runtime library flags to the linker command line. Instead,
instruct the code generator to embed linker directive in the object file
that cause the required runtime libraries to be linked.

We might also want to do something similar for ASan, but it seems to have
its own special complexities which may make this infeasible.

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

llvm-svn: 241225
2015-07-02 01:48:12 +00:00
Justin Bogner b05a43f59b InstrProf: Pack the coverage mapping structs that we write out
When we read this data we treat it as unaligned and packed, so we
should really be explicit about that when we write it.

llvm-svn: 241218
2015-07-02 00:42:32 +00:00
Richard Smith da6c234c39 [modules] Merging support for specializations of a function template. This very
rarely matters, but can affect whether two dependent types are canonically
equivalent.

llvm-svn: 241207
2015-07-01 23:19:58 +00:00
Richard Smith 28ff268373 [modules] Remove some out-of-date (fixed) FIXMEs.
llvm-svn: 241205
2015-07-01 23:10:03 +00:00
Anton Yartsev 84f9042fae [analyzer] Prevent ccc/c++-analyzer from hanging on Windows.
'fork'+'exec' combination made scan-build and ccc-analyzer hang under Windows. The patch replaces 'fork'+'exec' with more reliable 'system' (ccc-analyzer) and piped 'open' (scan-build). See http://reviews.llvm.org/D8774 and http://reviews.llvm.org/D9357 for more details.

llvm-svn: 241201
2015-07-01 22:35:29 +00:00