]> granicus.if.org Git - clang/log
clang
10 years agoPR19623: Support typedefs (and alias templates) of void.
David Blaikie [Thu, 1 May 2014 18:25:19 +0000 (18:25 +0000)]
PR19623: Support typedefs (and alias templates) of void.

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

10 years agoFix debug-info-alias test to add CHECK to some lines that were missing it.
David Blaikie [Thu, 1 May 2014 18:13:24 +0000 (18:13 +0000)]
Fix debug-info-alias test to add CHECK to some lines that were missing it.

To simplify source location offsets, this test uses line directives to
force particular lines of interest to have known line numbers so that
adjustments before/after those points don't require updates to the CHECK
lines.

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

10 years agoAST: Mangle reference temporaries reliably
David Majnemer [Thu, 1 May 2014 17:50:17 +0000 (17:50 +0000)]
AST: Mangle reference temporaries reliably

Summary:
Previously, we would generate a single name for all reference
temporaries and allow LLVM to rename them for us.  Instead, number the
reference temporaries as we build them in Sema.

Reviewers: rsmith

Subscribers: cfe-commits

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

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

10 years agoFix typo (first commit to test commit access).
Dinesh Dwivedi [Thu, 1 May 2014 17:19:34 +0000 (17:19 +0000)]
Fix typo (first commit to test commit access).

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

10 years agoFix declspec-thread.cpp test with a triple
Reid Kleckner [Thu, 1 May 2014 17:12:20 +0000 (17:12 +0000)]
Fix declspec-thread.cpp test with a triple

Not all triples support it.

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

10 years agoMSVCCompat: Don't produce an invalid AST when accepting void pseudo-dtors
Reid Kleckner [Thu, 1 May 2014 16:50:23 +0000 (16:50 +0000)]
MSVCCompat: Don't produce an invalid AST when accepting void pseudo-dtors

We accept 'void *p; p->~void();' for MSVC compatibility since r148682.
However, we were returning ExprError, rather than producing an AST,
despite only diagnosing it with a warning.  CodeGen noticed that the
template function specialization had an invalid AST, and therefore
didn't generate code for it.  This change makes us produce an AST with a
void pseudo-dtor call.

Part of PR18256.

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

10 years ago[libclang] Add attribute support for 'pure', 'const' and 'noduplicate'.
Joey Gouly [Thu, 1 May 2014 15:41:58 +0000 (15:41 +0000)]
[libclang] Add attribute support for 'pure', 'const' and 'noduplicate'.

This bumps CINDEX_VERSION_MINOR up (to 26).

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

10 years agoFixing a FIXME -- no longer using std::memcpy, since that would fail for non-trivial...
Aaron Ballman [Thu, 1 May 2014 15:21:03 +0000 (15:21 +0000)]
Fixing a FIXME -- no longer using std::memcpy, since that would fail for non-trivial types. Replaced with std::copy. No functional changes intended since all uses of this functionality either use pointers or integers.

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

10 years agoSupport 'remark' in VerifyDiagnosticConsumer
Tobias Grosser [Thu, 1 May 2014 14:06:01 +0000 (14:06 +0000)]
Support 'remark' in VerifyDiagnosticConsumer

After Diego added support for -Rpass=inliner we have now in-tree remarks which
we can use to properly test this feature.

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

10 years agodo not use "1" for line marker for the main file
Lubos Lunak [Thu, 1 May 2014 13:50:44 +0000 (13:50 +0000)]
do not use "1" for line marker for the main file

"1" means entering a new file (from a different one), but the main
file is not included from anything (and this would e.g. confuse -Wunused-macros
to not report unused macros in the main file, see pr15610, or also see pr18948).
The line marker is still useful e.g. if the resulting file is renamed or used
via a pipe.

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

10 years agorevert r207756
Lubos Lunak [Thu, 1 May 2014 13:37:55 +0000 (13:37 +0000)]
revert r207756

There's nothing wrong with the change itself, but
test/Frontend/rewrite-includes-messages.c fails without another
not-yet-committed fix.

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

10 years agodo not warn about unknown pragmas in modes that do not handle them (pr9537)
Lubos Lunak [Thu, 1 May 2014 12:54:03 +0000 (12:54 +0000)]
do not warn about unknown pragmas in modes that do not handle them (pr9537)

And refactor to have just one place in code that sets up the empty
pragma handlers.

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

10 years agowrite a line marker right before adding included file
Lubos Lunak [Thu, 1 May 2014 12:45:08 +0000 (12:45 +0000)]
write a line marker right before adding included file

