]> granicus.if.org Git - clang/log
clang
9 years agoWhen loading a module with no local entities, still bump the size of the
Ben Langmuir [Sat, 16 Aug 2014 04:54:18 +0000 (04:54 +0000)]
When loading a module with no local entities, still bump the size of the

tables that correspond to ContinuousRangeMaps, since the keys to those
maps need to be unique, or we may map to the wrong offset.

This fixes a crash + malformed AST file seen when loading some modules
that import Cocoa on Darwin, which is a module with no contents except
imports of other modules. Unfortunately I have not been able to find a
reduced test case that reproduces this problem.

Also add an assert that we aren't mapping one key to multiple values
in CRM.  We ought to be able to say there are no duplicate keys at all,
but there are a bunch of 0 -> 0 mappings that are showing up, probably
coming from the source location table.

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

9 years agoClarify.
Nick Lewycky [Sat, 16 Aug 2014 02:14:37 +0000 (02:14 +0000)]
Clarify.

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

9 years agoTry indenting to put all the text inside the block.
Nick Lewycky [Sat, 16 Aug 2014 02:11:54 +0000 (02:11 +0000)]
Try indenting to put all the text inside the block.

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

9 years agoDocument what's experimental about __attribute__((enable_if)). PR20392
Nick Lewycky [Sat, 16 Aug 2014 02:09:42 +0000 (02:09 +0000)]
Document what's experimental about __attribute__((enable_if)). PR20392

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

9 years ago[libclang] Introduce clang_File_isEqual for comparing CXFile handles.
Argyrios Kyrtzidis [Sat, 16 Aug 2014 00:26:19 +0000 (00:26 +0000)]
[libclang] Introduce clang_File_isEqual for comparing CXFile handles.

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

9 years agoRevert "Update for LLVM change (StringSaver)"
Sean Silva [Fri, 15 Aug 2014 23:39:12 +0000 (23:39 +0000)]
Revert "Update for LLVM change (StringSaver)"

This reverts commit r215785 / 170ebf4f19459ae51a9561d0e65c87ee4c9b2c97.

LLD has some StringSavers that need to be updated. One of which takes a
lock and I need to investigate that more closely.

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

9 years agoMake sure that vtables referenced from delay-parsed templates get referenced.
Nico Weber [Fri, 15 Aug 2014 23:21:41 +0000 (23:21 +0000)]
Make sure that vtables referenced from delay-parsed templates get referenced.

This fixes PR20671, see the bug for details. In short, ActOnTranslationUnit()
calls DefineUsedVTables() and only then PerformPendingInstantiations(). But
PerformPendingInstantiations() is what does delayed template parsing, so
vtables only references from late-parsed templates weren't marked used.

As a fix, move the SavePendingInstantiationsAndVTableUsesRAII in
PerformPendingInstantiations() up above the delayed template parsing code.
That way, vtables referenced from templates end up in the RAII object, and the
call to DefineUsedVTables() in PerformPendingInstantiations() marks them used.

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

9 years agoUpdate for LLVM change (StringSaver)
Sean Silva [Fri, 15 Aug 2014 23:18:49 +0000 (23:18 +0000)]
Update for LLVM change (StringSaver)

There is more cleanup to be done here. Once
llvm::sys::Process::GetArgumentVector is switched over to StringSaver,
we can simplify this code a fair amount.

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

9 years agoAdd a RAII class for saving and restoring instantiations and uses. No behavior change.
Nico Weber [Fri, 15 Aug 2014 22:29:14 +0000 (22:29 +0000)]
Add a RAII class for saving and restoring instantiations and uses. No behavior change.

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

9 years agoWrap to 80 columns, no behavior change.
Nico Weber [Fri, 15 Aug 2014 22:15:00 +0000 (22:15 +0000)]
Wrap to 80 columns, no behavior change.

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

9 years agoRename as suggested by dblaikie
Sean Silva [Fri, 15 Aug 2014 21:40:51 +0000 (21:40 +0000)]
Rename as suggested by dblaikie

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

9 years agoArrayRef'ize
Sean Silva [Fri, 15 Aug 2014 21:38:36 +0000 (21:38 +0000)]
ArrayRef'ize

