]> granicus.if.org Git - clang/log
clang
9 years agoclang-format: Row back on the AlwaysBreakBeforeMultilineStrings change.
Daniel Jasper [Thu, 18 Jun 2015 16:05:17 +0000 (16:05 +0000)]
clang-format: Row back on the AlwaysBreakBeforeMultilineStrings change.

It was a bit too aggressive.

With this patch, we keep on breaking here:
  aaaaaaaaaaaaa(aaaaaaa,
                "aaaaaaa"
                "bbbbbbb");

But don't break in:
  aaaaaaaaaaaaa(aaaaaaaaaaaaaaa("aaaaaaa"
                                  "bbbbbbb"));

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

9 years agoclang-format: Better support functions with elaborated enum return types.
Daniel Jasper [Thu, 18 Jun 2015 15:45:17 +0000 (15:45 +0000)]
clang-format: Better support functions with elaborated enum return types.

Before, this wasn't formatted properly:
  enum ::C f() {
    return a;
  }

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

9 years agoAllow case-insensitive values for -march for AArch64 target in line with GCC.
Gabor Ballabas [Thu, 18 Jun 2015 14:23:12 +0000 (14:23 +0000)]
Allow case-insensitive values for -march for AArch64 target in line with GCC.

GCC allows case-insensitive values for -mcpu, -march and -mtune options.
This patch implements the same behaviour for the -march option for the AArch64 target.

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

9 years ago[OPENMP] Codegen for 'proc_bind' clause (4.0).
Alexey Bataev [Thu, 18 Jun 2015 13:40:03 +0000 (13:40 +0000)]
[OPENMP] Codegen for 'proc_bind' clause (4.0).

Adds emission of the code for 'proc_bind(master|close|spread)' clause:
call void @__kmpc_push_proc_bind(<loc>, i32 thread_id, i32 4|3|2)

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

9 years agoclang-format: [JS] Add a special case for indenting function literals.
Daniel Jasper [Thu, 18 Jun 2015 12:32:59 +0000 (12:32 +0000)]
clang-format: [JS] Add a special case for indenting function literals.

Before:
  var func =
      function() {
        doSomething();
      };

After:
  var func =
      function() {
    doSomething();
  };

This is a very narrow special case which fixes most of the discrepency
with what our users do. In the long run, we should try to come up with
a more generic fix for indenting these.

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

9 years ago[OPENMP] Support for '#pragma omp taskgroup' directive.
Alexey Bataev [Thu, 18 Jun 2015 12:14:09 +0000 (12:14 +0000)]
[OPENMP] Support for '#pragma omp taskgroup' directive.

Added parsing, sema analysis and codegen for '#pragma omp taskgroup' directive (OpenMP 4.0).
The code for directive is generated the following way:
#pragma omp taskgroup
<body>

void __kmpc_taskgroup(<loc>, thread_id);
<body>
void __kmpc_end_taskgroup(<loc>, thread_id);

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

9 years ago[OPENMP] Fixed test for '#pragma omp parallel for simd'.
Alexey Bataev [Thu, 18 Jun 2015 11:26:55 +0000 (11:26 +0000)]
[OPENMP] Fixed test for '#pragma omp parallel for simd'.

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

9 years ago[clang] Refactoring of conditions so they use isOneOf() instead of multiple is().
Daniel Marjamaki [Thu, 18 Jun 2015 10:59:26 +0000 (10:59 +0000)]
[clang] Refactoring of conditions so they use isOneOf() instead of multiple is().

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

9 years ago[OPENMP] Add support for 'omp parallel for' directive.
Alexey Bataev [Thu, 18 Jun 2015 10:10:12 +0000 (10:10 +0000)]
[OPENMP] Add support for 'omp parallel for' directive.

Codegen for this directive is a combined codegen for 'omp parallel' region with 'omp for simd' region inside. Clauses are supported.

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

9 years agoclang-format: Make AlwaysBreakBeforeMultilineStrings more conservative.
Daniel Jasper [Thu, 18 Jun 2015 09:12:47 +0000 (09:12 +0000)]
clang-format: Make AlwaysBreakBeforeMultilineStrings more conservative.

In essence this is meant to consistently indent multiline strings by a
fixed amount of spaces from the start of the line. Don't do this in
cases where it wouldn't help anyway.

Before:
  someFunction(aaaaa,
               "aaaaa"
               "bbbbb");

After:
  someFunction(aaaaa, "aaaaa"
                      "bbbbb");

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

9 years ago[OPENMP] Add support for 'omp for simd' directive.
Alexey Bataev [Thu, 18 Jun 2015 04:45:29 +0000 (04:45 +0000)]
[OPENMP] Add support for 'omp for simd' directive.

Added codegen for combined 'omp for simd' directives, that is a combination of 'omp for' directive followed by 'omp simd' directive. Includes support for all clauses.

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

9 years ago[Driver] Remove unused class member. NFC.
Alexey Samsonov [Thu, 18 Jun 2015 00:36:40 +0000 (00:36 +0000)]
[Driver] Remove unused class member. NFC.

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