Enclosing the original #include directive inside #if 0 adds lines,
so warning/errors messages would have the line number off in
"In file included from <file>:<line>:", so add line marker to fix this.

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

10 years agoAvoid a potential race between stat() and open() of ASTFile
Ben Langmuir [Thu, 1 May 2014 03:33:36 +0000 (03:33 +0000)]
Avoid a potential race between stat() and open() of ASTFile

We need to open an ASTFile while checking its expected size and
modification time, or another clang instance can modify the file between
the stat() and the open().

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

10 years agoAdd support for __declspec(thread) under -fms-extensions
Reid Kleckner [Thu, 1 May 2014 03:16:47 +0000 (03:16 +0000)]
Add support for __declspec(thread) under -fms-extensions

Reviewers: rsmith

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

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

10 years agoMS ABI x64: Don't destroy arguments twice on x64
Reid Kleckner [Thu, 1 May 2014 03:07:18 +0000 (03:07 +0000)]
MS ABI x64: Don't destroy arguments twice on x64

We were destroying them in the callee, and then again in the caller.  We
should use an EH-only cleanup and disable it at the point of the call
for win64, even though we don't use inalloca.

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

10 years agoMake typo-correction of inheriting constructors work a bit better. Limit
Richard Smith [Thu, 1 May 2014 00:35:04 +0000 (00:35 +0000)]
Make typo-correction of inheriting constructors work a bit better. Limit
correction to direct base class members, and recover properly after we apply
such a correction.

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

10 years agoComment parsing: remove HTML attribute validation
Dmitri Gribenko [Wed, 30 Apr 2014 21:54:30 +0000 (21:54 +0000)]
Comment parsing: remove HTML attribute validation

Since the community says that a blacklist is not good enough, and I don't have
enough time now to implement a proper whitelist, let's just remove the
attribute validation.

But, nevertheless, we can still communicate in the generated XML if our parser
found an issue with the HTML.  But this bit is best-effort and is specifically
called out in the schema as such.

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

10 years agoPR19601: std::remove_if does not really remove the elements.
Arnaud A. de Grandmaison [Wed, 30 Apr 2014 19:59:22 +0000 (19:59 +0000)]
PR19601: std::remove_if does not really remove the elements.

It moves them at the end of the range instead, so an extra erase is needed.

It is strange that this code works without the erase. On the other hand, removing the remove_if will make fail some tests.

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

10 years agoFix typos in carries_dependency docs
Reid Kleckner [Wed, 30 Apr 2014 18:50:03 +0000 (18:50 +0000)]
Fix typos in carries_dependency docs

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

10 years agoSema: Implement DR477
David Majnemer [Wed, 30 Apr 2014 18:24:01 +0000 (18:24 +0000)]
Sema: Implement DR477

Summary: Friend declarations shouldn't mention explicit or virtual.

Reviewers: rsmith

Subscribers: cfe-commits

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

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

10 years agoWhen typo-correcting a member using declaration, don't exclude member templates.
Richard Smith [Wed, 30 Apr 2014 18:15:00 +0000 (18:15 +0000)]
When typo-correcting a member using declaration, don't exclude member templates.

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

10 years agoWhen typo-correcting a member using-declaration, only consider members of base classes.
Richard Smith [Wed, 30 Apr 2014 18:03:21 +0000 (18:03 +0000)]
When typo-correcting a member using-declaration, only consider members of base classes.

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

10 years agoFix crash if typo correction corrects a member using-declaration to a
Richard Smith [Wed, 30 Apr 2014 17:40:35 +0000 (17:40 +0000)]
Fix crash if typo correction corrects a member using-declaration to a
non-member declaration. Patch by Dinesh Dwivedi!

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

10 years ago__thread: Move constant init check to CheckCompleteVariableDeclaration
Reid Kleckner [Wed, 30 Apr 2014 17:10:18 +0000 (17:10 +0000)]
__thread: Move constant init check to CheckCompleteVariableDeclaration

We were emitting dynamic initializers for __thread variables if there
was no explicit initializer, as in this test case:

struct S { S(); };
__thread S s;

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

10 years ago-Wunused-parameter: Don't fire on defaulted or deleted functions
Reid Kleckner [Wed, 30 Apr 2014 16:31:28 +0000 (16:31 +0000)]
-Wunused-parameter: Don't fire on defaulted or deleted functions

Patch by Dinesh Dwivedi!

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

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

10 years agoAndroid uses -fpic for arm64 as well.
Logan Chien [Wed, 30 Apr 2014 12:18:12 +0000 (12:18 +0000)]
Android uses -fpic for arm64 as well.

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