I've shied away from ArrayRef'izing CompilerInvocation::CreateFromArgs
in this commit because that is a less localized change.

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

9 years agoDebugInfo: While loop backedge should be attribute to the start of the while statement.
David Blaikie [Fri, 15 Aug 2014 21:11:25 +0000 (21:11 +0000)]
DebugInfo: While loop backedge should be attribute to the start of the while statement.

A little test case simplification - this could be simplified further,
though there are certainly interesting connections to the if/else
construct so I'm hesitant to remove that entirely though it does appear
somewhat unrelated.

(similar fix to r215766, related to PR19864)

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

9 years agoRename this function to better reflect its purpose
Sean Silva [Fri, 15 Aug 2014 20:59:03 +0000 (20:59 +0000)]
Rename this function to better reflect its purpose

Thanks to dblaikie for the impetus to look for a better name.

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

9 years agoDebugInfo: Fix PR19864 better - attribute the jump at the end of a range-for loop...
David Blaikie [Fri, 15 Aug 2014 20:50:45 +0000 (20:50 +0000)]
DebugInfo: Fix PR19864 better - attribute the jump at the end of a range-for loop, to the start of the loop.

This avoids debuggers stepping to strange places (like the last
statement in the loop body, or the first statement in the if).

This is not the whole answer, though - similar bugs no doubt exist in
other loops (patches to follow) and attributing exception handling code
to the correct line is also tricky (based on the previous fix to
PR19864, exception handling is still erroneously attributed to the 'if'
line).

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

9 years agoTypo fix in comments: definintion -> definition
James Dennett [Fri, 15 Aug 2014 20:04:40 +0000 (20:04 +0000)]
Typo fix in comments: definintion -> definition

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

9 years ago[cleanup] Rename this function to better reflect its purpose. NFC.
Sean Silva [Fri, 15 Aug 2014 19:23:53 +0000 (19:23 +0000)]
[cleanup] Rename this function to better reflect its purpose. NFC.

This also suggests some refactoring to simplify this code. Basically, a
ton of complexity in this argument handling code comes from the need to
save const char *'s in stable storage for pushing onto argv.
It seems like llvm::cl::StringSaver can be improved to cover all the
needs here.

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

9 years ago[cleanup] Range-for'ify this loop. NFC.
Sean Silva [Fri, 15 Aug 2014 19:23:50 +0000 (19:23 +0000)]
[cleanup] Range-for'ify this loop. NFC.

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

9 years ago[cleanup] Factor out handling CC1 tools. NFC.
Sean Silva [Fri, 15 Aug 2014 19:23:47 +0000 (19:23 +0000)]
[cleanup] Factor out handling CC1 tools. NFC.

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

9 years agoAdd missing matchers to the dynamic registry.
Samuel Benzaquen [Fri, 15 Aug 2014 19:13:27 +0000 (19:13 +0000)]
Add missing matchers to the dynamic registry.

Reviewers: klimek

Subscribers: klimek, cfe-commits

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

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

9 years ago[cleanup] Factor out setting the driver's install dir. NFC.
Sean Silva [Fri, 15 Aug 2014 18:58:15 +0000 (18:58 +0000)]
[cleanup] Factor out setting the driver's install dir. NFC.

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

9 years ago[cleanup] Factor out initializing the DianosticOptions. NFC.
Sean Silva [Fri, 15 Aug 2014 18:58:12 +0000 (18:58 +0000)]
[cleanup] Factor out initializing the DianosticOptions. NFC.

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

9 years ago[cleanup] Factor out adjusting "cl.exe" to "clang-cl.exe". NFC.
Sean Silva [Fri, 15 Aug 2014 18:58:09 +0000 (18:58 +0000)]
[cleanup] Factor out adjusting "cl.exe" to "clang-cl.exe". NFC.

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

9 years ago[cleanup] Factor out some checks. NFC.
Sean Silva [Fri, 15 Aug 2014 18:50:00 +0000 (18:50 +0000)]
[cleanup] Factor out some checks. NFC.

