]> granicus.if.org Git - clang/log
clang
10 years ago[modules] Fix a rejects-valid resulting from emitting an inline function
Richard Smith [Wed, 13 Aug 2014 21:15:09 +0000 (21:15 +0000)]
[modules] Fix a rejects-valid resulting from emitting an inline function
recursively within the emission of another inline function. This ultimately
led to us emitting the same inline function definition twice, which we then
rejected because we believed we had a mangled name conflict.

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

10 years agoObjective-C. This patch is to resolve the method used in method
Fariborz Jahanian [Wed, 13 Aug 2014 21:07:35 +0000 (21:07 +0000)]
Objective-C. This patch is to resolve the method used in method
expression to the best method found in global method pools.
This is wip.  // rdar://16808765

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

10 years agoSimplify a few loops over CallArgList/FunctionArgList. NFC
Alexey Samsonov [Wed, 13 Aug 2014 20:06:24 +0000 (20:06 +0000)]
Simplify a few loops over CallArgList/FunctionArgList. NFC

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

10 years agoAArch64: Prefetch intrinsic
Yi Kong [Wed, 13 Aug 2014 19:18:20 +0000 (19:18 +0000)]
AArch64: Prefetch intrinsic

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

10 years agoARM: Prefetch intrinsics
Yi Kong [Wed, 13 Aug 2014 19:18:14 +0000 (19:18 +0000)]
ARM: Prefetch intrinsics

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

10 years agoRevert what looks like an unintended change in r215557.
Rafael Espindola [Wed, 13 Aug 2014 17:15:42 +0000 (17:15 +0000)]
Revert what looks like an unintended change in r215557.

Should fix test ulibc driver tests.

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

10 years agoSmall cleanup: Don't duplicate default behavior.
Rafael Espindola [Wed, 13 Aug 2014 17:08:22 +0000 (17:08 +0000)]
Small cleanup: Don't duplicate default behavior.

std::unique_ptr is null initialized and reset default to null.

Thanks to David Blaikie for noticing.

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

10 years agoUse std::unique_ptr to simplify memory management a bit.
Rafael Espindola [Wed, 13 Aug 2014 16:47:00 +0000 (16:47 +0000)]
Use std::unique_ptr to simplify memory management a bit.

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

10 years agoHeader guard canonicalization, clang part.
Benjamin Kramer [Wed, 13 Aug 2014 16:25:19 +0000 (16:25 +0000)]
Header guard canonicalization, clang part.

Modifications made by clang-tidy with minor tweaks.

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

10 years agoWork around missing handling of temporaries bound to default arguments.
Manuel Klimek [Wed, 13 Aug 2014 15:25:55 +0000 (15:25 +0000)]
Work around missing handling of temporaries bound to default arguments.

Yet more problems due to the missing CXXBindTemporaryExpr in the CFG for
default arguments.

Unfortunately we cannot just switch off inserting temporaries for the
corresponding default arguments, as that breaks existing tests
(test/SemaCXX/return-noreturn.cpp:245).

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

10 years ago[Driver] Support -muclibc / -mglibc command line options for a couple
Simon Atanasyan [Wed, 13 Aug 2014 14:34:14 +0000 (14:34 +0000)]
[Driver] Support -muclibc / -mglibc command line options for a couple
of MIPS toolchains.

The uCLibc implemented for multiple architectures. A couple of MIPS toolchains
contains both uCLibc and glibc implementation so these options allow to select
used C library.

Initially -muclibc / -mglibc (as well as -mbionic) have been implemented in gcc
for various architectures so they are not MIPS specific.

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

10 years agoFor NetBSD, use the same settings for PPC64 as for PPC when it comes to
Joerg Sonnenberger [Wed, 13 Aug 2014 14:17:32 +0000 (14:17 +0000)]
For NetBSD, use the same settings for PPC64 as for PPC when it comes to
integrated assembler, libc++ and libgcc. Set emulation for ld for both
platforms for correct -m32 handling.

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

10 years agoFix crasher bug in clang-format.
Manuel Klimek [Wed, 13 Aug 2014 14:00:41 +0000 (14:00 +0000)]
Fix crasher bug in clang-format.

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

10 years agoDefault getFile() to use the last accessed name in the FileEntry.
Manuel Klimek [Wed, 13 Aug 2014 12:34:41 +0000 (12:34 +0000)]
Default getFile() to use the last accessed name in the FileEntry.

With modules we start accessing headers for the first time while reading
the module map, which often has very different paths from the include
scanning logic.

Using the name by which the file was accessed gets us one step closer to
the right solution, which is using a FileName abstraction that decouples
the name by which a file was accessed from the FileEntry.

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

10 years agoEmit diagnostic for -munaligned-access on v6m targets
Oliver Stannard [Wed, 13 Aug 2014 09:18:12 +0000 (09:18 +0000)]
Emit diagnostic for -munaligned-access on v6m targets

Rather than silently disabling unaligned accesses for v6m targets as
in the previous patch to llvm, instead produce a warning saying that
this architecture doesn't support unaligned accesses.

Patch by Ben Foster

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