10 years agoAdd a test for big-endian NEON on ARM64.
James Molloy [Wed, 30 Apr 2014 12:12:45 +0000 (12:12 +0000)]
Add a test for big-endian NEON on ARM64.

The enabled test #includes <arm_neon.h>, which is sufficient to test all
the code in r207624.

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

10 years ago[ARM64] Port remaining relevant AArch64 clang tests over to ARM64
Bradley Smith [Wed, 30 Apr 2014 10:52:05 +0000 (10:52 +0000)]
[ARM64] Port remaining relevant AArch64 clang tests over to ARM64

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

10 years ago[ARM64] Add arm64_be where it was accidentally missed from a bunch of if-conditions.
James Molloy [Wed, 30 Apr 2014 10:11:40 +0000 (10:11 +0000)]
[ARM64] Add arm64_be where it was accidentally missed from a bunch of if-conditions.

I think this is the last commit for ARM64 big endian in clang. This commit makes
arm_neon.h compile correctly.

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

10 years agoSimplify test. No functional change intended.
Andrea Di Biagio [Wed, 30 Apr 2014 10:04:58 +0000 (10:04 +0000)]
Simplify test. No functional change intended.

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

10 years agoAdd a triple to new test.
Nico Weber [Wed, 30 Apr 2014 04:54:42 +0000 (04:54 +0000)]
Add a triple to new test.

NULL is just 0 on Windows, so the Wsentinel part of the test doesn't pass there.

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

10 years agoLet stddef.h respect __need_{wchar_t, size_t, NULL, ptrdiff_t, wint_t}.
Nico Weber [Wed, 30 Apr 2014 04:35:09 +0000 (04:35 +0000)]
Let stddef.h respect __need_{wchar_t, size_t, NULL, ptrdiff_t, wint_t}.

glibc expects that stddef.h only defines a single thing if either of these
defines is set.  For example, before this change, a C file containing

  #include <stdlib.h>
  int ptrdiff_t = 0;

would compile with gcc but not with clang. Now it compiles with clang too.

This also fixes PR12997, where older versions of the Linux headers would define
NULL incorrectly, and glibc would define __need_NULL and expect stddef.h to
redefine NULL with the correct definition.

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

10 years agoDefer loading any pending update records until we've finished deserializing.
Richard Smith [Wed, 30 Apr 2014 02:24:17 +0000 (02:24 +0000)]
Defer loading any pending update records until we've finished deserializing.
This fixes a bug where an update record causes us to load an entity that refers
to an entity we've not finished loading yet, resulting in badness.

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

10 years agoDrop non-cfi assembly support from clang.
Rafael Espindola [Wed, 30 Apr 2014 02:22:09 +0000 (02:22 +0000)]
Drop non-cfi assembly support from clang.

After this patch clang will ignore -fdwarf2-cfi-asm and -ffno-dwarf2-cfi-asm and
always print assembly that uses cfi directives.

In llvm, MC itself supports cfi since the end of 2010 (support started
in r119972, is reported in the 2.9 release notes).

In binutils the support has been around for much longer. It looks like
support started to be added in May 2003. It is available in 2.15
(31-Aug-2011, 2.14 is from 12-Jun-2003).

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

10 years agoAdd test case for revision 207575 to verify that on Windows, clang doesn't
Andrea Di Biagio [Tue, 29 Apr 2014 20:19:13 +0000 (20:19 +0000)]
Add test case for revision 207575 to verify that on Windows, clang doesn't
crash with an assertion failure when 'nul' is passed in input.

Modified clang/test/lit.py to add feature 'system-windows' if
`platform.system()` returns 'Windows'.

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

10 years agoscanf analysis: handle scanlists that start with ^] (PR19559)
Hans Wennborg [Tue, 29 Apr 2014 19:42:27 +0000 (19:42 +0000)]
scanf analysis: handle scanlists that start with ^] (PR19559)

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

10 years ago[PCH/Modules] Don't tie TargetOptions::LinkerVersion to a module/PCH, it's a driver...
Argyrios Kyrtzidis [Tue, 29 Apr 2014 18:45:01 +0000 (18:45 +0000)]
[PCH/Modules] Don't tie TargetOptions::LinkerVersion to a module/PCH, it's a driver only thing and doesn't affect any language/preprocessor/etc. semantics.

rdar://16714526

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

10 years agoAndroid uses -fpic for aarch64.
Logan Chien [Tue, 29 Apr 2014 18:18:58 +0000 (18:18 +0000)]
Android uses -fpic for aarch64.

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