The core logic in main() is actually pretty simple, but there's lots of
stuff that has been added over time which obscures the flow of the code.
In upcoming patches, I'll be pulling more stuff out of the main
codepath.

I'm open to naming suggestions for these helper functions.

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

9 years agoMS ABI: Virtual member pointer thunks are not unnamed_addr
Reid Kleckner [Fri, 15 Aug 2014 18:12:40 +0000 (18:12 +0000)]
MS ABI: Virtual member pointer thunks are not unnamed_addr

They can be compared for identity.

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

9 years agoR600: Add ldexp intrinsic
Matt Arsenault [Fri, 15 Aug 2014 17:44:32 +0000 (17:44 +0000)]
R600: Add ldexp intrinsic

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

9 years agoObjective-C. Do not warn if user is using property-dox syntax to name a
Fariborz Jahanian [Fri, 15 Aug 2014 17:39:00 +0000 (17:39 +0000)]
Objective-C. Do not warn if user is using property-dox syntax to name a
user provided setter name (as declared in @property attribute declaration).
rdar://18022762

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

9 years agoMove some code into a helper function. NFC.
Rafael Espindola [Fri, 15 Aug 2014 17:14:35 +0000 (17:14 +0000)]
Move some code into a helper function. NFC.

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

9 years agoUse a valid arch name in this triple.
Rafael Espindola [Fri, 15 Aug 2014 16:55:25 +0000 (16:55 +0000)]
Use a valid arch name in this triple.

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

9 years agoAdd isDeleted() matcher for FunctionDecl nodes.
Samuel Benzaquen [Fri, 15 Aug 2014 14:20:59 +0000 (14:20 +0000)]
Add isDeleted() matcher for FunctionDecl nodes.

Reviewers: klimek

Subscribers: klimek, cfe-commits

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

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

9 years agoConst-correctness, return-after-else, and formatting updates. NFC.
Aaron Ballman [Fri, 15 Aug 2014 12:38:17 +0000 (12:38 +0000)]
Const-correctness, return-after-else, and formatting updates. NFC.

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

9 years agoThere are no overloads of this virtual function, nor are there any callers of it...
Aaron Ballman [Fri, 15 Aug 2014 12:34:08 +0000 (12:34 +0000)]
There are no overloads of this virtual function, nor are there any callers of it. NFC.

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

9 years agoAdding const-qualifiers to auto declarations. NFC.
Aaron Ballman [Fri, 15 Aug 2014 12:29:39 +0000 (12:29 +0000)]
Adding const-qualifiers to auto declarations. NFC.

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

9 years agoarm_acle.h: Small cleanup
Yi Kong [Fri, 15 Aug 2014 08:53:22 +0000 (08:53 +0000)]
arm_acle.h: Small cleanup

Since __SIZEOF_LONG_LONG__ is always defined as 8 on ARM targets,
there's no point in checking this. NFC.

Patch by Moritz Roth.

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

9 years agoclang-format: Prefer breaking after return type over template param
Daniel Jasper [Fri, 15 Aug 2014 05:00:39 +0000 (05:00 +0000)]
clang-format: Prefer breaking after return type over template param

Before:
  typename aaaaaaaaaa<aaaaaa>::aaaaaaaaaaa aaaaaaaaaa<
      aaaaaa>::aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa(bool *aaaaaaaaaaaaaaaaaa,
                                                   bool *aa) {}

After:
  typename aaaaaaaaaa<aaaaaa>::aaaaaaaaaaa
  aaaaaaaaaa<aaaaaa>::aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa(
      bool *aaaaaaaaaaaaaaaaaa, bool *aa) {}

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

9 years agoclang-format: [proto] Understand text-format nesting without :
Daniel Jasper [Fri, 15 Aug 2014 05:00:35 +0000 (05:00 +0000)]
clang-format: [proto] Understand text-format nesting without :

Before:
  option (MyProto.options) = {
    field_c : "OK" msg_field{field_d : 123}
  };

After:
  option (MyProto.options) = {
    field_c : "OK"
    msg_field{field_d : 123}
  };

(Note that the colon after "msg_field" is optional).

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