10 years agoclang-format: Format long lists in columns if without bin-packing.
Daniel Jasper [Wed, 13 Aug 2014 08:46:21 +0000 (08:46 +0000)]
clang-format: Format long lists in columns if without bin-packing.

After (even with BinPacking = false):
  const Aaaaaa aaaaa = {
      aaaaa,  bbbbb,  ccccc,  ddddd,  eeeee,  ffffff, ggggg, hhhhhh,
      iiiiii, jjjjjj, kkkkkk, aaaaa,  bbbbb,  ccccc,  ddddd, eeeee,
      ffffff, ggggg,  hhhhhh, iiiiii, jjjjjj, kkkkkk,
  };

Before:
  <each element on its own line>

This fixes http://llvm.org/PR20623.

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

10 years agoclang-format: Understand #defines defining system includes.
Daniel Jasper [Wed, 13 Aug 2014 08:29:18 +0000 (08:29 +0000)]
clang-format: Understand #defines defining system includes.

Before:
  #define MY_IMPORT < a / b >

After:
  #define MY_IMPORT <a/b>

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

10 years agoPR20634: add some more cases that can legitimately come after a struct declaration...
Richard Smith [Wed, 13 Aug 2014 02:13:15 +0000 (02:13 +0000)]
PR20634: add some more cases that can legitimately come after a struct declaration to our list of special cases.

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

10 years ago[modules] When performing a lookup into a namespace, ensure that any later
Richard Smith [Wed, 13 Aug 2014 01:23:33 +0000 (01:23 +0000)]
[modules] When performing a lookup into a namespace, ensure that any later
redefinitions of that namespace have already been loaded. When writing out the
names in a namespace, if we see a name that is locally declared and had
imported declarations merged on top of it, export the local declaration as the
lookup result, because it will be the most recent declaration of that entity in
the redeclaration chain of an importer of the module.

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

10 years ago[AVX512] Add intrinsics for FP scalar broadcasts
Adam Nemet [Wed, 13 Aug 2014 00:29:01 +0000 (00:29 +0000)]
[AVX512] Add intrinsics for FP scalar broadcasts

Similar approach to the set1 intrinsics is used: implement in terms of vector
initializers and then ensure with an LLVM test that a broadcast is generated
at the end.

Part of <rdar://problem/17688758>

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

10 years ago[UBSan] Add returns-nonnull sanitizer.
Alexey Samsonov [Wed, 13 Aug 2014 00:26:40 +0000 (00:26 +0000)]
[UBSan] Add returns-nonnull sanitizer.

Summary:
This patch adds a runtime check verifying that functions
annotated with "returns_nonnull" attribute do in fact return nonnull pointers.
It is based on suggestion by Jakub Jelinek:
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20140623/223693.html.

Test Plan: regression test suite

Reviewers: rsmith

Reviewed By: rsmith

Subscribers: cfe-commits

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

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

10 years agoObjective-C [qoi]. Patch to not do Fix-It for fixing
Fariborz Jahanian [Tue, 12 Aug 2014 22:16:41 +0000 (22:16 +0000)]
Objective-C [qoi]. Patch to not do Fix-It for fixing
a messaging expression except in the simple case
of a unary selector. We cannot reliably provide such a fixit due
to numerous reasons where a matching selector could not be found.
rdar://15756038

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

10 years agoFix the \param comments to have the parameter name.
Samuel Benzaquen [Tue, 12 Aug 2014 21:49:59 +0000 (21:49 +0000)]
Fix the \param comments to have the parameter name.

Summary: This fixes the build break introduced in rL215472

Reviewers: pcc

Subscribers: klimek, cfe-commits

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

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

10 years agoSupport named values in the autocomplete feature.
Samuel Benzaquen [Tue, 12 Aug 2014 21:11:37 +0000 (21:11 +0000)]
Support named values in the autocomplete feature.

Summary:
This includes:
 - Passing a Sema to completeExpression to allow for named values in the
   expression.
 - Passing a map of names to values to the parser.
 - Update the Sema interface to include completion for matchers.
 - Change the parser to use the Sema for completion, instead of going
   directly to Registry.

Reviewers: pcc

Subscribers: klimek, cfe-commits

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

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

10 years agoImprove -Wuninitialized to catch const classes being used in their own copy
Richard Trieu [Tue, 12 Aug 2014 21:05:04 +0000 (21:05 +0000)]
Improve -Wuninitialized to catch const classes being used in their own copy
constructors.

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

10 years agoMS ABI: Mangle this qualifiers on function types
David Majnemer [Tue, 12 Aug 2014 17:53:10 +0000 (17:53 +0000)]
MS ABI: Mangle this qualifiers on function types

C++11 allows this qualifiers to exist on function types when used in
template arguments.  Previously, I believed it wasn't possible because
MSVC rejected declarations like: S<int () const &> s;

However, it turns out MSVC properly allows them in using declarations;
updated clang to be compatible with this mangling.

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

10 years ago[analyzer] Check for negative values used as the size of a C variable-length array.
Jordan Rose [Tue, 12 Aug 2014 16:44:22 +0000 (16:44 +0000)]
[analyzer] Check for negative values used as the size of a C variable-length array.