10 years ago[analyzer] Improve test from r207486.
Jordan Rose [Tue, 29 Apr 2014 17:08:17 +0000 (17:08 +0000)]
[analyzer] Improve test from r207486.

The constructor that comes right before a variable declaration in the CFG might
not be the initialization of that variable. Previously, we just checked that
the variable's initializer expression was different from the construction
expression, but forgot to see whether the variable had an initializer expression
at all.

Thanks for the prompting, David.

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

10 years ago[analyzer] Don't assert when combining using .* on a temporary.
Jordan Rose [Tue, 29 Apr 2014 17:08:12 +0000 (17:08 +0000)]
[analyzer] Don't assert when combining using .* on a temporary.

While we don't model pointer-to-member operators yet (neither .* nor ->*),
CallAndMessageChecker still checks to make sure the 'this' object is not
null or undefined first. However, it also expects that the object should
always have a valid MemRegion, something that's generally important elsewhere
in the analyzer as well. Ensure this is true ahead of time, just like we do
for member access.

PR19531

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

10 years agoReapply r207477 and r207479 without cyclic dependency
Ben Langmuir [Tue, 29 Apr 2014 16:25:26 +0000 (16:25 +0000)]
Reapply r207477 and r207479 without cyclic dependency

Fixed by moving ProcessWarningOptions from Frontend into Basic. All of
the dependencies for ProcessWarningOptions were already in Basic, so
this was a small change.

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

10 years agoObjective-C. Improve diagnosis of bridging types.
Fariborz Jahanian [Tue, 29 Apr 2014 16:12:56 +0000 (16:12 +0000)]
Objective-C. Improve diagnosis of bridging types.
// rdar://16737117

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

10 years agoclang-format: Don't bin-pack text-proto-formatted options.
Daniel Jasper [Tue, 29 Apr 2014 15:54:14 +0000 (15:54 +0000)]
clang-format: Don't bin-pack text-proto-formatted options.

Before:
  repeated double value = 1
      [(aaaaaaa.aaaaaaaaa) = {aaaaaaaaaaaaaaaaAAAAAAAAAA,
                              bbbbbbb: BBBB, bbbb: BBB}];

After:
  repeated double value = 1
      [(aaaaaaa.aaaaaaaaa) = {aaaaaaaaaaaaaaaaAAAAAAAAAA,
                              bbbbbbb: BBBB,
                              bbbb: BBB}];

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

10 years agoclang-format: Remove accidentally added debug output.
Daniel Jasper [Tue, 29 Apr 2014 15:35:28 +0000 (15:35 +0000)]
clang-format: Remove accidentally added debug output.

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

10 years agoclang-format: Allow single-line function in WebKit style.
Daniel Jasper [Tue, 29 Apr 2014 14:05:20 +0000 (14:05 +0000)]
clang-format: Allow single-line function in WebKit style.

Before:
  void f() {
      return; }

After:
  void f() { return; }

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

10 years agoAdd comments regarding isPIEDefault usage for r207520
Alexey Volkov [Tue, 29 Apr 2014 12:07:34 +0000 (12:07 +0000)]
Add comments regarding isPIEDefault usage for r207520

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

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

10 years agoPass -pie to linker when generating executable on Android
Alexey Volkov [Tue, 29 Apr 2014 10:25:20 +0000 (10:25 +0000)]
Pass -pie to linker when generating executable on Android
This fixes problem with LTO on Android.

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

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

10 years agoAST: Fix visibility calculation for VarTemplateSpecializationDecl
David Majnemer [Tue, 29 Apr 2014 07:32:26 +0000 (07:32 +0000)]
AST: Fix visibility calculation for VarTemplateSpecializationDecl

It is possible that a variable template specialization might not have a
VisibilityAttr attached to it while the template that it specializes
does, in fact, have one.

We should consider the template in such cases.

This fixes PR19597.

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

10 years agoRevert r207477 (and r207479), "Check -Werror options during module validation"
NAKAMURA Takumi [Tue, 29 Apr 2014 06:58:59 +0000 (06:58 +0000)]
Revert r207477 (and r207479), "Check -Werror options during module validation"

It tried to introduce cyclic dependencies. Serialization shouldn't depend on Frontend, since Frontend depends on Serialization.

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

10 years agoCodeGen: Reference temporaries inherit visibility
David Majnemer [Tue, 29 Apr 2014 06:18:53 +0000 (06:18 +0000)]
CodeGen: Reference temporaries inherit visibility

Reference temporaries inherited many properties from the variable that
they correspond to but visibility wasn't one of them.

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