9 years agoMake sure CallExpr::getLocStart doesn't segfault
Keno Fischer [Fri, 15 Aug 2014 01:39:12 +0000 (01:39 +0000)]
Make sure CallExpr::getLocStart doesn't segfault

Summary:
When the CallExpr passed to Sema::ConvertArgumentsForCall has all default parameters, and the number of actual arguments passed is zero, this function will segfault in the call to Call->getLocStart() if the Callee has an invalid getLocStart(), the reason being that since ConvertArgumentsForCall has set the correct number of arguments, but has not filled them in yet, getLocStart() will try to access the first (not yet existent) argument and thus segfaults.

This fixes that by making getLocStart return an invalid source location if the queried argument is NULL rather than segfaulting.

Reviewers: rnk

Reviewed By: rnk

Subscribers: cfe-commits

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

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

10 years agoLimit our MSVC compat hack for nested names from dependent bases
Reid Kleckner [Thu, 14 Aug 2014 23:34:52 +0000 (23:34 +0000)]
Limit our MSVC compat hack for nested names from dependent bases

Previously, any undeclared unqualified id starting a nested name
specifier in a dependent context would have its lookup retried during
template instantiation.  Now we limit that retry hack to methods of a
class with dependent bases.  Free function templates in particular are
no longer affected by this hack.

Also, diagnose this as a Microsoft extension. This has the downside that
template authors may see this warning *and* an error during
instantiation time about this identifier. Fixing that will probably
require formalizing some kind of "delayed" identifier, instead of our
ad-hoc solutions of forming dependent AST nodes when lookup fails.

Based on a patch by Kim Gräsman!

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

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

10 years agoThread Safety Analysis: Move -Wthread-safety-negative out of the
DeLesley Hutchins [Thu, 14 Aug 2014 21:54:34 +0000 (21:54 +0000)]
Thread Safety Analysis:  Move -Wthread-safety-negative out of the
-Wthread-safety umbrella flag, pending updates to documentation.  The flag
works, but is likely to be confusing to existing users of -Wthread-safety.

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

10 years agoUse a switch statement for IsIntegratedAssemblerDefault().
Brad Smith [Thu, 14 Aug 2014 21:43:07 +0000 (21:43 +0000)]
Use a switch statement for IsIntegratedAssemblerDefault().

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

10 years agoThread safety analysis: add -Wthread-safety-verbose flag, which adds additional notes...
DeLesley Hutchins [Thu, 14 Aug 2014 21:40:15 +0000 (21:40 +0000)]
Thread safety analysis: add -Wthread-safety-verbose flag, which adds additional notes that are helpful when compiling statistics on thread safety warnings.

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

10 years ago[modules] Turn off a broken optimization: we need to pick up implicit special
Richard Smith [Thu, 14 Aug 2014 20:30:52 +0000 (20:30 +0000)]
[modules] Turn off a broken optimization: we need to pick up implicit special
members from all redefinitions of a class that have them, in case the special
member is defined in one module but only declared in another.

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

10 years agoDon't Lex past EOF when lexing _Pragma
Reid Kleckner [Thu, 14 Aug 2014 19:47:06 +0000 (19:47 +0000)]
Don't Lex past EOF when lexing _Pragma

Fixes PR20662.

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

10 years agoThread Safety Analysis: fix to improve handling of references to guarded
DeLesley Hutchins [Thu, 14 Aug 2014 19:17:06 +0000 (19:17 +0000)]
Thread Safety Analysis: fix to improve handling of references to guarded
data members and range based for loops.

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

10 years agoUse the big endian emulations for NetBSD/arm in EB mode.
Joerg Sonnenberger [Thu, 14 Aug 2014 19:12:41 +0000 (19:12 +0000)]
Use the big endian emulations for NetBSD/arm in EB mode.

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

10 years ago[AVX512] Add FMA intrinsics
Adam Nemet [Thu, 14 Aug 2014 17:17:57 +0000 (17:17 +0000)]
[AVX512] Add FMA intrinsics

Part of <rdar://problem/17688758>

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

10 years agoUse the proper post-order traversal in LiveVariables analysis,
Artyom Skrobov [Thu, 14 Aug 2014 16:04:47 +0000 (16:04 +0000)]
Use the proper post-order traversal in LiveVariables analysis,
to recover the performance after r214064.