Patch by Daniel Fahlgren!

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

10 years agoVerify all the module map files for a pcm are the same on load
Ben Langmuir [Tue, 12 Aug 2014 16:42:33 +0000 (16:42 +0000)]
Verify all the module map files for a pcm are the same on load

We already verified the primary module map file (either the one that
defines the top-level module, or the one that allows inferring it if it
is an inferred framework module). Now we also verify any other module
map files that define submodules, such as when there is a
module.private.modulemap file.

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

10 years agoAdd a module cache path to test/Headers/cxx11
Ben Langmuir [Tue, 12 Aug 2014 16:42:25 +0000 (16:42 +0000)]
Add a module cache path to test/Headers/cxx11

Don't depend on the serialization format remaining the same.

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

10 years agoAllow @synchronized to contextually convert a C++ object to an ObjC object pointer.
Jordan Rose [Tue, 12 Aug 2014 16:20:36 +0000 (16:20 +0000)]
Allow @synchronized to contextually convert a C++ object to an ObjC object pointer.

Patch by Grant Paul!

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

10 years agoObjective-C. Fixes an assert where because of captured
Fariborz Jahanian [Tue, 12 Aug 2014 15:51:49 +0000 (15:51 +0000)]
Objective-C. Fixes an assert where because of captured
variable in block is over-aligned with an align
attribute causing block metadata size not be multiple
of alignment. rdar://17878679

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

10 years agoUse StringRef instead of MemoryBuffer&.
Rafael Espindola [Tue, 12 Aug 2014 15:46:24 +0000 (15:46 +0000)]
Use StringRef instead of MemoryBuffer&.

This code doesn't care where the data it is processing comes from, so a
StringRef is probably the most natural interface.

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

10 years agoAdding some test cases to test attribute-related source range diagnostics. This augme...
Aaron Ballman [Tue, 12 Aug 2014 14:00:40 +0000 (14:00 +0000)]
Adding some test cases to test attribute-related source range diagnostics. This augments r214722, r214723 and r214507.

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

10 years agoAdd documentation on how Language option in .clang-format files work.
Alexander Kornienko [Tue, 12 Aug 2014 13:34:22 +0000 (13:34 +0000)]
Add documentation on how Language option in .clang-format files work.

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

10 years agoclang-format: Avoid bad line break.
Daniel Jasper [Tue, 12 Aug 2014 13:22:26 +0000 (13:22 +0000)]
clang-format: Avoid bad line break.

Before:
  int
  aaaaaaaaaaaaaaaaaaaaaaaaaaaaa(const
                                typename aaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaa);

After:
  int aaaaaaaaaaaaaaaaaaaaaaaaaaaaa(
      const typename aaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaa);

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

10 years agoclang/test/Frontend/print-header-includes.c REQUIRES shell due to "cd".
NAKAMURA Takumi [Tue, 12 Aug 2014 09:31:27 +0000 (09:31 +0000)]
clang/test/Frontend/print-header-includes.c REQUIRES shell due to "cd".

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

10 years agoCorrectly implement -include search logic.
Manuel Klimek [Tue, 12 Aug 2014 08:25:57 +0000 (08:25 +0000)]
Correctly implement -include search logic.

According to the gcc docs, -include uses the current working directory
for the lookup instead of the main source file.

This patch gets rid of NormalizeIncludePath (which relied on an
implementation detail of FileManager / FileEntry for the include path
logic to work), and instead hands the correct lookup information down to
LookupFile.

This will allow us to change the FileEntry's behavior regarding its Name
caching.

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

10 years agoDebuginfo: Correctly tag variadic ObjC methods with DW_TAG_unspecified_parameter.
Frederic Riss [Tue, 12 Aug 2014 04:42:23 +0000 (04:42 +0000)]
Debuginfo: Correctly tag variadic ObjC methods with DW_TAG_unspecified_parameter.

Fixes rdar://13690847

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

10 years agoReject virt-specifiers on friend declarations. Give anonymous bitfields a
Richard Smith [Tue, 12 Aug 2014 00:22:39 +0000 (00:22 +0000)]
Reject virt-specifiers on friend declarations. Give anonymous bitfields a
location so their diagnostics have somewhere to point.

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

10 years agoReject varargs '...' in function prototype if there are more parameters after
Richard Smith [Mon, 11 Aug 2014 23:30:23 +0000 (23:30 +0000)]
Reject varargs '...' in function prototype if there are more parameters after
it. Diagnose with recovery if it appears after a function parameter that was
obviously supposed to be a parameter pack. Otherwise, warn if it immediately
follows a function parameter pack, because the user most likely didn't intend
to write a parameter pack followed by a C-style varargs ellipsis.

This warning can be syntactically disabled by using ", ..." instead of "...".

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

10 years agoModify behavior of -ast-dump-lookups: if -ast-dump is not also provided, dump
Richard Smith [Mon, 11 Aug 2014 22:11:07 +0000 (22:11 +0000)]
Modify behavior of -ast-dump-lookups: if -ast-dump is not also provided, dump
anyway. If -ast-dump *is* also provided, then dump the AST declarations as well
as the lookup results. This is invaluable for cross-correlating the lookup
information with the declarations actually found.

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