9 years ago[Driver] Simplify code choosing between MacOS and iOS platforms. NFC.
Alexey Samsonov [Thu, 18 Jun 2015 00:36:38 +0000 (00:36 +0000)]
[Driver] Simplify code choosing between MacOS and iOS platforms. NFC.

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

9 years ago[analyzer] Cleanup: $Status is always 0 here.
Anton Yartsev [Wed, 17 Jun 2015 23:25:58 +0000 (23:25 +0000)]
[analyzer] Cleanup: $Status is always 0 here.

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

9 years ago[analyzer] Close file handle before output to file from external command.
Anton Yartsev [Wed, 17 Jun 2015 23:12:33 +0000 (23:12 +0000)]
[analyzer] Close file handle before output to file from external command.

An old code caused problems under Windows - additional temporary file was created for clang preprocessor output while the right output file remained empty.

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

9 years ago[modules] Ensure that if we merge the definitions of two enumerations, that
Richard Smith [Wed, 17 Jun 2015 23:07:50 +0000 (23:07 +0000)]
[modules] Ensure that if we merge the definitions of two enumerations, that
making either of them visible makes the merged definition visible.

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

9 years ago[Driver] Add an assert to Darwin::isTargetMacOS() for consistency.
Alexey Samsonov [Wed, 17 Jun 2015 22:51:12 +0000 (22:51 +0000)]
[Driver] Add an assert to Darwin::isTargetMacOS() for consistency.

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

9 years agoRevert "[Sanitizers] Provide better diagnostic for sanitizers unsupported for target...
Alexey Samsonov [Wed, 17 Jun 2015 22:27:32 +0000 (22:27 +0000)]
Revert "[Sanitizers] Provide better diagnostic for sanitizers unsupported for target triple."

This reverts commit r239953, while I'm investigating assertion
failure from http://lab.llvm.org:8080/green/job/clang-stage1-cmake-RA-incremental_check/9994/

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

9 years ago[modules] Fix typo in default argument merging.
Richard Smith [Wed, 17 Jun 2015 22:13:23 +0000 (22:13 +0000)]
[modules] Fix typo in default argument merging.

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

9 years ago[Sanitizers] Provide better diagnostic for sanitizers unsupported for target triple.
Alexey Samsonov [Wed, 17 Jun 2015 22:07:28 +0000 (22:07 +0000)]
[Sanitizers] Provide better diagnostic for sanitizers unsupported for target triple.

Summary:
Introduce ToolChain::getSupportedSanitizers() that would return the set
of sanitizers available on given toolchain. By default, these are
sanitizers which don't necessarily require runtime support (i.e.
set from -fsanitize=undefined-trap).

Sanitizers (ASan, DFSan, TSan, MSan etc.) which cannot function
without runtime library are marked as supported only on platforms
for which we actually build these runtimes.

This would allow more fine-grained checks in the future: for instance,
we have to restrict availability of -fsanitize=vptr to Mac OS 10.9+
(PR23539)

Update test cases accrodingly: add tests for certain unsupported
configurations, remove test cases for -fsanitize=vptr + PS4
integration, as we don't build the runtime for PS4 at the moment.

Test Plan: regression test suite

Reviewers: pcc

Subscribers: cfe-commits, filcab, eugenis, thakis, kubabrecka, emaste, rsmith

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

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

9 years agoUpdate clang to take into account the changes to personality fns
David Majnemer [Wed, 17 Jun 2015 20:53:19 +0000 (20:53 +0000)]
Update clang to take into account the changes to personality fns

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

9 years ago[modules] If we merge a template, also track that its parameters are merged so
Richard Smith [Wed, 17 Jun 2015 20:39:41 +0000 (20:39 +0000)]
[modules] If we merge a template, also track that its parameters are merged so
that we know when its default arguments should be visible.

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

9 years ago[modules] Improve diagnostic for a template-id that's invalid because a default
Richard Smith [Wed, 17 Jun 2015 20:16:32 +0000 (20:16 +0000)]
[modules] Improve diagnostic for a template-id that's invalid because a default
argument is not visible.

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

9 years ago[ARM] Replace hard coded metadata arguments in tests with a regex.
Ranjeet Singh [Wed, 17 Jun 2015 19:56:30 +0000 (19:56 +0000)]
[ARM] Replace hard coded metadata arguments in tests with a regex.

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

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

9 years agoCodeGen: Factor out some of the bitset entry creation code. NFC.
Peter Collingbourne [Wed, 17 Jun 2015 19:08:05 +0000 (19:08 +0000)]
CodeGen: Factor out some of the bitset entry creation code. NFC.

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

9 years agoMove xtest to its own file to match the gcc header organization.
Eric Christopher [Wed, 17 Jun 2015 18:42:07 +0000 (18:42 +0000)]
Move xtest to its own file to match the gcc header organization.

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

9 years agoUpdate comments on HLE, RTM, and ADX support for intrinsics.
Eric Christopher [Wed, 17 Jun 2015 18:42:03 +0000 (18:42 +0000)]
Update comments on HLE, RTM, and ADX support for intrinsics.

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

9 years ago[fixit] Use overwriteChangedFiles() to deal with Windows mapped files
Reid Kleckner [Wed, 17 Jun 2015 17:47:30 +0000 (17:47 +0000)]
[fixit] Use overwriteChangedFiles() to deal with Windows mapped files