10 years agoMake test independent of label. Thanks to Richard Smith for catching this!
Adrian Prantl [Tue, 29 Apr 2014 02:27:33 +0000 (02:27 +0000)]
Make test independent of label. Thanks to Richard Smith for catching this!

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

10 years agoRun this test through instnamer to stop it failing on non-asserts clang builds.
Richard Smith [Tue, 29 Apr 2014 02:18:35 +0000 (02:18 +0000)]
Run this test through instnamer to stop it failing on non-asserts clang builds.

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

10 years ago[analyzer] Don't crash when a construction is followed by an uninitialized variable.
Jordan Rose [Tue, 29 Apr 2014 01:56:12 +0000 (01:56 +0000)]
[analyzer] Don't crash when a construction is followed by an uninitialized variable.

This could happen due to unfortunate CFG coincidences.

PR19579

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

10 years agoscan-build: Don't use realpath when the user provides an explicit path.
Jordan Rose [Tue, 29 Apr 2014 01:37:19 +0000 (01:37 +0000)]
scan-build: Don't use realpath when the user provides an explicit path.

PR19583

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

10 years agoRevert r207482; I fail at reading IRC.
Nico Weber [Tue, 29 Apr 2014 01:25:49 +0000 (01:25 +0000)]
Revert r207482; I fail at reading IRC.

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

10 years agoLet stddef.h redefine NULL if __need_NULL is set, as needed by glibc, PR12997.
Nico Weber [Tue, 29 Apr 2014 01:19:21 +0000 (01:19 +0000)]
Let stddef.h redefine NULL if __need_NULL is set, as needed by glibc, PR12997.

See the bug and the cfe-commits thread "[patch] Let stddef.h redefine NULL if
__need_NULL is set" for discussion.

Fixes PR12997 and is similar to the __need_wint_t bits already in this file.

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

10 years agoDebug info: Improve line table for functions with cleanups an early exit
Adrian Prantl [Tue, 29 Apr 2014 01:07:59 +0000 (01:07 +0000)]
Debug info: Improve line table for functions with cleanups an early exit
and no return expr at the end of the function.
The "function has only simple returns" check in FinishFunction tests
whether the number of simple return exprs equals the number of return
exprs, but so far a fallthrough at the end of a function was not counted
as a return, which would result in cleanup code being associated with the
wrong source line.

rdar://problem/16733984.

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

10 years agoAdd missing triple to make -isysroot work
Ben Langmuir [Tue, 29 Apr 2014 01:04:34 +0000 (01:04 +0000)]
Add missing triple to make -isysroot work

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

10 years ago[analyzer] Clean up the lists of current and potential checkers.
Jordan Rose [Tue, 29 Apr 2014 00:46:17 +0000 (00:46 +0000)]
[analyzer] Clean up the lists of current and potential checkers.

Patch by Anton Yartsev, modified by me.

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

10 years agoCheck -Werror options during module validation
Ben Langmuir [Tue, 29 Apr 2014 00:36:53 +0000 (00:36 +0000)]
Check -Werror options during module validation

This patch checks whether the diagnostic options that could lead to
errors (principally -Werror) are consistent between when a module was
built and when it is loaded.  If there are new -Werror flags, then the
module is rebuilt.  In order to canonicalize the options we do this
check at the level of the constructed DiagnosticsEngine, which contains
the final set of diag to diagnostic level mappings.  Currently we only
rebuild with the new diagnostic options, but we intend to refine this in
the future to include the union of the new and old flags, since we know
the old ones did not cause errors.  System modules are only rebuilt when
-Wsystem-headers is enabled.

One oddity is that unlike checking language options, we don’t perform
this diagnostic option checking when loading from a precompiled header.
The reason for this is that the compiler cannot rebuild the PCH, so
anything that requires it to be rebuilt effectively leaks into the build
system.  And in this case, that would mean the build system
understanding the complex relationship between diagnostic options and
the underlying diagnostic mappings, which is unreasonable.  Skipping the
check is safe, because these options do not affect the generated AST.
You simply won’t get new build errors due to changed -Werror options
automatically, which is also true for non-module cases.

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

10 years agoLLVM supports TLS on Windows and we can use it from Clang
Reid Kleckner [Tue, 29 Apr 2014 00:11:30 +0000 (00:11 +0000)]
LLVM supports TLS on Windows and we can use it from Clang

Patch by Martell Malone!

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

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

10 years agoWhen Driver::generateCompilationDiagnostics is filtering the list of
Paul Robinson [Mon, 28 Apr 2014 22:24:44 +0000 (22:24 +0000)]
When Driver::generateCompilationDiagnostics is filtering the list of
inputs to the preprocessor, check for invalid types first because not
all linker inputs have an option value to retrieve.

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