10 years agoChange MemoryBuffer* to MemoryBuffer& parameter to Lexer::ComputePreamble
David Blaikie [Mon, 11 Aug 2014 22:08:06 +0000 (22:08 +0000)]
Change MemoryBuffer* to MemoryBuffer& parameter to Lexer::ComputePreamble

(dropping const from the reference as MemoryBuffer is immutable already,
so const is just redundant - and while I'd personally put const
everywhere, that's not the LLVM Way (see llvm::Type for another example
of an immutable type where "const" is omitted for brevity))

Changing the pointer argument to a reference parameter makes call sites
identical between callers with unique_ptrs or raw pointers, minimizing
the churn in a pending unique_ptr migrations.

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

10 years agounique_ptr-ify FileSystemStatCache::setNextStatCache
David Blaikie [Mon, 11 Aug 2014 21:29:24 +0000 (21:29 +0000)]
unique_ptr-ify FileSystemStatCache::setNextStatCache

And in the process, discover that FileManager::removeStatCache had a
double-delete when removing an element from the middle of the list (at
the beginning or the end of the list, there was no problem) and add a
unit test to exercise the code path (which successfully crashed when run
(with modifications to match the old API) without this patch applied)

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

10 years agounique_ptr-ify the MemoryBuffer parameter of GlobalModuleIndex
David Blaikie [Mon, 11 Aug 2014 18:47:26 +0000 (18:47 +0000)]
unique_ptr-ify the MemoryBuffer parameter of GlobalModuleIndex

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

10 years agoAdd some FIXMEs.
Richard Smith [Mon, 11 Aug 2014 18:35:44 +0000 (18:35 +0000)]
Add some FIXMEs.

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

10 years agoSema: Properly perform lookup when acting on fields for desig inits
David Majnemer [Mon, 11 Aug 2014 18:33:59 +0000 (18:33 +0000)]
Sema: Properly perform lookup when acting on fields for desig inits

Clang used a custom implementation of lookup when handling designated
initializers.  The custom code was not particularly optimized and relied
on standard lookup for typo-correction anyway.

This custom code has to go, it doesn't properly support MSVC-style
anonymous structs embedded inside other records; replace it with the
typo-correction path.

This has the side effect of speeding up semantic handling of the fields
for a designated initializer while simplifying the code at the same
time.

This fixes PR20573.

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

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

10 years agoRevert r215365 - Coverage mapping: emit mapping for cxx constructors that use microso...
Alex Lorenz [Mon, 11 Aug 2014 18:21:34 +0000 (18:21 +0000)]
Revert r215365 - Coverage mapping: emit mapping for cxx constructors that use microsoft's ABI

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

10 years agoToolChains.cpp: Increase size of Lines vector in DetectDistro
Hans Wennborg [Mon, 11 Aug 2014 18:09:32 +0000 (18:09 +0000)]
ToolChains.cpp: Increase size of Lines vector in DetectDistro

In a Clang bootstrap, the size of this vector was always 11.

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

10 years agoIncrease the size of two SmallVectors in Generic_GCC::GCCInstallationDetector::init
Hans Wennborg [Mon, 11 Aug 2014 18:09:28 +0000 (18:09 +0000)]
Increase the size of two SmallVectors in Generic_GCC::GCCInstallationDetector::init

In a bootstrap build of Clang, the size was always greater than 12.

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

10 years agoGCC compatibility: Ignore -fexec-charset=UTF-8 argument. It is the default in Clang...
Sylvestre Ledru [Mon, 11 Aug 2014 18:09:03 +0000 (18:09 +0000)]
GCC compatibility: Ignore -fexec-charset=UTF-8 argument. It is the default in Clang. Reject other values.

Summary:
Just like with -finput-charset=UTF-8 in review http://reviews.llvm.org/D4347, I think we should just ignore it when UTF-8 is provided.

Reviewers: rnk, rafael

Reviewed By: rafael

Subscribers: rafael, cfe-commits

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

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

10 years agoCoverage mapping: emit mapping for cxx constructors that use microsoft's ABI
Alex Lorenz [Mon, 11 Aug 2014 17:45:49 +0000 (17:45 +0000)]
Coverage mapping: emit mapping for cxx constructors that use microsoft's ABI

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

10 years agoIncrease the size of ToolChain::FilePaths
Hans Wennborg [Mon, 11 Aug 2014 16:15:57 +0000 (16:15 +0000)]
Increase the size of ToolChain::FilePaths

In a Clang bootstrap build, the size was always at least 9.

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

10 years agoIncrease SmallVector<> size in DiagnosticsEngine::setSeverityForGroup
Hans Wennborg [Mon, 11 Aug 2014 16:05:54 +0000 (16:05 +0000)]
Increase SmallVector<> size in DiagnosticsEngine::setSeverityForGroup

In a Clang bootstrap, this vector always held 129 elements.