Also sorts out the naming for PostOrderCFGView, ReversePostOrderCFGView,
BackwardDataflowWorklist and ForwardDataflowWorklist, to match the accepted
terminology.

Also unifies BackwardDataflowWorklist and ForwardDataflowWorklist to share
the "worklist for prioritization, post-order traversal for fallback" logic,
and to avoid repetitive sorting.

Also cleans up comments in the affected area.

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

10 years agoRevert "CodeGen: When bitfields fall on natural boundaries, split them up"
Justin Bogner [Thu, 14 Aug 2014 15:44:29 +0000 (15:44 +0000)]
Revert "CodeGen: When bitfields fall on natural boundaries, split them up"

It fits better with LLVM's memory model to try to do this in the
backend. Specifically, narrowing wide loads in the backends should be
relatively straightforward and is generally valuable, whereas widening
loads tends to be very constrained.

Discussion here:

  http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20140811/112581.html

This reverts commit r215614.

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

10 years agoDelete support for AuroraUX.
Rafael Espindola [Thu, 14 Aug 2014 15:14:51 +0000 (15:14 +0000)]
Delete support for AuroraUX.

auroraux.org is not resolving.

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

10 years agoSplit a large unit-test, so that it doesn't exceed stack frame size in certain test...
Alexander Kornienko [Thu, 14 Aug 2014 13:07:35 +0000 (13:07 +0000)]
Split a large unit-test, so that it doesn't exceed stack frame size in certain test environments

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

10 years agoclang-format: Fix AlwaysBreakAfterDefinitionReturnType in Stroutrup style
Daniel Jasper [Thu, 14 Aug 2014 11:36:03 +0000 (11:36 +0000)]
clang-format: Fix AlwaysBreakAfterDefinitionReturnType in Stroutrup style

Before:
  template <class T>
  T *f(T &c)  // Problem here: no line break before f
  {
    return NULL;
  }

After:
  template <class T>
  T *
  f(T &c)
  {
    return NULL;
  }

Patch by Marek Kurdej, thank you!

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

10 years agoclang-format: Support chained dereferenced assignments.
Daniel Jasper [Thu, 14 Aug 2014 10:53:19 +0000 (10:53 +0000)]
clang-format: Support chained dereferenced assignments.

Before:
  x = * a(x) = *a(y);

After:
  x = *a(x) = *a(y);

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

10 years agoclang-format: Support breaking arguments of function type typedefs.
Daniel Jasper [Thu, 14 Aug 2014 10:52:56 +0000 (10:52 +0000)]
clang-format: Support breaking arguments of function type typedefs.

Before:
  typedef size_t (*aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa)(
      const aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa *aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa);

After:
  typedef size_t (*aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa)(
      const aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa *
          aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa);

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

10 years agoFix a crash when compiling blocks in OpenCL with multiple
Pekka Jaaskelainen [Thu, 14 Aug 2014 09:37:50 +0000 (09:37 +0000)]
Fix a crash when compiling blocks in OpenCL with multiple
address spaces.

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

10 years agoParse: Don't attempt to act on #pragma init_seg when not targeting MSVC
David Majnemer [Thu, 14 Aug 2014 06:35:08 +0000 (06:35 +0000)]
Parse: Don't attempt to act on #pragma init_seg when not targeting MSVC

It doesn't really make sense to try and do stuff with #pragma init_seg
when targeting non-Microsoft platforms; notions like library vs user
initializers don't exist for other targets.

This fixes PR20639.

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

10 years ago[modules] Factor .td-generated diagnostics stuff out into its own module; this
Richard Smith [Thu, 14 Aug 2014 04:11:33 +0000 (04:11 +0000)]
[modules] Factor .td-generated diagnostics stuff out into its own module; this
avoids users of AllDiagnostics.h from needing to pregenerate *all* generated
headers. Hopefully this will make my modules buildbot happier...

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