10 years agoMove all CUDA testing inputs to Inputs/ subdirectory inside the tests.
Eli Bendersky [Mon, 28 Apr 2014 22:21:28 +0000 (22:21 +0000)]
Move all CUDA testing inputs to Inputs/ subdirectory inside the tests.

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

10 years agoCodeGen: Fix linkage of reference temporaries
David Majnemer [Mon, 28 Apr 2014 22:17:59 +0000 (22:17 +0000)]
CodeGen: Fix linkage of reference temporaries

Summary:
A reference temporary should inherit the linkage of the variable it
initializes.  Otherwise, we may hit cases where a reference temporary
wouldn't have the same value in all translation units.

Reviewers: rsmith

Subscribers: cfe-commits

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

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

10 years ago[cleanup] Fix an 80-column violation
Justin Bogner [Mon, 28 Apr 2014 20:58:58 +0000 (20:58 +0000)]
[cleanup] Fix an 80-column violation

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

10 years ago[driver] Disable the slp vectorizer at -O0, -O1, and -Oz. This mirrors the
Chad Rosier [Mon, 28 Apr 2014 19:30:57 +0000 (19:30 +0000)]
[driver] Disable the slp vectorizer at -O0, -O1, and -Oz.  This mirrors the
behavior of the loop vectorizer, which is enabled at -O2, -O3, -O4, -Ofast
and -Os.
PR19568

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

10 years agoRemove unused using statement.
Nico Weber [Mon, 28 Apr 2014 17:54:37 +0000 (17:54 +0000)]
Remove unused using statement.

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

10 years agoRenaming range-based for loop variables so they don't appear iterator-like.
Aaron Ballman [Mon, 28 Apr 2014 14:56:59 +0000 (14:56 +0000)]
Renaming range-based for loop variables so they don't appear iterator-like.

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

10 years ago[C++11] Converting to range-based for loops. No functional changes intended.
Aaron Ballman [Mon, 28 Apr 2014 13:01:32 +0000 (13:01 +0000)]
[C++11] Converting to range-based for loops. No functional changes intended.

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

10 years agoclang-format: Improve binary operator detection.
Daniel Jasper [Mon, 28 Apr 2014 09:19:28 +0000 (09:19 +0000)]
clang-format: Improve binary operator detection.

Before:
  *(int *)(p &~3UL) = 0;

After:
  *(int *)(p & ~3UL) = 0;

This fixes llvm.org/PR19464.

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

10 years agoclang-format: Fixes spaces in case statements.
Daniel Jasper [Mon, 28 Apr 2014 07:48:36 +0000 (07:48 +0000)]
clang-format: Fixes spaces in case statements.

This fixes llvm.org/PR19482.

Before:
  switch (a) {
    case(B) :
      return;
  }

After:
  switch (a) {
    case (B):
      return;
  }

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

10 years ago[ARM64]Fix a bug cannot select UQSHL/SQSHL with constant i64 shift amount.
Hao Liu [Mon, 28 Apr 2014 07:36:12 +0000 (07:36 +0000)]
[ARM64]Fix a bug cannot select UQSHL/SQSHL with constant i64 shift amount.

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

10 years agoclang-format: Don't wrap after @interface.
Daniel Jasper [Mon, 28 Apr 2014 07:34:48 +0000 (07:34 +0000)]
clang-format: Don't wrap after @interface.

This fixes llvm.org/PR19450.

Before:
  @interface
  BookmarkHomeHandsetViewController ()<BookmarkAllCollectionViewDelegate,
                                       BookmarkFolderCollectionViewDelegate,
                                       BookmarkMenuViewControllerDelegate,
                                       BookmarkSearchViewControllerDelegate> {
  }

After:
  @interface aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ()<
      aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa,
      aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa,
      aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa,
      aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa> {
  }

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

10 years agoFollow-up to r207071: Let newFrontendActionFactory() return a unique_ptr.
Nico Weber [Mon, 28 Apr 2014 04:57:14 +0000 (04:57 +0000)]
Follow-up to r207071: Let newFrontendActionFactory() return a unique_ptr.

This exposed a leak, fix that.

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

10 years agolibclang: split out the documentation comment API
Alp Toker [Mon, 28 Apr 2014 02:39:27 +0000 (02:39 +0000)]
libclang: split out the documentation comment API

It's possible that the "comment AST" may be replaced or split out in the
midterm, any anyway this makes the headers easier to read.

Developers don't currently need to include "clang-c/Documentation.h" explicitly
and there's no macro to test for availability yet.

