]> granicus.if.org Git - clang/log
clang
9 years agoclang-format: When putting */& next to types, also wrap before them.
Daniel Jasper [Thu, 12 Mar 2015 15:04:53 +0000 (15:04 +0000)]
clang-format: When putting */& next to types, also wrap before them.

Before:
  LoooooooooooongType *
      loooooooooooongVariable;

After:
  LoooooooooooongType
      *loooooooooooongVariable;

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

9 years agoclang-format: [Java] Support anonymous classes after = and return.
Daniel Jasper [Thu, 12 Mar 2015 14:44:29 +0000 (14:44 +0000)]
clang-format: [Java] Support anonymous classes after = and return.

Before:
  A a = new A(){public String toString(){return "NotReallyA";
  }
  }
  ;

After:
  A a = return new A() {
    public String toString() {
      return "NotReallyA";
    }
  };

This fixes llvm.org/PR22878.

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

9 years agoSema: Don't emit a missing prototype warning for deleted functions.
Benjamin Kramer [Thu, 12 Mar 2015 14:28:47 +0000 (14:28 +0000)]
Sema: Don't emit a missing prototype warning for deleted functions.

This is a bit more involved than I anticipated, so here's a breakdown
of the changes:
  1. Call ActOnFinishFunctionBody _after_ we parsed =default and
     =delete specifiers. Saying that we finished the body before parsing
     =default is just wrong. Changing this allows us to use isDefaulted
     and isDeleted on a decl in ActOnFinishFunctionBody.
  2. Check for -Wmissing-prototypes after we parsed the function body.
  3. Disable -Wmissing-prototypes when the Decl isDeleted.

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

9 years agoUse Sema's PrintingPolicy when diagnosing DeclSpecs.
Benjamin Kramer [Thu, 12 Mar 2015 14:28:38 +0000 (14:28 +0000)]
Use Sema's PrintingPolicy when diagnosing DeclSpecs.

Sema overrides ASTContext's policy on the first emitted diagnostic
(doesn't matter if it's ignored or not). This means changing the order
of diagnostic emission in Sema suddenly changes the text of diagnostic
emitted from the parser.

In the test case -Wmissing-prototypes (ignored) was the culprit, use
'int main' to suppress that warning so we see when this regresses.
Also move it into Sema/ as it's not testing any C++.

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

9 years agoReverting r232034, as it broke one of the bots with link errors. Details at: http...
Aaron Ballman [Thu, 12 Mar 2015 14:14:48 +0000 (14:14 +0000)]
Reverting r232034, as it broke one of the bots with link errors. Details at: http://bb.pgr.jp/builders/ninja-clang-x64-mingw64-RA/builds/6352/steps/build/logs/stdio

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