Also switch to a range-based for loop.

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

10 years agoWork around default parameter problem in the static analyzer.
Manuel Klimek [Mon, 11 Aug 2014 14:54:30 +0000 (14:54 +0000)]
Work around default parameter problem in the static analyzer.

In cases like:
  struct C { ~C(); }
  void f(C c = C());
  void t() {
    f();
  }

We currently do not add the CXXBindTemporaryExpr for the temporary (the
code mentions that as the default parameter expressions are owned by
the declaration, we'd otherwise add the same expression multiple times),
but we add the temporary destructor pointing to the CXXBindTemporaryExpr.
We need to fix that before we can re-enable the assertion.

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

10 years agoFixes bug 20587 - Add K&R break before braces style
Roman Kashitsyn [Mon, 11 Aug 2014 12:18:01 +0000 (12:18 +0000)]
Fixes bug 20587 - Add K&R break before braces style

Summary:
http://llvm.org/bugs/show_bug.cgi?id=20587

Added K&R style. It could be enabled by the following option:

```
BreakBeforeBraces: KernighanRitchie
```

This style is like `Attach`, but break *only* before function
declarations.

As I can see, no additional logic required to support this style, any
style different from other styles automagically satisfies K&R.

Reviewers: djasper

Reviewed By: djasper

Subscribers: cfe-commits, klimek

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

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

10 years agoProperly #include ASTConsumer.h instead of forward declaration.
Daniel Jasper [Mon, 11 Aug 2014 11:37:33 +0000 (11:37 +0000)]
Properly #include ASTConsumer.h instead of forward declaration.

Otherwise, this can lead to compile failures if a user/subclass of
FrontendAction doesn't #include this file, even if CreateASTConsumer
isn't used directly.

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

10 years agoSema: Handle declspecs without declarators in records properly in C mode
David Majnemer [Mon, 11 Aug 2014 07:29:54 +0000 (07:29 +0000)]
Sema: Handle declspecs without declarators in records properly in C mode

We had two bugs:
- We wouldn't properly warn when a struct/union/enum was mentioned
  inside of a record definition if no declarator was provided.  We
  should have mentioned that this declaration declares nothing.
- We didn't properly support Microsoft's extension where certain
  declspecs without declarators would act as anonymous structs/unions.
  * We completely ignored the case where such a declspec could be a
    union.
  * We didn't properly handle the case where a record was defined inside
    another record:
      struct X {
        int a;
        struct Y {
          int b;
        };
      };

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

10 years agoRevert r215331, "unique_ptrify CompilerInstance::OutputFile(s) and remove a unique_pt...
NAKAMURA Takumi [Mon, 11 Aug 2014 06:53:11 +0000 (06:53 +0000)]
Revert r215331, "unique_ptrify CompilerInstance::OutputFile(s) and remove a unique_ptr around a non-owning raw_ostream in CodeGenAction::CreateASTConsumer"

It cannot be compiled on Visual Studio 2012.

  clang\include\clang/Frontend/CompilerInstance.h(153):
error C2248: 'std::unique_ptr<_Ty>::unique_ptr' : cannot access private member declared in class 'std::unique_ptr<_Ty>'
            with
            [
                _Ty=llvm::raw_ostream
            ]
            D:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\memory(1447) : see declaration of 'std::unique_ptr<_Ty>::unique_ptr'
            with
            [
                _Ty=llvm::raw_ostream
            ]
            This diagnostic occurred in the compiler generated function 'clang::CompilerInstance::OutputFile::OutputFile(const clang::CompilerInstance::OutputFile &)'

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

10 years agounique_ptrify CompilerInstance::OutputFile(s) and remove a unique_ptr around a non...
David Blaikie [Sun, 10 Aug 2014 23:35:58 +0000 (23:35 +0000)]
unique_ptrify CompilerInstance::OutputFile(s) and remove a unique_ptr around a non-owning raw_ostream in CodeGenAction::CreateASTConsumer

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

10 years agoFollow up to r215323 - avoid llvm::make_unique in this particular case that's causing...
David Blaikie [Sun, 10 Aug 2014 21:06:17 +0000 (21:06 +0000)]
Follow up to r215323 - avoid llvm::make_unique in this particular case that's causing GCC on some buildbots some confusion.

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

10 years agoOut-of-line CompilerInstance::takeSema to avoid a header dependence from CompilerInst...
David Blaikie [Sun, 10 Aug 2014 20:12:39 +0000 (20:12 +0000)]
Out-of-line CompilerInstance::takeSema to avoid a header dependence from CompilerInstance.h on Sema.h

Hopefully this fixes the libstdc++ build on some of the buildbots after
r215321.

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

10 years agoRecommit 213307: unique_ptr-ify ownership of ASTConsumers (reverted in r213325)
David Blaikie [Sun, 10 Aug 2014 19:56:51 +0000 (19:56 +0000)]
Recommit 213307: unique_ptr-ify ownership of ASTConsumers (reverted in r213325)

After post-commit review and community discussion, this seems like a
reasonable direction to continue, making ownership semantics explicit in
the source using the type system.

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

10 years agoRemove unused CompilerInstance::takeCodeCompletionConsumer
David Blaikie [Sun, 10 Aug 2014 19:23:01 +0000 (19:23 +0000)]
Remove unused CompilerInstance::takeCodeCompletionConsumer

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

10 years agounique_ptr-ify CompilerInstance::takeSema
David Blaikie [Sun, 10 Aug 2014 19:14:48 +0000 (19:14 +0000)]
unique_ptr-ify CompilerInstance::takeSema

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

10 years agostd::unique_ptr-ify the result of ASTUnit::LoadFromASTFile
David Blaikie [Sun, 10 Aug 2014 19:08:04 +0000 (19:08 +0000)]
std::unique_ptr-ify the result of ASTUnit::LoadFromASTFile

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

10 years agounique_ptr-ify FrontendAction::takeCurrentASTUnit
David Blaikie [Sun, 10 Aug 2014 17:03:42 +0000 (17:03 +0000)]
unique_ptr-ify FrontendAction::takeCurrentASTUnit

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

10 years agounique_ptr-ify FileSystemStatCache::takeNextStatCache
David Blaikie [Sun, 10 Aug 2014 16:57:11 +0000 (16:57 +0000)]
unique_ptr-ify FileSystemStatCache::takeNextStatCache

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

10 years agounique_ptr-ify ASTReaderListener in the ASTReader
David Blaikie [Sun, 10 Aug 2014 16:54:39 +0000 (16:54 +0000)]
unique_ptr-ify ASTReaderListener in the ASTReader

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

10 years agoModuleMap.h: Prune an obsolete "\param ModuleMap" corresponding to r215268.
NAKAMURA Takumi [Sun, 10 Aug 2014 13:48:47 +0000 (13:48 +0000)]
ModuleMap.h: Prune an obsolete "\param ModuleMap" corresponding to r215268.

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

10 years agoFix PR20444 -- wrong number of vftable slots created when return adjustment thunks...
Timur Iskhodzhanov [Sun, 10 Aug 2014 11:40:51 +0000 (11:40 +0000)]
Fix PR20444 -- wrong number of vftable slots created when return adjustment thunks are needed

Reviewed at http://reviews.llvm.org/D4822

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

10 years ago[modules] When considering merging a newly-declared typedef into an imported
Richard Smith [Sun, 10 Aug 2014 02:20:15 +0000 (02:20 +0000)]
[modules] When considering merging a newly-declared typedef into an imported
one, perform the import if the types match even if the imported declaration is
hidden. Otherwise, NamedDecl::declarationReplaces will drop one of the name
lookup entries, making the typedef effectively inaccessible from one of the
modules that declared it.

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

10 years agoMake this test unsupported when there is no real 'env' from a real shell.
Yaron Keren [Sat, 9 Aug 2014 21:24:04 +0000 (21:24 +0000)]
Make this test unsupported when there is no real 'env' from a real shell.
While the test was already requiring shell-preserves-root (such as the
internal shell), it wasn't aware that the MSYS 1.0 env command knows how
to expand root by itself!

From cmd.exe try:

  env SDKROOT=/ cmd //c echo %SDKROOT%

And get:

  C:/MINGW/MSYS/1.0

To be certain we have a good 'env' program the test now requires a shell.

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

10 years agoActually add the object file, skipped by the directory add.
Joerg Sonnenberger [Sat, 9 Aug 2014 21:06:57 +0000 (21:06 +0000)]
Actually add the object file, skipped by the directory add.

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

10 years agoUse std::unique_ptr to handle transient ownership of UnwrappedLine in ScopedLineState
David Blaikie [Sat, 9 Aug 2014 20:02:07 +0000 (20:02 +0000)]
Use std::unique_ptr to handle transient ownership of UnwrappedLine in ScopedLineState

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

10 years agoUse the correct fallback directory for EABIHF targets on NetBSD/arm.
Joerg Sonnenberger [Sat, 9 Aug 2014 19:01:52 +0000 (19:01 +0000)]
Use the correct fallback directory for EABIHF targets on NetBSD/arm.
From Matt Thomas.

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

10 years agoNetBSD/aarch64 has no libgcc or libstdc++. Drop arm64 tests.
Joerg Sonnenberger [Sat, 9 Aug 2014 18:28:36 +0000 (18:28 +0000)]
NetBSD/aarch64 has no libgcc or libstdc++. Drop arm64 tests.

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

10 years agoFix six tests are failing on Windows after r215241-r215243.
Yaron Keren [Sat, 9 Aug 2014 18:13:01 +0000 (18:13 +0000)]
Fix six tests are failing on Windows after r215241-r215243.

    Clang :: Frontend/iframework.c
    Clang :: Frontend/system-header-prefix.c
    Clang :: Index/annotate-comments-objc.m
    Clang :: Index/annotate-module.m
    Clang :: Index/index-module.m
    Clang :: Index/index-pch-with-module.m
    Clang :: PCH/case-insensitive-include.c

Suprisingly the normalize_separators() was no-op when LLVM_ON_WIN32.
Its replacement native() does change path separators into \ as expected,
breaking these tests.

I had fixed the tests by #ifndef LLVM_ON_WIN32 on the native call,
to match the previous behaviour.
If this logic is not used on Windows host, it might be completely
deleted as there should not be windows path seperators on Linux hosts.

I can't test on Linux but if someone can run tests on Linux after
commenting out the line

  llvm::sys::path::native(NormalizedPath);

and the tests pass, the whole if (LangOpts.MSVCCompat) could be deleted.

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

10 years agoFix PR20479 -- missing vftable slots in case of virtual inheritance vs return adjusti...
Timur Iskhodzhanov [Sat, 9 Aug 2014 17:08:06 +0000 (17:08 +0000)]
Fix PR20479 -- missing vftable slots in case of virtual inheritance vs return adjusting thunks

Reviewed at http://reviews.llvm.org/D4829

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

10 years agoRevert "Add tests for coverage mapping generation."
Justin Bogner [Sat, 9 Aug 2014 03:55:09 +0000 (03:55 +0000)]
Revert "Add tests for coverage mapping generation."

I reverted one of the added tests from r215261 in r215274, since it
was failing on quite a few bots. It looks like this wasn't sufficient,
as we're still getting failures on windows, like the following:

    http://bb.pgr.jp/builders/ninja-x64-msvc-RA-centos6/builds/5378

I'm reverting this entire commit so the bots aren't blocked on these
failures.

This reverts commit r215261.

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

10 years agoRevert a failing test from r215261
Justin Bogner [Sat, 9 Aug 2014 01:40:59 +0000 (01:40 +0000)]
Revert a failing test from r215261

The (new) CoverageMapping/macroparams.c test is failing on a number of
buildbots. Reverting it until Alex can investigate and fix the test.

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

10 years ago[modules] Weaken an out-of-date assertion: an #undef can have no location if we
Richard Smith [Sat, 9 Aug 2014 01:24:07 +0000 (01:24 +0000)]
[modules] Weaken an out-of-date assertion: an #undef can have no location if we
imported it from a module when performing finalization before writing out
an AST file.

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

10 years agoRefactor the module map file used for uniquing a module name out of
Ben Langmuir [Sat, 9 Aug 2014 00:57:23 +0000 (00:57 +0000)]
Refactor the module map file used for uniquing a module name out of

class Module. It's almost always going to be the same as
getContainingModule() for top-level modules, so just add a map to cover
the remaining cases.  This lets us do less bookkeeping to keep the
ModuleMap fields up to date.

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

10 years agoRemove some transient raw pointer ownership in ClangAttrEmitter::createArgument
David Blaikie [Fri, 8 Aug 2014 23:59:38 +0000 (23:59 +0000)]
Remove some transient raw pointer ownership in ClangAttrEmitter::createArgument

This function might be a bit easier if it were split in two with a lot
of early returns - and that setOptional bit in the outer function, but
anyway.

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

10 years agoAdd tests for coverage mapping generation.
Alex Lorenz [Fri, 8 Aug 2014 23:49:58 +0000 (23:49 +0000)]
Add tests for coverage mapping generation.

This patch adds the tests for the coverage mapping generation.
Most of the tests check the mapping regions produced by
the generator, and one checks the llvm IR.

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

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

10 years agoAdd predefined macros to identify x86_64h architectures.
Bob Wilson [Fri, 8 Aug 2014 23:46:28 +0000 (23:46 +0000)]
Add predefined macros to identify x86_64h architectures.

Patch by Jim Grosbach.

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

10 years agoPredefine IB_DESIGNABLE and IBInspectable macros. <rdar://problem/17441860>
Bob Wilson [Fri, 8 Aug 2014 23:46:25 +0000 (23:46 +0000)]
Predefine IB_DESIGNABLE and IBInspectable macros. <rdar://problem/17441860>

These macros are used as markers for Interface Builder and need to be defined
to empty strings since they have no impact on the code.

Patch by Ted Kremenek.

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

10 years agoAdd a cc1 "dump-coverage-mapping" for testing coverage mapping.
Alex Lorenz [Fri, 8 Aug 2014 23:41:24 +0000 (23:41 +0000)]
Add a cc1 "dump-coverage-mapping" for testing coverage mapping.

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

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

10 years agoSimplify ownership of ExplodedGraph in the CoreEngine by removing unique_ptr indirection.
David Blaikie [Fri, 8 Aug 2014 23:36:37 +0000 (23:36 +0000)]
Simplify ownership of ExplodedGraph in the CoreEngine by removing unique_ptr indirection.

Summary: I was going to fix the use of raw pointer ownership in "takeGraph" when I realized that function was unused and the whole ExplodedGraph could just be owned by value without the std::unique_ptr indirection at all.

Reviewers: jordan_rose

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

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

10 years agoAdd -link-cxx-sanitizer driver flag.
Alexey Samsonov [Fri, 8 Aug 2014 22:47:17 +0000 (22:47 +0000)]
Add -link-cxx-sanitizer driver flag.

Summary:
This flag can be used to force linking of CXX-specific parts
of sanitizer runtimes into the final executable. It gives more precise
control than --driver-mode=g++ and comes handy when user links several
object files with sanitized C++ code into an executable, but wants
to provide libstdc++ himself, instead of relying on Clang dirver's
behavior.

Test Plan: clang regression test suite

Reviewers: chandlerc, rsmith

Reviewed By: rsmith

Subscribers: cfe-commits

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

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

10 years agoExtend tautological pointer compare and pointer to bool conversion warnings to
Richard Trieu [Fri, 8 Aug 2014 22:41:43 +0000 (22:41 +0000)]
Extend tautological pointer compare and pointer to bool conversion warnings to
macro arguments.

Previously, these warnings skipped any code in a macro expansion.  Preform an
additional check and warn when the expression and context locations are both
in the macro argument.

The most obvious case not caught is passing a pointer directly to a macro,
i.e 'assert(&array)' but 'assert(&array && "valid array")' is caught.  This is
because macro arguments are not typed and the conversion happens inside the
macro.

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

10 years agoObjective-C [qoi]. Issue warning and fixit if property-dot syntax
Fariborz Jahanian [Fri, 8 Aug 2014 22:33:24 +0000 (22:33 +0000)]
Objective-C [qoi]. Issue warning and fixit if property-dot syntax
use mis-cased property name (which is currently accepted silently
due to the way property setters are named). rdar://17911746

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

10 years agoSure-up MemoryBuffer ownership in JSONCompilationDatabase's ctor.
David Blaikie [Fri, 8 Aug 2014 22:01:06 +0000 (22:01 +0000)]
Sure-up MemoryBuffer ownership in JSONCompilationDatabase's ctor.

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

10 years agoChange __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ for versions > 10.9.
Bob Wilson [Fri, 8 Aug 2014 21:45:53 +0000 (21:45 +0000)]
Change __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ for versions > 10.9.

The previous encoding only allowed a single digit for the minor version
number. This changes it to use 2 digits for both the minor version and the
revision number.

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

10 years agoUse llvm::sys::path::native instead of llvm::sys::fs::normalize_separators.
Rafael Espindola [Fri, 8 Aug 2014 21:31:04 +0000 (21:31 +0000)]
Use llvm::sys::path::native instead of llvm::sys::fs::normalize_separators.

llvm::sys::path::native has a superset of the functionality and this was the
only use of llvm::sys::fs::normalize_separators.

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

10 years agoPartially revert r215204 - [mips] Add -mabicalls/-mno-abicalls to the driver
Daniel Sanders [Fri, 8 Aug 2014 18:39:01 +0000 (18:39 +0000)]
Partially revert r215204 - [mips] Add -mabicalls/-mno-abicalls to the driver

It wasn't actually a bug that -mabicalls/-mno-abicalls wasn't being passed to
GAS. The only reason we pass it to the integrated assembler is because it shares
the same framework with CodeGen.

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

10 years agoObjective-C. Minor refactoring of my previous patch.
Fariborz Jahanian [Fri, 8 Aug 2014 18:29:52 +0000 (18:29 +0000)]
Objective-C. Minor refactoring of my previous patch.
rdar://17554063

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

10 years agoObjective-C ARC. Use of non-retain/autorelease API
Fariborz Jahanian [Fri, 8 Aug 2014 17:31:14 +0000 (17:31 +0000)]
Objective-C ARC. Use of non-retain/autorelease API
for building Objective-C array literals in ARC
mode. rdar://17554063

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

10 years agoFix a bug when scan-build is used in a cross-compilation environment with
Sylvestre Ledru [Fri, 8 Aug 2014 17:15:13 +0000 (17:15 +0000)]
Fix a bug when scan-build is used in a cross-compilation environment with
the --use-cc option.

Instead, we will search in the PATH
For example:
 scan-build --use-cc=arm-none-eabi-gcc -o out make -e

Initially reported as a Debian Bug:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=748777

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

10 years agoDebugInfo: Blocks: Do not depend on LLVM argument numbering when choosing the debug...
David Blaikie [Fri, 8 Aug 2014 17:10:14 +0000 (17:10 +0000)]
DebugInfo: Blocks: Do not depend on LLVM argument numbering when choosing the debug info argument numbering.

Due to the possible presence of return-by-out parameters, using the LLVM
argument number count when numbering debug info arguments can end up
off-by-one. This could produce two arguments with the same number, which
would in turn cause LLVM to emit only one of those arguments (whichever
it found last) or assert (r215157).

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

10 years agoCompilationDatabase: Sure-up ownership of compilation databases using std::unique_ptr
David Blaikie [Fri, 8 Aug 2014 16:06:15 +0000 (16:06 +0000)]
CompilationDatabase: Sure-up ownership of compilation databases using std::unique_ptr

Diving into the memory leaks fixed by r213851 there was one case of a
memory leak of a CompilationDatabase due to not properly taking
ownership of the result of "CompilationDatabase::autoDetectFromSource".
Given that both implementations and callers have been using unique_ptr
to own CompilationDatabase objects - make this explicit in the API to
reduce the risk of further leaks.

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