The raw comment and brief comment accessors have been kept in Index.h though
brief support may also move here as a separate proposal.

This is not a deprecation, just a gentle separation of concerns as we look to
simplify the built-in representation of comment nodes and support external
comment processors.

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

10 years ago[objcmt] Revert r191796, it's not needed anymore.
Argyrios Kyrtzidis [Mon, 28 Apr 2014 02:38:51 +0000 (02:38 +0000)]
[objcmt] Revert r191796, it's not needed anymore.

rdar://16223810

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

10 years agoCodeGen: remove an unused variable
Saleem Abdulrasool [Mon, 28 Apr 2014 02:29:11 +0000 (02:29 +0000)]
CodeGen: remove an unused variable

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

10 years ago[SemaCXX] Silence -Wconstant-logical-operand if the operand is a 0/1 from a macro.
Argyrios Kyrtzidis [Mon, 28 Apr 2014 00:20:16 +0000 (00:20 +0000)]
[SemaCXX] Silence -Wconstant-logical-operand if the operand is a 0/1 from a macro.

Libraries specify enabled/disabled features using macro defs of 0/1, in such cases the -Wconstant-logical-operand
is noise.

rdar://15410291

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

10 years ago[Index/DocComments] When cloning a full comment, pick the template parameters from...
Argyrios Kyrtzidis [Sun, 27 Apr 2014 22:53:03 +0000 (22:53 +0000)]
[Index/DocComments] When cloning a full comment, pick the template parameters from the original FullComment,
if the parameters are not already set (e.g. because it is a typedef).

Fixes crash of rdar://16128173

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

10 years agoremove less relevant information + about packaging/Mac OS X + link to cfe-dev
Sylvestre Ledru [Sun, 27 Apr 2014 15:17:15 +0000 (15:17 +0000)]
remove less relevant information + about packaging/Mac OS X + link to cfe-dev

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

10 years agoRemove no longer relevant information in the gcc/llvm comparison page + minor updates
Sylvestre Ledru [Sun, 27 Apr 2014 15:02:05 +0000 (15:02 +0000)]
Remove no longer relevant information in the gcc/llvm comparison page + minor updates

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

10 years agoremove useless code
Sylvestre Ledru [Sun, 27 Apr 2014 14:57:31 +0000 (14:57 +0000)]
remove useless code

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

10 years agoRemove deprecated information about performances:
Sylvestre Ledru [Sun, 27 Apr 2014 14:54:11 +0000 (14:54 +0000)]
Remove deprecated information about performances:
* It is better if we leave third parties to do "independent" benchmark.
* We compare Clang (version unspecified) with gcc 4.0 or 4.2.
* The graphs have not been updated for a while.
* Clang is well known now. I don't think we still need to explain why
Clang is great.

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

10 years agoclang-format: Fix bug when aligning trailing /**/-comments in macros.
Daniel Jasper [Sun, 27 Apr 2014 10:03:19 +0000 (10:03 +0000)]
clang-format: Fix bug when aligning trailing /**/-comments in macros.

Previously this could lead to a column limit violation with the
required escaped newlines.

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

10 years agoFix the method len of the CompletionString object. Patch by Christopher Greene
Sylvestre Ledru [Sun, 27 Apr 2014 04:42:55 +0000 (04:42 +0000)]
Fix the method len of the CompletionString object. Patch by Christopher Greene

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

10 years agoc-arcmt-test/Makefile: Update USEDLIBS for -static.
NAKAMURA Takumi [Sun, 27 Apr 2014 03:40:51 +0000 (03:40 +0000)]
c-arcmt-test/Makefile: Update USEDLIBS for -static.

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

10 years ago[SemaObjC] Fix ObjCInterfaceDecl::inheritsDesignatedInitializers(), if there are no
Argyrios Kyrtzidis [Sat, 26 Apr 2014 21:28:41 +0000 (21:28 +0000)]
[SemaObjC] Fix ObjCInterfaceDecl::inheritsDesignatedInitializers(), if there are no
designated initializers in the super class hierarchy then it should return false.

rdar://16692535

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

10 years ago[Sema] Adjust Sema::getCurBlock()/getCurLambda() to take into account that we may...
Argyrios Kyrtzidis [Sat, 26 Apr 2014 18:29:13 +0000 (18:29 +0000)]
[Sema] Adjust Sema::getCurBlock()/getCurLambda() to take into account that we may have
switch CurContext due to class template instantiation.

Fixes crash of the included test case.
rdar://16527205

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

10 years agolibclang: remove 'CXDiagnostic_Remark'
Alp Toker [Sat, 26 Apr 2014 14:43:53 +0000 (14:43 +0000)]
libclang: remove 'CXDiagnostic_Remark'