9 years agoInstead of dereferencing std::vector::end() (which is UB and causes failed assertions...
Aaron Ballman [Thu, 12 Mar 2015 13:49:45 +0000 (13:49 +0000)]
Instead of dereferencing std::vector::end() (which is UB and causes failed assertions in debug builds with Visual Studio), use data() + size() to calculate the end iterator. Amends r231952.

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

9 years ago[OPENMP] CodeGen - 'omp for' with dynamic schedule kinds.
Alexander Musman [Thu, 12 Mar 2015 13:37:50 +0000 (13:37 +0000)]
[OPENMP] CodeGen - 'omp for' with dynamic schedule kinds.
Differential Revision: http://reviews.llvm.org/D7138

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

9 years agoAdded some matchers for objective c selectors and messages to ASTMatchers.h. Minor...
Aaron Ballman [Thu, 12 Mar 2015 13:21:19 +0000 (13:21 +0000)]
Added some matchers for objective c selectors and messages to ASTMatchers.h. Minor mods to ASTMatchersTest.h to allow test files with ".m" extension in addition to ".cpp". New tests added to ASTMatchersTest.c.

Patch by Dean Sutherland, reviewed by Manuel Klimek. From http://reviews.llvm.org/D7710

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

9 years ago[OPENMP] Initial codegen for 'omp sections' and 'omp section' directives.
Alexey Bataev [Thu, 12 Mar 2015 08:53:29 +0000 (08:53 +0000)]
[OPENMP] Initial codegen for 'omp sections' and 'omp section' directives.
If only one section is found in the sections region, it is emitted just like single region.
Otherwise it is emitted as a static non-chunked loop.

#pragma omp sections
{
#pragma omp section
  {1}
  ...
  #pragma omp section
  {n}
}
is translated to something like

i32 <iter_var>
i32 <last_iter> = 0
i32 <lower_bound> = 0
i32 <upper_bound> = n-1
i32 <stride> = 1
call void @__kmpc_for_static_init_4(<loc>, i32 <gtid>, i32 34/*static non-chunked*/, i32* <last_iter>, i32* <lower_bound>, i32* <upper_bound>, i32* <stride>, i32 1/*increment always 1*/, i32 1/*chunk always 1*/)
<upper_bound> = min(<upper_bound>, n-1)
<iter_var> = <lb>
check:
br <iter_var> <= <upper_bound>, label cont, label exit
continue:
switch (IV) {
  case 0:
  {1};
  break;
  ...
  case <NumSection> - 1:
  {n};
  break;
  }
  ++<iter_var>
  br label check
  exit:
  call void @__kmpc_for_static_fini(<loc>, i32 <gtid>)
Differential Revision: http://reviews.llvm.org/D8244

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

9 years agoUpdate copyright year to 2015.
Tanya Lattner [Thu, 12 Mar 2015 01:36:10 +0000 (01:36 +0000)]
Update copyright year to 2015.

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

9 years agoDriver: Keep -isysroot flags in crash scripts if we're dumping a VFS
Justin Bogner [Thu, 12 Mar 2015 00:52:56 +0000 (00:52 +0000)]
Driver: Keep -isysroot flags in crash scripts if we're dumping a VFS

For crashes with a VFS (ie, with modules), the -isysroot flag is often
necessary to reproduce the crash. This is especially true if some
modules need to be rebuilt, since without the sysroot they'll try to
read headers that are outside of the VFS.

I find it likely that we should keep some of the other -i flags in
this case as well, but I haven't seen that come up in practice yet so
it seems better to be conservative.

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

9 years agodocs: Document byte arrays.
Peter Collingbourne [Thu, 12 Mar 2015 00:30:41 +0000 (00:30 +0000)]
docs: Document byte arrays.

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

9 years agoDriver: Print the clang version and original command in crash scripts
Justin Bogner [Thu, 12 Mar 2015 00:14:35 +0000 (00:14 +0000)]
Driver: Print the clang version and original command in crash scripts

When a crash report script doesn't work for a reproduction on your
machine for one reason or another, it can be really tricky to figure
out why not. The compiler version that crashed and the original
command line before stripping flags are very helpful when this comes
up.

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

9 years agoUnder duress, move check for target support of __builtin_setjmp/
Joerg Sonnenberger [Wed, 11 Mar 2015 23:46:32 +0000 (23:46 +0000)]
Under duress, move check for target support of __builtin_setjmp/
__builtin_longjmp to Sema as requested by John McCall.

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

9 years agoAdd deprecation notice for -f(no-)sanitize-recover flags.
Alexey Samsonov [Wed, 11 Mar 2015 23:34:25 +0000 (23:34 +0000)]
Add deprecation notice for -f(no-)sanitize-recover flags.

These flags should be replaced with corresponding
-f(no-)sanitize-recover=<list> flags.

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

9 years ago[analyzer] www: +progress for undefbehavior.ZeroAllocDereference
Anton Yartsev [Wed, 11 Mar 2015 22:29:32 +0000 (22:29 +0000)]
[analyzer] www: +progress for undefbehavior.ZeroAllocDereference

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

9 years agoDon't overconstrain a FileCheck pattern
David Majnemer [Wed, 11 Mar 2015 21:50:09 +0000 (21:50 +0000)]
Don't overconstrain a FileCheck pattern

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

9 years ago[PowerPC] ABI support for the QPX vector instruction set
Hal Finkel [Wed, 11 Mar 2015 19:14:15 +0000 (19:14 +0000)]
[PowerPC] ABI support for the QPX vector instruction set

Support for the QPX vector instruction set, used on the IBM BG/Q supercomputer,
has recently been added to the LLVM PowerPC backend. This vector instruction
set requires some ABI modifications because the ABI on the BG/Q expects
<4 x double> vectors to be provided with 32-byte stack alignment, and to be
handled as native vector types (similar to how Altivec vectors are handled on
mainline PPC systems). I've named this ABI variant elfv1-qpx, have made this
the default ABI when QPX is supported, and have updated the ABI handling code
to provide QPX vectors with the correct stack alignment and associated
register-assignment logic.

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

9 years agoMS ABI: Mark 'throw' as implemented in the compatibility doc
David Majnemer [Wed, 11 Mar 2015 18:38:51 +0000 (18:38 +0000)]
MS ABI: Mark 'throw' as implemented in the compatibility doc

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

9 years agoMS ABI: Implement copy-ctor closures, finish implementing throw
David Majnemer [Wed, 11 Mar 2015 18:36:39 +0000 (18:36 +0000)]
MS ABI: Implement copy-ctor closures, finish implementing throw

This adds support for copy-constructor closures.  These are generated
when the C++ runtime has to call a copy-constructor with a particular
calling convention or with default arguments substituted in to the call.

Because the runtime has no mechanism to call the function with a
different calling convention or know-how to evaluate the default
arguments at run-time, we create a thunk which will do all the
appropriate work and package it in a way the runtime can use.

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

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

9 years ago[modules] When merging the pattern of a class template definition into a prior
Richard Smith [Wed, 11 Mar 2015 18:21:02 +0000 (18:21 +0000)]
[modules] When merging the pattern of a class template definition into a prior
definition, be sure to update the definition data on all declarations, not just
the canonical one, since the pattern might not be in the list of pending
definitions (if it used to be canonical itself).

One-line fix by me; reduced testcase by Daniel Jasper!

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

9 years agoReverted OpenCL2.0 atomic type commits r231932, r231935
Anastasia Stulova [Wed, 11 Mar 2015 17:26:37 +0000 (17:26 +0000)]
Reverted OpenCL2.0 atomic type commits r231932, r231935
(caused undesirable update of -std flag to use _Atomic)

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

9 years agorevert r231700 (designated initializer patch) which broke
Fariborz Jahanian [Wed, 11 Mar 2015 16:59:48 +0000 (16:59 +0000)]
revert r231700 (designated initializer patch) which broke
several projects. rdar://20120666.

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

9 years agoOpenCL: CL2.0 atomic type diagnostics
Anastasia Stulova [Wed, 11 Mar 2015 16:23:10 +0000 (16:23 +0000)]
OpenCL: CL2.0 atomic type diagnostics

Added restictions for atomic type usage from OpenCL C Spec Section 6.13.11.8

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

9 years agoOpenCL: CL2.0 atomic types
Anastasia Stulova [Wed, 11 Mar 2015 15:57:53 +0000 (15:57 +0000)]
OpenCL: CL2.0 atomic types

OpenCL C Spec v2.0 Section 6.13.11

- Made c11 _Atomic being accepted only for c11 compilations

- Implemented CL2.0 atomics by aliasing them to the corresponding c11 atomic types using implicit typedef

- Added diagnostics for atomics Khronos extension enabling

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

9 years agoAdd builtins for the 64-bit vector integer arithmetic instructions added in POWER8.
Kit Barton [Wed, 11 Mar 2015 15:57:19 +0000 (15:57 +0000)]
Add builtins for the 64-bit vector integer arithmetic instructions added in POWER8.

These are the Clang-related changes for the instructions added to LLVM in http://reviews.llvm.org/D7959.

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

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

9 years agoclang-format: Recognize the .ts (TypeScript) extension as JavaScript.
Daniel Jasper [Wed, 11 Mar 2015 14:58:38 +0000 (14:58 +0000)]
clang-format: Recognize the .ts (TypeScript) extension as JavaScript.

Patch by Martin Probst. Thank you.

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

9 years agoclang-format: Fix incorrect && recognition.
Daniel Jasper [Wed, 11 Mar 2015 12:59:49 +0000 (12:59 +0000)]
clang-format: Fix incorrect && recognition.

Before:
  if (a &&(b = c)) ..

After:
  if (a && (b = c)) ..

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

9 years agoEnable security checks for arc4random() on CloudABI as well.
Ed Schouten [Wed, 11 Mar 2015 08:48:55 +0000 (08:48 +0000)]
Enable security checks for arc4random() on CloudABI as well.

CloudABI also supports the arc4random() function. We can enable compiler
warnings for rand(), random() and *rand48() on this system as well.

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

9 years agoFix up default header paths for CloudABI.
Ed Schouten [Wed, 11 Mar 2015 08:46:01 +0000 (08:46 +0000)]
Fix up default header paths for CloudABI.

CloudABI is a pure cross compilation target. This means that we should
not add /usr/include and /usr/local/include. Instead, headers are stored
in $sysroot/$triple/include.

The method of going back to the sysroot (by using "../../..") is also
used in this function for some of the other environments (e.g., MinGW).

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

9 years agoAdd target information for CloudABI on x86-64.
Ed Schouten [Wed, 11 Mar 2015 08:42:46 +0000 (08:42 +0000)]
Add target information for CloudABI on x86-64.

CloudABI can be identified by the __CloudABI__ preprocessor definition. The
system uses ELF executables.

CloudABI uses Unicode 7.0.0 for the encoding of wchar_t. As Unicode 7.0.0 is
synchronized with ISO/IEC 10646:2012 (released on 2012-06-01),
__STDC_ISO_10646__ is defined as 201206L.

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

9 years agoSema: Properly track mangling number/name for linkage for using decls
David Majnemer [Wed, 11 Mar 2015 06:45:39 +0000 (06:45 +0000)]
Sema: Properly track mangling number/name for linkage for using decls

Using declarations which are aliases to struct types have their name
used as the struct type's name for linkage purposes.  Otherwise, make
sure to give an anonymous struct defined inside a using declaration a
mangling number to disambiguate it from other anonymous structs in the
same context.

This fixes PR22809.

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

9 years agoPrevent test from accessing files.
Daniel Jasper [Wed, 11 Mar 2015 06:01:01 +0000 (06:01 +0000)]
Prevent test from accessing files.

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

9 years ago[OPENMP] Fix for ExprWithCleanups in 'omp atomic' constructs.
Alexey Bataev [Wed, 11 Mar 2015 04:48:56 +0000 (04:48 +0000)]
[OPENMP] Fix for ExprWithCleanups in 'omp atomic' constructs.
This patch allows using of ExprWithCleanups expressions and other complex expressions in 'omp atomic' construct
Differential Revision: http://reviews.llvm.org/D8200

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

9 years agoCGOpenMPRuntime.h: Fix an incorrect \param on emitTaskOutlinedFunction(). [-Wdocument...
NAKAMURA Takumi [Wed, 11 Mar 2015 03:51:40 +0000 (03:51 +0000)]
CGOpenMPRuntime.h: Fix an incorrect \param on emitTaskOutlinedFunction(). [-Wdocumentation]

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

9 years ago[modules] Avoid accidentally completing the redeclaration chain when updating
Richard Smith [Wed, 11 Mar 2015 01:44:51 +0000 (01:44 +0000)]
[modules] Avoid accidentally completing the redeclaration chain when updating
all the existing declarations of a record-like entity with a pointer to its
definition.

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

9 years agoFix test to specify an Itanium triple.
Richard Smith [Wed, 11 Mar 2015 01:09:01 +0000 (01:09 +0000)]
Fix test to specify an Itanium triple.

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

9 years agoRemove a bugus test.
Rafael Espindola [Wed, 11 Mar 2015 00:28:59 +0000 (00:28 +0000)]
Remove a bugus test.

This was using the driver to test LLVM.

I checked that disabling the code path that the test was testing causes
llvm tests to fail.

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

9 years agoFor PR22870: produce an error rather than asserting if a designated initializer appea...
Richard Smith [Wed, 11 Mar 2015 00:12:17 +0000 (00:12 +0000)]
For PR22870: produce an error rather than asserting if a designated initializer appears in a signature.

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

9 years agoGender-neutralize a comment.
Nico Weber [Wed, 11 Mar 2015 00:05:26 +0000 (00:05 +0000)]
Gender-neutralize a comment.

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

9 years ago[modules] Fix iterator invalidation issue with names being added to a module
Richard Smith [Wed, 11 Mar 2015 00:00:51 +0000 (00:00 +0000)]
[modules] Fix iterator invalidation issue with names being added to a module
while we're writing out the identifier table.

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

9 years ago[analyzer] Make getCheckIfTracked() return either leak or regular checker.
Anton Yartsev [Tue, 10 Mar 2015 22:24:21 +0000 (22:24 +0000)]
[analyzer] Make getCheckIfTracked() return either leak or regular checker.

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

9 years agoUpdate clang for llvm r231861.
Eric Christopher [Tue, 10 Mar 2015 22:03:27 +0000 (22:03 +0000)]
Update clang for llvm r231861.

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

9 years ago[Objective-C Sema]. Remove -Wreceiver-is-weak warning.
Fariborz Jahanian [Tue, 10 Mar 2015 21:28:33 +0000 (21:28 +0000)]
[Objective-C Sema]. Remove -Wreceiver-is-weak warning.
It is incorrect and better warning is issued under
-Warc-repeated-use-of-weak. rdar://16316934.

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

9 years agoMS ABI: Mangle the location of the catchable type into it's name
David Majnemer [Tue, 10 Mar 2015 19:01:51 +0000 (19:01 +0000)]
MS ABI: Mangle the location of the catchable type into it's name

Because the catchable type has a reference to its name, mangle the
location to ensure that two catchable types with different locations are
distinct.

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

9 years agoRecognize objc_bridge(id) on bridged casts to CF types.
John McCall [Tue, 10 Mar 2015 18:41:23 +0000 (18:41 +0000)]
Recognize objc_bridge(id) on bridged casts to CF types.

Fixes <rdar://20107345>.

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

9 years agoMake helper functions static. NFC.
Benjamin Kramer [Tue, 10 Mar 2015 18:24:01 +0000 (18:24 +0000)]
Make helper functions static. NFC.

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

9 years agoThe semantic spelling enumeration should retain values to the spelling list indexes...
Aaron Ballman [Tue, 10 Mar 2015 17:19:18 +0000 (17:19 +0000)]
The semantic spelling enumeration should retain values to the spelling list indexes used by the attribute. The only attribute affected by this in practice is the OpenCLImageAccessAttr, which has duplicate semantic spellings that are automatically stripped.

We do not implicitly create an OpenCLImageAccessAttr, so this change only affects out of tree users. There is no way to test this behavior specifically that I can see, since this only affects implicit creation of attributes.

Fixes PR22403.

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

9 years ago[X86, AVX] Replace vinsertf128 intrinsics with generic shuffles.
Sanjay Patel [Tue, 10 Mar 2015 15:19:26 +0000 (15:19 +0000)]
[X86, AVX] Replace vinsertf128 intrinsics with generic shuffles.

We want to replace as much custom x86 shuffling via intrinsics
as possible because pushing the code down the generic shuffle
optimization path allows for better codegen and less complexity
in LLVM.

This is the sibling patch for the LLVM half of this change:
http://reviews.llvm.org/D8086

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

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

9 years agoDocument __has_feature(modules) in LanguageExtensions
Ben Langmuir [Tue, 10 Mar 2015 14:39:26 +0000 (14:39 +0000)]
Document __has_feature(modules) in LanguageExtensions

Fixes PR18985

Patch by Vassil Vassilev!

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

9 years agoAllow -target= and --target options
Renato Golin [Tue, 10 Mar 2015 13:58:33 +0000 (13:58 +0000)]
Allow -target= and --target options

Using clang as a cross-compiler with the 'target' option could be confusing
for those inexperienced in the realm of cross compiling.

This patch would allow the use of all these four variants of the target option:
-target <triple>
--target <triple>
-target=<triple>
--target=<triple>

Patch by Gabor Ballabas.

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

9 years agoTeach raw_ostream to accept SmallString.
Yaron Keren [Tue, 10 Mar 2015 07:33:23 +0000 (07:33 +0000)]
Teach raw_ostream to accept SmallString.

Saves adding .str() call to any raw_ostream << SmallString usage
and a small step towards making .str() consistent in the ADTs by
removing one of the SmallString::str() use cases, discussion at

http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20141013/240026.html

I'll update the Phabricator patch http://reviews.llvm.org/D6372
for review of the Twine SmallString support, it's more complex
than this one.

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

9 years ago[OPENMP] Initial codegen for 'omp task' directive.
Alexey Bataev [Tue, 10 Mar 2015 07:28:44 +0000 (07:28 +0000)]
[OPENMP] Initial codegen for 'omp task' directive.
The task region is emmitted in several steps:

Emit a call to kmp_task_t *__kmpc_omp_task_alloc(ident_t *, kmp_int32 gtid, kmp_int32 flags, size_t sizeof_kmp_task_t, size_t sizeof_shareds, kmp_routine_entry_t *task_entry).
Here task_entry is a pointer to the function:
kmp_int32 .omp_task_entry.(kmp_int32 gtid, kmp_task_t *tt) {
    TaskFunction(gtid, tt->part_id, tt->shareds);
      return 0;
}
Copy a list of shared variables to field shareds of the resulting structure kmp_task_t returned by the previous call (if any).
Copy a pointer to destructions function to field destructions of the resulting structure kmp_task_t.
Emit a call to kmp_int32 __kmpc_omp_task(ident_t *, kmp_int32 gtid, kmp_task_t *new_task), where new_task is a resulting structure from previous items.
Differential Revision: http://reviews.llvm.org/D7560

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

9 years ago[OPENMP] Fixed tests for non-debug builds. NFC.
Alexey Bataev [Tue, 10 Mar 2015 05:28:46 +0000 (05:28 +0000)]
[OPENMP] Fixed tests for non-debug builds. NFC.

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

9 years ago[OPENMP] Improved code for generating debug info + generation of all OpenMP regions...
Alexey Bataev [Tue, 10 Mar 2015 05:15:26 +0000 (05:15 +0000)]
[OPENMP] Improved code for generating debug info + generation of all OpenMP regions in termination scope
Patch adds proper generation of debug info for all OpenMP regions. Also, all OpenMP regions are generated in a termination scope, because standard does not allow to throw exceptions out of structured blocks, associated with the OpenMP regions
Differential Revision: http://reviews.llvm.org/D7935

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

9 years agoRevert "[OPENMP] Improved code for generating debug info + generation of all OpenMP...
Rafael Espindola [Tue, 10 Mar 2015 04:40:21 +0000 (04:40 +0000)]
Revert "[OPENMP] Improved code for generating debug info + generation of all OpenMP regions in termination scope Patch adds proper generation of debug info for all OpenMP regions. Also, all OpenMP regions are generated in a termination scope, because standard does not allow to throw exceptions out of structured blocks, associated with the OpenMP regions Differential Revision: http://reviews.llvm.org/D7935"

This reverts commit r231752.

It was failing to link with cmake:

lib64/libclangCodeGen.a(CGOpenMPRuntime.cpp.o):/home/espindola/llvm/llvm/tools/clang/lib/CodeGen/CGOpenMPRuntime.cpp:function clang::CodeGen::InlinedOpenMPRegionRAII::~InlinedOpenMPRegionRAII(): error: undefined reference to 'clang::CodeGen::EHScopeStack::popTerminate()'
clang-3.7: error: linker command failed with exit code 1 (use -v to see invocation)

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

9 years ago[OPENMP] Improved code for generating debug info + generation of all OpenMP regions...
Alexey Bataev [Tue, 10 Mar 2015 04:22:11 +0000 (04:22 +0000)]
[OPENMP] Improved code for generating debug info + generation of all OpenMP regions in termination scope
Patch adds proper generation of debug info for all OpenMP regions. Also, all OpenMP regions are generated in a termination scope, because standard does not allow to throw exceptions out of structured blocks, associated with the OpenMP regions
Differential Revision: http://reviews.llvm.org/D7935

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

9 years ago[modules] Don't bother looking up a declaration to merge into if we're not
Richard Smith [Tue, 10 Mar 2015 02:57:50 +0000 (02:57 +0000)]
[modules] Don't bother looking up a declaration to merge into if we're not
actually loading a formerly-canonical declaration.

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

9 years agoUpdate for LLVM API change: getOrEnforceKnownAlignment() requires a DataLayout
Mehdi Amini [Tue, 10 Mar 2015 02:36:43 +0000 (02:36 +0000)]
Update for LLVM API change: getOrEnforceKnownAlignment() requires a DataLayout

From: Mehdi Amini <mehdi.amini@apple.com>

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

9 years agoPR21687: when adding a redeclaration of a function with an implicit exception
Richard Smith [Tue, 10 Mar 2015 02:00:53 +0000 (02:00 +0000)]
PR21687: when adding a redeclaration of a function with an implicit exception
specification, update all prior declarations if the new one has an explicit
exception specification and the prior ones don't.

Patch by Vassil Vassilev! Some minor tweaking and test case by me.

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

9 years ago[modules] Don't clobber a destructor's operator delete when adding another one;
Richard Smith [Tue, 10 Mar 2015 01:41:22 +0000 (01:41 +0000)]
[modules] Don't clobber a destructor's operator delete when adding another one;
move the operator delete updating into a separate update record so we can cope
with updating another module's destructor's operator delete.

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

9 years ago[modules] This check is run before we resolve the header, not after, so just
Richard Smith [Tue, 10 Mar 2015 00:19:04 +0000 (00:19 +0000)]
[modules] This check is run before we resolve the header, not after, so just
check that private headers are in a list matching the role. (We can't perform
the opposite checks for non-private headers because we infer those.)

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

9 years ago[modules] Don't assert if the same header is named as both a public and a
Richard Smith [Mon, 9 Mar 2015 23:46:50 +0000 (23:46 +0000)]
[modules] Don't assert if the same header is named as both a public and a
private header within the same module.

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

9 years agoSuppress a couple of tests, clang/test/CodeGen/catch-undef-behavior.c and one, for...
NAKAMURA Takumi [Mon, 9 Mar 2015 22:32:03 +0000 (22:32 +0000)]
Suppress a couple of tests, clang/test/CodeGen/catch-undef-behavior.c and one, for -Asserts for now. They were introduced in r231711.

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

9 years ago[UBSan] Split -fsanitize=shift into -fsanitize=shift-base and -fsanitize=shift-exponent.
Alexey Samsonov [Mon, 9 Mar 2015 21:50:19 +0000 (21:50 +0000)]
[UBSan] Split -fsanitize=shift into -fsanitize=shift-base and -fsanitize=shift-exponent.

This is a recommit of r231150, reverted in r231409. Turns out
that -fsanitize=shift-base check implementation only works if the
shift exponent is valid, otherwise it contains undefined behavior
itself.

Make sure we check that exponent is valid before we proceed to
check the base. Make sure that we actually report invalid values
of base or exponent if -fsanitize=shift-base or
-fsanitize=shift-exponent is specified, respectively.

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

9 years agoARM: use ABI-specified alignment for byval parameters.
Tim Northover [Mon, 9 Mar 2015 21:40:42 +0000 (21:40 +0000)]
ARM: use ABI-specified alignment for byval parameters.

When passing a type with large alignment byval, we were specifying the type's
alignment rather than the alignment that the backend is actually capable of
producing (ABIAlign).

This would be OK (if odd) assuming the backend dealt with it prooperly,
unfortunately it doesn't and trying to pass types with "byval align 16" can
cause it to set fp incorrectly and trash the stack during the prologue. I'll be
fixing that in a separate patch, but Clang should still be emitting IR that's
as close to its intent as possible.

rdar://20059039

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

9 years ago[PATCH Sema Objective-C]. Patch to warn on missing designated initializer
Fariborz Jahanian [Mon, 9 Mar 2015 20:39:51 +0000 (20:39 +0000)]
[PATCH Sema Objective-C]. Patch to warn on missing designated initializer
override where at least a declaration of a designated initializer is in a super
class and not necessarily in the current class. rdar://19653785.

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

9 years agoRoll functions back into namespaces, msvc has problems with name lookup outside of it.
Benjamin Kramer [Mon, 9 Mar 2015 17:00:48 +0000 (17:00 +0000)]
Roll functions back into namespaces, msvc has problems with name lookup outside of it.

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

9 years agoCorrect doxygen for matcher macros that require a body. NFC.
Alexander Kornienko [Mon, 9 Mar 2015 16:57:49 +0000 (16:57 +0000)]
Correct doxygen for matcher macros that require a body. NFC.

http://reviews.llvm.org/D8146

Patch by Richard Thomson!

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

9 years agoMake helper functions static. NFC.
Benjamin Kramer [Mon, 9 Mar 2015 16:47:52 +0000 (16:47 +0000)]
Make helper functions static. NFC.

Found by -Wmissing-prototypes.

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

9 years agoMake helper functions static
Benjamin Kramer [Mon, 9 Mar 2015 15:03:32 +0000 (15:03 +0000)]
Make helper functions static

NFC.

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

9 years agoTooling: Hide implementation details
Benjamin Kramer [Mon, 9 Mar 2015 15:03:26 +0000 (15:03 +0000)]
Tooling: Hide implementation details

NFC.

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

9 years agoInheritViz: Hide implementation details
Benjamin Kramer [Mon, 9 Mar 2015 15:03:20 +0000 (15:03 +0000)]
InheritViz: Hide implementation details

NFC.

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

9 years agoHide away implementation details of the ThreadSafetyAnalysis in anonymous namespaces
Benjamin Kramer [Mon, 9 Mar 2015 14:19:54 +0000 (14:19 +0000)]
Hide away implementation details of the ThreadSafetyAnalysis in anonymous namespaces

NFC.

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

9 years agoFix a menu issue. patch by Vassil Vassilev
Sylvestre Ledru [Mon, 9 Mar 2015 09:09:55 +0000 (09:09 +0000)]
Fix a menu issue. patch by Vassil Vassilev

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

9 years agoclang-format: Don't remove newline if macro ends in access specifier.
Daniel Jasper [Mon, 9 Mar 2015 08:13:55 +0000 (08:13 +0000)]
clang-format: Don't remove newline if macro ends in access specifier.

I.e.:

  #define A public:

  // The new line before this line would be removed.
  int a;

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

9 years agoWarn when jumping out of a __finally block via goto.
Nico Weber [Mon, 9 Mar 2015 04:27:56 +0000 (04:27 +0000)]
Warn when jumping out of a __finally block via goto.

This only warns on direct gotos and indirect gotos with a unique label
(`goto *&&label;`).  Jumping out ith a true indirect goto is already an error.

This isn't O(1), but goto statements are less common than continue, break, and
return.  Also, the GetDeepestCommonScope() call in the same function does the
same amount of work, so this isn't worse than what's there in a complexity
sense, and it should be pretty fast in practice.

This is the last piece that was missing in r231623.

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

9 years agoFix a theoretical bug when ParseCompoundStatement() returns StmtError.
Nico Weber [Mon, 9 Mar 2015 03:17:15 +0000 (03:17 +0000)]
Fix a theoretical bug when ParseCompoundStatement() returns StmtError.

ParseCompoundStatement() currently never returns StmtError, but if it did,
Sema would keep the __finally scope on its stack indefinitely.  Explicitly
add an error callback that clears it.

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

9 years agoWarn when jumping out of a __finally block via continue, break, return, __leave.
Nico Weber [Mon, 9 Mar 2015 02:47:59 +0000 (02:47 +0000)]
Warn when jumping out of a __finally block via continue, break, return, __leave.

Since continue, break, return are much more common than __finally, this tries
to keep the work for continue, break, return O(1).  Sema keeps a stack of active
__finally scopes (to do this, ActOnSEHFinally() is split into
ActOnStartSEHFinally() and ActOnFinishSEHFinally()), and the various jump
statements then check if the current __finally scope (if present) is deeper
than then destination scope of the jump.

The same warning for goto statements is still missing.

This is the moral equivalent of MSVC's C4532.

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

9 years agoFix typo in comment.
Nico Weber [Mon, 9 Mar 2015 02:34:29 +0000 (02:34 +0000)]
Fix typo in comment.

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

9 years agoWrap to 80 columns. No behavior change.
Nico Weber [Mon, 9 Mar 2015 02:33:32 +0000 (02:33 +0000)]
Wrap to 80 columns. No behavior change.

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

9 years agoSimplify boolean expressions in clang with clang-tidy
David Blaikie [Mon, 9 Mar 2015 02:02:07 +0000 (02:02 +0000)]
Simplify boolean expressions in clang with clang-tidy

Patch by Richard (legalize at xmission dot com).

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

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

9 years agoProperly initialize the parser_crash debug token.
Benjamin Kramer [Sun, 8 Mar 2015 19:28:24 +0000 (19:28 +0000)]
Properly initialize the parser_crash debug token.

Found by msan.

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

9 years agoFix the MSVC build.
Benjamin Kramer [Sun, 8 Mar 2015 18:20:22 +0000 (18:20 +0000)]
Fix the MSVC build.

Type traits are hard.

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

9 years agoMake Token a real POD type.
Benjamin Kramer [Sun, 8 Mar 2015 18:11:59 +0000 (18:11 +0000)]
Make Token a real POD type.

We copy them around a lot and skip construction in favor of startToken,
make the default construction trivial to reflect that.

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

9 years agoMake constant static variables const so they can go into a read-only section
Benjamin Kramer [Sun, 8 Mar 2015 16:06:46 +0000 (16:06 +0000)]
Make constant static variables const so they can go into a read-only section

NFC.

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

9 years ago[Rewrite] Make RewriteBuffer accessible on its own, and add a unit test for it.
Argyrios Kyrtzidis [Sun, 8 Mar 2015 04:00:33 +0000 (04:00 +0000)]
[Rewrite] Make RewriteBuffer accessible on its own, and add a unit test for it.

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

9 years ago[Rewrite] Move RewriteBuffer into its own header.
Argyrios Kyrtzidis [Sun, 8 Mar 2015 04:00:28 +0000 (04:00 +0000)]
[Rewrite] Move RewriteBuffer into its own header.

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

9 years agoASTMatchers: Make AST_POLYMORPHIC_SUPPORTED_TYPES a variadic macro
Benjamin Kramer [Sat, 7 Mar 2015 20:38:15 +0000 (20:38 +0000)]
ASTMatchers: Make AST_POLYMORPHIC_SUPPORTED_TYPES a variadic macro

C++11 finally allows us to use this C99 feature.

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

9 years agoWrap to 80 columns. No behavior change.
Nico Weber [Sat, 7 Mar 2015 19:52:39 +0000 (19:52 +0000)]
Wrap to 80 columns. No behavior change.

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

9 years agoReapply r231508 "CodeGen: Emit constant temporaries into read-only globals."
Benjamin Kramer [Sat, 7 Mar 2015 13:37:13 +0000 (13:37 +0000)]
Reapply r231508 "CodeGen: Emit constant temporaries into read-only globals."

I disabled putting the new global into the same COMDAT as the function for now.
There's a fundamental problem when we inline references to the global but still
have the global in a COMDAT linked to the inlined function. Since this is only
an optimization there may be other versions of the COMDAT around that are
missing the new global and hell breaks loose at link time.

I hope the chromium build doesn't break this time :)

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

9 years agoMuch like we silence warnings about -flto in many cases to facilitate
Chandler Carruth [Sat, 7 Mar 2015 10:01:29 +0000 (10:01 +0000)]
Much like we silence warnings about -flto in many cases to facilitate
simplicity in build systems, silence '-stdlib=libc++' when linking. Even
if we're not linking C++ code per-se, we may be passing this flag so
that when we are linking C++ code we pick up the desired standard
library. While most build systems already provide separate C and C++
compile flags, many conflate link flags. Sadly, CMake is among them
causing this warning in a libc++ selfhost.

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

9 years ago[analyzer] RetainCountChecker: CF properties are always manually retain-counted.
Jordan Rose [Sat, 7 Mar 2015 05:47:24 +0000 (05:47 +0000)]
[analyzer] RetainCountChecker: CF properties are always manually retain-counted.

In theory we could assume a CF property is stored at +0 if there's not a custom
setter, but that's not really worth the complexity. What we do know is that a
CF property can't have ownership attributes, and so we shouldn't assume anything
about the ownership of the ivar.

rdar://problem/20076963

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

9 years ago[analyzer] Remove unused type (addition to r231540: "Revert changes from r229593")
Anton Yartsev [Sat, 7 Mar 2015 01:57:31 +0000 (01:57 +0000)]
[analyzer] Remove unused type (addition to r231540: "Revert changes from r229593")

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

9 years agoRevert r231508 "CodeGen: Emit constant temporaries into read-only globals."
Hans Wennborg [Sat, 7 Mar 2015 00:46:19 +0000 (00:46 +0000)]
Revert r231508 "CodeGen: Emit constant temporaries into read-only globals."

This broke the Chromium build. Links were failing with messages like:

obj/dbus/libdbus_test_support.a(obj/dbus/dbus_test_support.mock_object_proxy.o):../../dbus/mock_object_proxy.cc:function dbus::MockObjectProxy::Detach(): warning: relocation refers to discarded section
/usr/local/google/work/chromium/src/third_party/binutils/Linux_x64/Release/bin/ld.gold: error: treating warnings as errors

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

9 years ago[analyzer] Revert changes from r229593; an enhancement is under discussion
Anton Yartsev [Sat, 7 Mar 2015 00:31:53 +0000 (00:31 +0000)]
[analyzer] Revert changes from r229593; an enhancement is under discussion

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

9 years agoReplace Sema's map of locally-scoped extern "C" declarations with a DeclContext
Richard Smith [Sat, 7 Mar 2015 00:04:49 +0000 (00:04 +0000)]
Replace Sema's map of locally-scoped extern "C" declarations with a DeclContext
of extern "C" declarations. This is simpler and vastly more efficient for
modules builds (we no longer need to load *all* extern "C" declarations to
determine if we have a redeclaration).

No functionality change intended.

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

9 years agoUnbreak build bots
David Majnemer [Fri, 6 Mar 2015 23:56:30 +0000 (23:56 +0000)]
Unbreak build bots

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

9 years agoMS ABI: Stick throw-related data into the .xdata section
David Majnemer [Fri, 6 Mar 2015 23:45:23 +0000 (23:45 +0000)]
MS ABI: Stick throw-related data into the .xdata section

This is a little nicer as it keeps the contents of .xdata away from
normal .rdata; we expect .xdata to be far colder than .rdata.

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

9 years agoMS ABI: Correctly generate throw-info for pointer to const qual types
David Majnemer [Fri, 6 Mar 2015 23:45:20 +0000 (23:45 +0000)]
MS ABI: Correctly generate throw-info for pointer to const qual types

We didn't create type info based on the unqualified pointee type,
causing RTTI mismatches.

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