10 years ago[modules] Don't assert if the same imported class template specialization
Richard Smith [Thu, 14 Aug 2014 03:30:27 +0000 (03:30 +0000)]
[modules] Don't assert if the same imported class template specialization
declaration has its definition instantiated in two sibling modules and they use
a partial specialization.

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

10 years agoCodeGen: When bitfields fall on natural boundaries, split them up
Justin Bogner [Thu, 14 Aug 2014 02:42:10 +0000 (02:42 +0000)]
CodeGen: When bitfields fall on natural boundaries, split them up

Currently when laying out bitfields that don't need any padding, we
represent them as a wide enough int to contain all of the bits. This
can be hard on the backend since we'll do things like represent stores
to a few bits as loading an i144, masking it with a large constant,
and storing it back.

This turns up in less pathological cases where we load and mask 64 bit
word on a 32 bit platform when we actually only need to access 32 bits.
This leads to bad code being generated in most of our 32 bit backends.

In practice, there are often natural breaks in bitfields, and it's a
fairly simple and effective heuristic to split these fields into legal
integer sized chunks when it will be equivalent (ie, it won't force us
to add any extra padding).

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

10 years ago[modules] When we merge together multiple class template specialization
Richard Smith [Thu, 14 Aug 2014 02:21:01 +0000 (02:21 +0000)]
[modules] When we merge together multiple class template specialization
definitions (because some other declaration declares a special member that
isn't present in the canonical definition), we need to search *all* of them; we
can't just stop when we find the requested name in any of the definitions,
because that can fail to find things (and in particular, it can fail to find
the member of the canonical declaration and return a bogus ODR failure).

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

10 years agoSema: Permit nullptr template args in MSVC compat mode
David Majnemer [Thu, 14 Aug 2014 00:49:23 +0000 (00:49 +0000)]
Sema: Permit nullptr template args in MSVC compat mode

This fixes a regression I caused back in r211766.

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

10 years agoclang/test/Modules/cxx-irgen.cpp: Let it tolerant of x86_thiscallcc.
NAKAMURA Takumi [Thu, 14 Aug 2014 00:23:30 +0000 (00:23 +0000)]
clang/test/Modules/cxx-irgen.cpp: Let it tolerant of x86_thiscallcc.

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

10 years agoSimplify some CodeGenTypes::arrangeXXX functions. No functionality change
Alexey Samsonov [Wed, 13 Aug 2014 23:55:54 +0000 (23:55 +0000)]
Simplify some CodeGenTypes::arrangeXXX functions. No functionality change

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

10 years agoObjective-C. Handle case of multiple class methods
Fariborz Jahanian [Wed, 13 Aug 2014 23:38:04 +0000 (23:38 +0000)]
Objective-C. Handle case of multiple class methods
found in global pool as well. rdar://16808765

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

10 years agoWhitespace fix.
Rafael Espindola [Wed, 13 Aug 2014 23:29:23 +0000 (23:29 +0000)]
Whitespace fix.

Sorry about the noise.

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

10 years agoARM: Add mappings for ACLE prefetch intrinsics
Yi Kong [Wed, 13 Aug 2014 23:20:15 +0000 (23:20 +0000)]
ARM: Add mappings for ACLE prefetch intrinsics

Implement __pld, __pldx, __pli and __plix builtin intrinsics as specified in
ARM ACLE 2.0.

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

10 years agoclang/test/Index/index-module.m: Tweak expressions to meet dos path on win32.
NAKAMURA Takumi [Wed, 13 Aug 2014 22:14:49 +0000 (22:14 +0000)]
clang/test/Index/index-module.m: Tweak expressions to meet dos path on win32.

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

10 years agotest/CodeGen: Don't rely on a value's number in check lines
Justin Bogner [Wed, 13 Aug 2014 21:54:06 +0000 (21:54 +0000)]
test/CodeGen: Don't rely on a value's number in check lines

The tests in r215568 hard code a value as %0 in their checks. This
isn't correct in asserts builds.

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

10 years agoObjective-C. Minor refactoring of my last patch.
Fariborz Jahanian [Wed, 13 Aug 2014 21:24:14 +0000 (21:24 +0000)]
Objective-C. Minor refactoring of my last patch.
// rdar://16808765

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

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