The change was landed without review or test cases.

It trivially broke almost any stable application checking for Severity >=
CXDiagnostic_Error or indeed any other kind of severity comparison upon
encountering a 'remark'.

Mapped to CXDiagnostic_Warning until a workable solution is proposed to the
list that preserves API stability.

(It's also not clear why the rest of r202475 wasn't simply implemented as a
modifier to the existing 'warning' level.)

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

10 years agoAdd mangling for attribute enable_if. The demangling patch for libcxxabi is still...
Nick Lewycky [Sat, 26 Apr 2014 00:14:00 +0000 (00:14 +0000)]
Add mangling for attribute enable_if. The demangling patch for libcxxabi is still in review.

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

10 years agoFixed Assert In CGRecordLowering
Warren Hunt [Fri, 25 Apr 2014 21:56:30 +0000 (21:56 +0000)]
Fixed Assert In CGRecordLowering
Prior to this patch, CGRecordLower assumed that virtual bases could not
be placed before the nvsize of an object.  This isn't true in Itanium
mode, virtual bases are placed at dsize rather than vnsize and in the
case of zero sized non-virtual bases nvsize can be larger than dsize.
This patch fixes CGRecordLowering to avoid an assert and to clip
bitfields properly in this case.  A test case is included.

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

10 years agoCodeGen: add __yield intrinsic for ARM
Saleem Abdulrasool [Fri, 25 Apr 2014 21:13:29 +0000 (21:13 +0000)]
CodeGen: add __yield intrinsic for ARM

The __yield intrinsic generates a hint instruction to indicate that the thread
is not performing any useful operations at the moment.  This is for
compatibility with MSVC, although, the intrinsic is also part of the ACLE, and
is enabled globally as a result.

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

10 years agoMake test pass on 32 bit architectures.
Benjamin Kramer [Fri, 25 Apr 2014 20:49:10 +0000 (20:49 +0000)]
Make test pass on 32 bit architectures.

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

10 years agoPrint detailed vector type information on diagnostics.
Benjamin Kramer [Fri, 25 Apr 2014 20:41:38 +0000 (20:41 +0000)]
Print detailed vector type information on diagnostics.

We never aka vector types because our attributed syntax for it is less
comprehensible than the typedefs. This leaves the user in the dark when
the typedef isn't named that well.

Example:
  v2s v; v4f w;
  w = v;

The naming in this cases isn't even that bad, but the error we give is
useless without looking up the actual typedefs.
t.c:6:5: error: assigning to 'v4f' from incompatible type 'v2s'

Now:
t.c:6:5: error: assigning to 'v4f' (vector of 4 'float' values) from
    incompatible type 'v2s' (vector of 2 'int' values)

We do this for all diagnostics that print a vector type.

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

10 years agoFix leak of GlobalModuleIndex::IdentifierIndex, found by LSan.
Nico Weber [Fri, 25 Apr 2014 19:45:23 +0000 (19:45 +0000)]
Fix leak of GlobalModuleIndex::IdentifierIndex, found by LSan.

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

10 years agoPR19558: don't produce an "unused variable" warning for a variable template partial...
Richard Smith [Fri, 25 Apr 2014 19:21:40 +0000 (19:21 +0000)]
PR19558: don't produce an "unused variable" warning for a variable template partial specialization.

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

10 years agoCodeGen: replace use of @llvm.arm.sevl with @llvm.arm.hint
Saleem Abdulrasool [Fri, 25 Apr 2014 17:25:46 +0000 (17:25 +0000)]
CodeGen: replace use of @llvm.arm.sevl with @llvm.arm.hint

Use the new generic @llvm.arm.hint hint intrinsic rather than the specialised
@llvm.arm.sevl hint instruction.

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

10 years agoCodeGen: Cleanup variable linkage calculation
David Majnemer [Fri, 25 Apr 2014 17:08:41 +0000 (17:08 +0000)]
CodeGen: Cleanup variable linkage calculation

Almost all linkage calculation for VarDecls occured inside of
GetLLVMLinkageVarDefinition except for static data members.  Centralize
the logic so that it can be more readily reused.

No functionality change.

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

10 years agoCodeGen: Refactor linkage/visibility calculation
David Majnemer [Fri, 25 Apr 2014 17:07:16 +0000 (17:07 +0000)]
CodeGen: Refactor linkage/visibility calculation

It turns out that linkage and visibility have rather similar logic for
both functions and non-variable globals.  Split the calculation out so
that both sides may share this code.

No functionality change.

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