Fixes one instance of PR17960.

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

9 years agoclang-format: clang-format (NFC)
Daniel Jasper [Wed, 17 Jun 2015 13:08:06 +0000 (13:08 +0000)]
clang-format: clang-format (NFC)

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

9 years agoQualify all types used in AST matcher macros.
Alexander Kornienko [Wed, 17 Jun 2015 12:49:00 +0000 (12:49 +0000)]
Qualify all types used in AST matcher macros.

Summary:
Qualify all types used in AST matcher macros. This makes it possible to
put AST matchers in user code into a namespace other than clang::ast_matchers
and this way prevent ODR violations that could happen when a matcher with the
same name is defined in multiple translation units. Updated comments
accordingly.

Reviewers: djasper, klimek

Reviewed By: djasper, klimek

Subscribers: klimek, cfe-commits

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

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

9 years agoclang-format: Don't generate unnecessary replacements for \r\n line endings.
Daniel Jasper [Wed, 17 Jun 2015 12:23:15 +0000 (12:23 +0000)]
clang-format: Don't generate unnecessary replacements for \r\n line endings.

Patch by Mathieu Champlon. Thank you.

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

9 years agoFix clang/test/Headers/x86intrin-2.c. _readfsbase_u32() is provided in not i686 but...
NAKAMURA Takumi [Wed, 17 Jun 2015 10:40:51 +0000 (10:40 +0000)]
Fix clang/test/Headers/x86intrin-2.c. _readfsbase_u32() is provided in not i686 but x86-64.

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

9 years ago[OPENMP] Fixed failed test for reduction clause in simd constructs.
Alexey Bataev [Wed, 17 Jun 2015 09:51:18 +0000 (09:51 +0000)]
[OPENMP] Fixed failed test for reduction clause in simd constructs.

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

9 years agoclang-format: [JS] Don't put top-level typescript enums on a single line.
Daniel Jasper [Wed, 17 Jun 2015 09:44:07 +0000 (09:44 +0000)]
clang-format: [JS] Don't put top-level typescript enums on a single line.

This makes this consistent with non-typescript enums.

Also shuffle the language-dependent stuff in mustBreakBefore to a
single location.

Patch initiated by Martin Probst.

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

9 years agoclang-format: [JS] Fix typescript enum formatting.
Daniel Jasper [Wed, 17 Jun 2015 09:44:02 +0000 (09:44 +0000)]
clang-format: [JS] Fix typescript enum formatting.

Patch by Martin Probst.

Before:
  enum {
    A,
    B
  } var x = 1;

After:
  enum {
    A,
    B
  }
  var x = 1;

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

9 years agoclang-format: NFC. Add a function to test whether an annotated line
Daniel Jasper [Wed, 17 Jun 2015 09:43:56 +0000 (09:43 +0000)]
clang-format: NFC. Add a function to test whether an annotated line
starts with a given sequence of tokens. Only the one-token version is
used yet, but other usages are coming up momentarily.

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

9 years ago[OPENMP] Code reformatting for omp simd codegen, NFC.
Alexey Bataev [Wed, 17 Jun 2015 07:45:51 +0000 (07:45 +0000)]
[OPENMP] Code reformatting for omp simd codegen, NFC.

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

9 years agoUpdate the intel intrinsic headers to use the target attribute support.
Eric Christopher [Wed, 17 Jun 2015 07:09:32 +0000 (07:09 +0000)]
Update the intel intrinsic headers to use the target attribute support.

This involved removing the conditional inclusion and replacing them
with target attributes matching the original conditional inclusion
and checks. The testcase update removes the macro checks for each
file and replaces them with usage of the __target__ attribute, e.g.:

int __attribute__((__target__(("sse3")))) foo(int a) {
  _mm_mwait(0, 0);
  return 4;
}

This usage does require the enclosing function have the requisite
__target__ attribute for inlining and code generation - also for
any macro intrinsic uses in the enclosing function. There's no change
for existing uses of the intrinsic headers.

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

9 years agoUse a define for per-file function attributes for the Intel intrinsic headers.
Eric Christopher [Wed, 17 Jun 2015 07:09:20 +0000 (07:09 +0000)]
Use a define for per-file function attributes for the Intel intrinsic headers.

This is a precursor to changing them to use the new target attribute
code.

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

9 years ago[OPENMP] Supported reduction clause in omp simd construct.
Alexey Bataev [Wed, 17 Jun 2015 06:21:39 +0000 (06:21 +0000)]
[OPENMP] Supported reduction clause in omp simd construct.

The following code is generated for reduction clause within 'omp simd' loop construct:
#pragma omp simd reduction(op:var)
for (...)
  <body>

alloca priv_var
priv_var = <initial reduction value>;
<loop_start>:
<body> // references to original 'var' are replaced by 'priv_var'
<loop_end>:
var op= priv_var;

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

9 years agoparser: wordsmith diagnostic message
Saleem Abdulrasool [Wed, 17 Jun 2015 03:54:21 +0000 (03:54 +0000)]
parser: wordsmith diagnostic message

Address post-commit commit about the wording of the warning.

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

9 years agoBasic: tweak whitespace in Attr.td
Saleem Abdulrasool [Wed, 17 Jun 2015 03:54:19 +0000 (03:54 +0000)]
Basic: tweak whitespace in Attr.td

Separate two class definitions that had been merged into a single line.  NFC.

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

9 years ago[.gitignore] ignore vim swap files harder
Sean Silva [Wed, 17 Jun 2015 02:21:35 +0000 (02:21 +0000)]
[.gitignore] ignore vim swap files harder

This matches the patterns for vim swap files in llvm/.gitignore

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

9 years agoUpdate for llvm api change.
Rafael Espindola [Tue, 16 Jun 2015 22:32:44 +0000 (22:32 +0000)]
Update for llvm api change.

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

9 years ago[modules] Fix merging of default template arguments onto friend templates.
Richard Smith [Tue, 16 Jun 2015 21:57:05 +0000 (21:57 +0000)]
[modules] Fix merging of default template arguments onto friend templates.

Previously we'd complain about redefinition of default arguments when we
instantiated a class with a friend template that inherits its default argument,
because we propagate the default template arguemnt onto the friend when we
reload the AST.

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

9 years agoHonor the objc_runtime_name attribute when encoding class/protocol names.
Douglas Gregor [Tue, 16 Jun 2015 21:04:55 +0000 (21:04 +0000)]
Honor the objc_runtime_name attribute when encoding class/protocol names.

While the rest of the Objective-C metadata seems to honor
objc_runtime_name, the encoding strings produced by, e.g., @encode and
property meta, were not. Fixes rdar://problem/21408305.

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

9 years agoAdjust clang side tests effected by 239795 before reapplying said change
Philip Reames [Tue, 16 Jun 2015 20:24:06 +0000 (20:24 +0000)]
Adjust clang side tests effected by 239795 before reapplying said change

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

9 years agoparser: diagnose empty attribute blocks
Saleem Abdulrasool [Tue, 16 Jun 2015 20:03:47 +0000 (20:03 +0000)]
parser: diagnose empty attribute blocks

MS attributes do not permit empty attribute blocks.  Correctly diagnose those.
We continue to parse to ensure that we recover correctly.  Because the block is
empty, we do not need to skip any tokens.

Bonus: tweak the comment that I updated but forgot to remove the function name
in a previous commit.

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

9 years agoRemove duplicated alteration to getProgramPaths().
Douglas Katzman [Tue, 16 Jun 2015 19:34:52 +0000 (19:34 +0000)]
Remove duplicated alteration to getProgramPaths().

This appears to have been accidental.

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

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

9 years agoIf/else looks nicer when both branches have (or don't have) braces. NFC
Douglas Katzman [Tue, 16 Jun 2015 18:01:24 +0000 (18:01 +0000)]
If/else looks nicer when both branches have (or don't have) braces. NFC

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

9 years ago[Hexagon] unused-local-typedef warning test is passing.
Colin LeMahieu [Tue, 16 Jun 2015 17:32:45 +0000 (17:32 +0000)]
[Hexagon] unused-local-typedef warning test is passing.

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

9 years ago[SystemZ] Mangle long double as __float128
Ulrich Weigand [Tue, 16 Jun 2015 15:21:47 +0000 (15:21 +0000)]
[SystemZ] Mangle long double as __float128

In r239421, the mangling of long double on PowerPC Linux targets
was changed to use "g" instead of "e".  This same change also needs
to be done for SystemZ (all targets, since we support only Linux
on SystemZ anyway).

This is because an old ABI variant set "long double" to a 64-bit
type equivalent to "double", and the "e" mangling code is still
used to refer to that old ABI for compatibility reasons.

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

9 years ago[mips] Don't propagate -mfpxx by default if soft/single float were also set.
Toma Tabacu [Tue, 16 Jun 2015 13:54:13 +0000 (13:54 +0000)]
[mips] Don't propagate -mfpxx by default if soft/single float were also set.

Summary:
If the driver is only given -msoft-float/-mfloat-abi=soft or -msingle-float,
we should refrain from propagating -mfpxx, unless it was explicitly given on the
command line.

Reviewers: atanasyan, dsanders

Reviewed By: atanasyan, dsanders

Subscribers: cfe-commits, mpf

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

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

9 years agoAvoid using set::emplace as it is apparently not supported by gcc 4.7.
Daniel Jasper [Tue, 16 Jun 2015 13:15:54 +0000 (13:15 +0000)]
Avoid using set::emplace as it is apparently not supported by gcc 4.7.

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

9 years ago[OPENMP] Support lastprivate clause in omp simd directive.
Alexey Bataev [Tue, 16 Jun 2015 13:14:42 +0000 (13:14 +0000)]
[OPENMP] Support lastprivate clause in omp simd directive.

Added codegen for lastprivate clauses within simd loop-based directives.

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

9 years agoRecommit r239721: Replace string GNU Triples with llvm::Triple in InitMCObjectFileInf...
Daniel Sanders [Tue, 16 Jun 2015 12:18:07 +0000 (12:18 +0000)]
Recommit r239721: Replace string GNU Triples with llvm::Triple in InitMCObjectFileInfo. NFC.

Summary:
This affects other tools so the previous C++ API has been retained as a
deprecated function for the moment. Clang has been updated with a trivial
patch (not covered by the pre-commit review) to avoid breaking -Werror builds.
Other in-tree tools will be fixed with similar patches.

This continues the patch series to eliminate StringRef forms of GNU triples
from the internals of LLVM that began in r239036.

The first time this was committed it accidentally fixed an inconsistency in
triples in llvm-mc and this caused a failure. This inconsistency was fixed in
r239808.

Reviewers: rengolin

Reviewed By: rengolin

Subscribers: llvm-commits, rengolin

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

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

9 years ago[OPENMP] Remove last iteration separation for loop-based constructs.
Alexey Bataev [Tue, 16 Jun 2015 11:59:36 +0000 (11:59 +0000)]
[OPENMP] Remove last iteration separation for loop-based constructs.

Previously the last iteration for simd loop-based OpenMP constructs were generated as a separate code. This feature is not required and codegen is simplified.

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

9 years agoTooling: When applying a set of replacements, do deletions before
Daniel Jasper [Tue, 16 Jun 2015 10:22:10 +0000 (10:22 +0000)]
Tooling: When applying a set of replacements, do deletions before
insertions. It is unlikely to be the intention to delete parts of newly
inserted code. To do so, changed sorting Replacements at the same offset
to have decreasing length.

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

9 years agoInstrProf: Fix coverage mapping when "if" is a macro
Justin Bogner [Tue, 16 Jun 2015 06:24:15 +0000 (06:24 +0000)]
InstrProf: Fix coverage mapping when "if" is a macro

We were propagating the coverage map into the body of an if statement,
but not into the condition thereafter. This is fine as long as the two
locations are in the same virtual file, but they won't be when the
"if" part of the statement is from a macro and the condition is not.

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

9 years ago[modules] Rename -fmodule-maps to -fimplicit-module-maps (and likewise for
Richard Smith [Tue, 16 Jun 2015 00:20:23 +0000 (00:20 +0000)]
[modules] Rename -fmodule-maps to -fimplicit-module-maps (and likewise for
-fno-module-maps). The old names are preserved for compatibility.

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

9 years agoCommit some test changes somehow missed in r239789.
Richard Smith [Tue, 16 Jun 2015 00:19:29 +0000 (00:19 +0000)]
Commit some test changes somehow missed in r239789.

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

9 years ago[modules] Simplify -cc1 interface for enabling implicit module maps.
Richard Smith [Tue, 16 Jun 2015 00:08:24 +0000 (00:08 +0000)]
[modules] Simplify -cc1 interface for enabling implicit module maps.

We used to have a flag to enable module maps, and two more flags to enable
implicit module maps. This is all redundant; we don't need any flag for
enabling module maps in the abstract, and we don't usually have -fno- flags for
-cc1. We now have just a single flag, -fimplicit-module-maps, that enables
implicitly searching the file system for module map files and loading them.

The driver interface is unchanged for now. We should probably rename
-fmodule-maps to -fimplicit-module-maps at some point.

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

9 years ago[modules] Remove non-functional driver options -f[no-]modules-implicit-maps.
Richard Smith [Mon, 15 Jun 2015 23:52:34 +0000 (23:52 +0000)]
[modules] Remove non-functional driver options -f[no-]modules-implicit-maps.

These driver options never did anything (they weren't forwarded to the
frontend). Also update the documentation to not mention them.

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

9 years agoAccording to the OpenMP spec, all the preprocessor macros should be
Samuel Antao [Mon, 15 Jun 2015 23:44:27 +0000 (23:44 +0000)]
According to the OpenMP spec, all the preprocessor macros should be
expanded in OpenMP pragmas. This patch adds support for that in -E.

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

9 years ago[modules] Re-enable accidentally-disabled test.
Richard Smith [Mon, 15 Jun 2015 23:39:16 +0000 (23:39 +0000)]
[modules] Re-enable accidentally-disabled test.

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

9 years agoUse a macro for the omnipresent attributes on header functions in Intrin.h.
Eric Christopher [Mon, 15 Jun 2015 23:20:35 +0000 (23:20 +0000)]
Use a macro for the omnipresent attributes on header functions in Intrin.h.

Saves some typing and if someone wants to change them it makes it much easier.

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

9 years agoDebug Info: Turn on ODR type uniquing for (the C++ part of) Objective-C++.
Adrian Prantl [Mon, 15 Jun 2015 23:18:16 +0000 (23:18 +0000)]
Debug Info: Turn on ODR type uniquing for (the C++ part of) Objective-C++.

rdar://problem/20571359

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

9 years agoFix submodule test to pass on content addressable filesystems where inodes would...
Reid Kleckner [Mon, 15 Jun 2015 21:21:17 +0000 (21:21 +0000)]
Fix submodule test to pass on content addressable filesystems where inodes would collide

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

9 years agoProtection against stack-based memory corruption errors using SafeStack: Clang comman...
Peter Collingbourne [Mon, 15 Jun 2015 21:08:13 +0000 (21:08 +0000)]
Protection against stack-based memory corruption errors using SafeStack: Clang command line option and function attribute

This patch adds the -fsanitize=safe-stack command line argument for clang,
which enables the Safe Stack protection (see http://reviews.llvm.org/D6094
for the detailed description of the Safe Stack).

This patch is our implementation of the safe stack on top of Clang. The
patches make the following changes:

- Add -fsanitize=safe-stack and -fno-sanitize=safe-stack options to clang
  to control safe stack usage (the safe stack is disabled by default).

- Add __attribute__((no_sanitize("safe-stack"))) attribute to clang that can be
  used to disable the safe stack for individual functions even when enabled
  globally.

Original patch by Volodymyr Kuznetsov and others at the Dependable Systems
Lab at EPFL; updates and upstreaming by myself.

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

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

9 years agoparser: improve diagnostics for MS attributes
Saleem Abdulrasool [Mon, 15 Jun 2015 20:57:04 +0000 (20:57 +0000)]
parser: improve diagnostics for MS attributes

Switch to using BalancedDelimiterTracker to get better diagnostics for
unbalanced delimiters.  This still does not handle any of the attributes, simply
improves the parsing.

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

9 years agoWildcard out some SSA value names from the ACLE intrinsic test case
Reid Kleckner [Mon, 15 Jun 2015 20:55:43 +0000 (20:55 +0000)]
Wildcard out some SSA value names from the ACLE intrinsic test case

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

9 years ago[Sparc] Make soft-float emit an error.
James Y Knight [Mon, 15 Jun 2015 20:51:24 +0000 (20:51 +0000)]
[Sparc] Make soft-float emit an error.

LLVM does not and has not ever supported a soft-float ABI mode on
Sparc, so don't pretend that it does.

Also switch the default from "soft-float" -- which was actually
hard-float because soft-float is unimplemented -- to hard-float.

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

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

9 years ago[modules] Better support for redefinitions of an entity from the same module.
Richard Smith [Mon, 15 Jun 2015 20:15:48 +0000 (20:15 +0000)]
[modules] Better support for redefinitions of an entity from the same module.

Support this across module save/reload and extend the 'missing import'
diagnostics with a list of providing modules.

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

9 years agoThis patch implements clang support for the ACLE special register intrinsics
Luke Cheeseman [Mon, 15 Jun 2015 17:51:01 +0000 (17:51 +0000)]
This patch implements clang support for the ACLE special register intrinsics
in section 10.1, __arm_{w,r}sr{,p,64}.

This includes arm_acle.h definitions with builtins and codegen to support
these, the intrinsics are implemented by generating read/write_register calls
which get appropriately lowered in the backend based on the register string
provided. SemaChecking is also implemented to fault invalid parameters.

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

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

9 years agoclang-format: NFC. Move testing of selective formatting to a separate file.
Daniel Jasper [Mon, 15 Jun 2015 15:25:11 +0000 (15:25 +0000)]
clang-format: NFC. Move testing of selective formatting to a separate file.

This is a first step for splitting the huge FormatTest.cpp into separate
files to make it easier to find specific tests.

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

9 years agoFix spelling in comment.
Douglas Katzman [Mon, 15 Jun 2015 13:46:40 +0000 (13:46 +0000)]
Fix spelling in comment.

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

9 years agoRevert r239721 - Replace string GNU Triples with llvm::Triple in InitMCObjectFileInfo...
Daniel Sanders [Mon, 15 Jun 2015 10:34:38 +0000 (10:34 +0000)]
Revert r239721 - Replace string GNU Triples with llvm::Triple in InitMCObjectFileInfo. NFC.

It appears to cause sparc-little-endian.s to assert on Windows and Darwin.

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

9 years agoclang-format: [JS] Tweak behavior for multiline array initializer parameters
Daniel Jasper [Mon, 15 Jun 2015 09:23:17 +0000 (09:23 +0000)]
clang-format: [JS] Tweak behavior for multiline array initializer parameters

Before:
  var someVariable = SomeFuntion(aaaa, [
    aaaaaaaaaaaaaaaaaaaaaaaaaaa,
    bbbbbbbbbbbbbbbbbbbbbbbbbbb,
    ccccccccccccccccccccccccccc
  ],
                                 aaaa);

After:
  var someVariable = SomeFuntion(aaaa,
                                 [
                                   aaaaaaaaaaaaaaaaaaaaaaaaaaa,
                                   bbbbbbbbbbbbbbbbbbbbbbbbbbb,
                                   ccccccccccccccccccccccccccc
                                 ],
                                 aaaa);

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

9 years agoReplace string GNU Triples with llvm::Triple in InitMCObjectFileInfo. NFC.
Daniel Sanders [Mon, 15 Jun 2015 09:19:41 +0000 (09:19 +0000)]
Replace string GNU Triples with llvm::Triple in InitMCObjectFileInfo. NFC.

Summary:
This affects other tools so the previous C++ API has been retained as a
deprecated function for the moment. Clang has been updated with a trivial
patch (not covered by the pre-commit review) to avoid breaking -Werror builds.
Other in-tree tools will be fixed with similar trivial patches.

This continues the patch series to eliminate StringRef forms of GNU triples
from the internals of LLVM that began in r239036.

Reviewers: rengolin

Reviewed By: rengolin

Subscribers: llvm-commits, rengolin

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

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

9 years ago[analyzer] Remove ObjCContainersChecker size information when a CFMutableArrayRef...
Devin Coughlin [Mon, 15 Jun 2015 01:00:42 +0000 (01:00 +0000)]
[analyzer] Remove ObjCContainersChecker size information when a CFMutableArrayRef escapes

Update ObjCContainersChecker to be notified when pointers escape so it can
remove size information for escaping CFMutableArrayRefs. When such pointers
escape, un-analyzed code could mutate the array and cause the size information
to be incorrect.

rdar://problem/19406485

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

9 years agoAdd test for parsing the XOR operator in Intel syntax inline assembly.
Michael Kuperstein [Sun, 14 Jun 2015 13:03:27 +0000 (13:03 +0000)]
Add  test for parsing the XOR operator in Intel syntax inline assembly.
LLVM side of the patch was committed as r239695.

Differential Revision: http://reviews.llvm.org/D10384
Patch by marina.yatsina@intel.com

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

9 years agoclang-format: [JS] Fix corner case in template string parsing.
Daniel Jasper [Sun, 14 Jun 2015 07:16:57 +0000 (07:16 +0000)]
clang-format: [JS] Fix corner case in template string parsing.

Before, these would not properly detected because of the char/string
literal found when re-lexing after the first `:

  var x = `'`;  // comment with matching quote '
  var x = `"`;  // comment with matching quote "

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

9 years agoAdd some basic support for CloudABI on i686.
Ed Schouten [Sat, 13 Jun 2015 21:33:49 +0000 (21:33 +0000)]
Add some basic support for CloudABI on i686.

Some people want to experiment with building i686 CloudABI binaries. I
am not entirely sure this is a good idea, as I'd rather see Intel x32
support appear.

As it only requires a two-line change, let's at least provide compiler
to ease experimenting.

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

9 years agoDon't use std::errc.
Rafael Espindola [Sat, 13 Jun 2015 17:23:13 +0000 (17:23 +0000)]
Don't use std::errc.

As noted on Errc.h:

// * std::errc is just marked with is_error_condition_enum. This means that
//   common patters like AnErrorCode == errc::no_such_file_or_directory take
//   4 virtual calls instead of two comparisons.

And on some libstdc++ those virtual functions conclude that

------------------------
int main() {
  std::error_code foo = std::make_error_code(std::errc::no_such_file_or_directory);
  return foo == std::errc::no_such_file_or_directory;
}
-------------------------

should exit with 0.

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

9 years agoUpdate for llvm api change.
Rafael Espindola [Sat, 13 Jun 2015 12:50:07 +0000 (12:50 +0000)]
Update for llvm api change.

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

9 years agoAdd `-verify-ignore-unexpected` option to ignore unexpected diagnostics in VerifyDiag...
Eric Fiselier [Sat, 13 Jun 2015 07:11:40 +0000 (07:11 +0000)]
Add `-verify-ignore-unexpected` option to ignore unexpected diagnostics in VerifyDiagnosticsConsumer

Summary:
The goal of this patch is to make `-verify` easier to use when testing libc++. The `notes` attached to compile error diagnostics are numerous and relatively unstable when they reference libc++ header internals. This patch allows libc++ to write stable compilation failure tests by allowing unexpected diagnostic messages to be ignored where they are not relevant.

This patch adds a new CC1 flag called `-verify-ignore-unexpected`. `-verify-ignore-unexpected` tells `VerifyDiagnosticsConsumer` to ignore *all* unexpected diagnostic messages. `-verify-ignore-unexpected=<LevelList>` can be used to only ignore certain diagnostic levels. `<LevelList>` is a comma separated list of diagnostic levels to ignore. The supported levels are `note`, `remark`, `warning` and `error`.

Reviewers: bogner, grosser, EricWF

Reviewed By: EricWF

Subscribers: cfe-commits

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

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

9 years agoRevert r239213: "clang-cl: Implement /GL in terms of -flto."
Hans Wennborg [Sat, 13 Jun 2015 02:53:50 +0000 (02:53 +0000)]
Revert r239213: "clang-cl: Implement /GL in terms of -flto."

Reverting until it's easier to use this in a real-world build, e.g.
when the linker can handle it.

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

9 years agodocs: grammar adjustments in clang manpage
Saleem Abdulrasool [Sat, 13 Jun 2015 01:21:58 +0000 (01:21 +0000)]
docs: grammar adjustments in clang manpage

Fix a few typos and run-on sentences in the clang POD documentation.

Patch by Brian R. Gaeke!

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

9 years ago[CodeGen] Don't evaluate immediate inlineasm arguments using isICE().
Ahmed Bougacha [Sat, 13 Jun 2015 01:16:10 +0000 (01:16 +0000)]
[CodeGen] Don't evaluate immediate inlineasm arguments using isICE().

Instead, just EvaluateAsInt().

Follow-up to r239549: rsmith points out that isICE() is expensive;
seems like it's not the right concept anyway, as it fails on
`static const' in C, and will actually trigger the assert below on:
    test/Sema/inline-asm-validate-x86.c

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

9 years ago[CodeGen] Use IRBuilder to create llvm.lifetime intrinsics.
Alexey Samsonov [Fri, 12 Jun 2015 22:31:32 +0000 (22:31 +0000)]
[CodeGen] Use IRBuilder to create llvm.lifetime intrinsics.

Summary:
In addition to easier syntax, IRBuilder makes sure to set correct
debug locations for newly added instructions (bitcast and
llvm.lifetime itself). This restores the original behavior, which
was modified by r234581 (reapplied as r235553).

Extend one of the tests to check for debug locations.

Test Plan: regression test suite

Reviewers: aadg, dblaikie

Subscribers: cfe-commits, majnemer

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

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

9 years ago[ms] Don't try to delay lookup for failures in SFINAE context (PR23823)
Hans Wennborg [Fri, 12 Jun 2015 21:23:23 +0000 (21:23 +0000)]
[ms] Don't try to delay lookup for failures in SFINAE context (PR23823)

The underlying problem in PR23823 already existed before my recent change
in r239558, but that change made it worse (failing not only for undeclared
symbols, but also failed overload resolution). This makes Clang not try to
delay the lookup in SFINAE context. I assume no current code is relying on
SFINAE working with lookups that need to be delayed, because that never
seems to have worked.

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

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

9 years ago[CGCall] Fix potential invalid iterator decrement in findDominatingStoreToReturnValue.
Alexey Samsonov [Fri, 12 Jun 2015 21:05:32 +0000 (21:05 +0000)]
[CGCall] Fix potential invalid iterator decrement in findDominatingStoreToReturnValue.

If llvm.lifetime.end turns out to be the first instruction in the last
basic block, we can decrement the iterator twice, going past rend.
At the moment, this can never happen because llvm.lifetime.end always
goes immediately after bitcast, but relying on this is very brittle.

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

9 years agoQuote the user provided string in the warning message and update
Eric Christopher [Fri, 12 Jun 2015 20:13:50 +0000 (20:13 +0000)]
Quote the user provided string in the warning message and update
tests accordingly.

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

9 years agoDriver: only set -mlinker-version based on host if it's valid
Tim Northover [Fri, 12 Jun 2015 19:21:35 +0000 (19:21 +0000)]
Driver: only set -mlinker-version based on host if it's valid

We were adding an extra "-mlinker-version" argument to the invocation
based on a value inferred from "ld -v". This is set by the build
systems to either a sane value or an empty string (e.g. for custom
built ld), which we don't want to pass on.

No test really possible because the value depends on both host system
and how CMake was invoked.

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

9 years ago[MS ABI] Lock-in the derived memptr rep. for base-to-derived conversions
David Majnemer [Fri, 12 Jun 2015 17:55:44 +0000 (17:55 +0000)]
[MS ABI] Lock-in the derived memptr rep. for base-to-derived conversions

We would get this right in the case where an explicit cast was formed
but not when we were performing an implicit conversion.

This fixes PR23828.

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

9 years agoAllow case-insensitive values for -mcpu for AArch64 target in line with GCC.
Gabor Ballabas [Fri, 12 Jun 2015 17:33:37 +0000 (17:33 +0000)]
Allow case-insensitive values for -mcpu for AArch64 target in line with GCC.

GCC allows case-insensitive values for -mcpu, -march and -mtune options.
This patch implements the same behaviour for the -mcpu option for the AArch64 target.

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

9 years agoUse Clang version numbers for the Windows VERSIONINFO resource.
Greg Bedwell [Fri, 12 Jun 2015 16:33:38 +0000 (16:33 +0000)]
Use Clang version numbers for the Windows VERSIONINFO resource.

When setting the VERSIONINFO resource to embed version information into exe and
DLL files on Windows, override the default LLVM version number values with their
clang equivalents.

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

9 years agoThis patch makes the NEON intrinsics vget_lane_f16, vgetq_lane_f16,
Luke Cheeseman [Fri, 12 Jun 2015 15:52:39 +0000 (15:52 +0000)]
This patch makes the NEON intrinsics vget_lane_f16, vgetq_lane_f16,
vset_lane_f16 and vsetq_lane_f16 available in AArch32.

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

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

9 years agoscan-build: Remove useless whitespace in File path
Sylvestre Ledru [Fri, 12 Jun 2015 15:50:27 +0000 (15:50 +0000)]
scan-build: Remove useless whitespace in File path
Patch by Honggyu Kim

Summary:
This patch removes useless whitespace in File path in index.html
Previously, a File directory path is copied and pasted as below:
  arch /arm /kernel /stacktrace.c

It just removes the whitespace between directories and makes the
copied string as below:
  arch/arm/kernel/stacktrace.c

The output looks same in html format, but the copied directory path
can be pasted as it looks.

Reviewers: krememek, zaks.anna, sylvestre.ledru

Reviewed By: sylvestre.ledru

Subscribers: aemerson, cfe-commits

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

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

9 years agoAllow ToolChain to decide if Clang is not the right C compiler.
Douglas Katzman [Fri, 12 Jun 2015 15:45:21 +0000 (15:45 +0000)]
Allow ToolChain to decide if Clang is not the right C compiler.

Removed comment in Driver::ShouldUseClangCompiler implying that there
was an opt-out ability at that point - there isn't.

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

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