]> granicus.if.org Git - clang/log
clang
10 years agoFix PR19066 - 0-sized vftable in the presence of virtual inheritance
Timur Iskhodzhanov [Wed, 26 Mar 2014 08:12:53 +0000 (08:12 +0000)]
Fix PR19066 - 0-sized vftable in the presence of virtual inheritance

Reviewed at http://llvm-reviews.chandlerc.com/D3181

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

10 years agoRevert "Update for llvm api change."
Rafael Espindola [Wed, 26 Mar 2014 06:14:54 +0000 (06:14 +0000)]
Revert "Update for llvm api change."

This reverts commit r204783.

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

10 years agoUpdate for llvm api change.
Rafael Espindola [Wed, 26 Mar 2014 05:34:18 +0000 (05:34 +0000)]
Update for llvm api change.

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

10 years agoAdd existing warnings to -Waddress so that it works closer to what GCC has.
Richard Trieu [Wed, 26 Mar 2014 01:55:33 +0000 (01:55 +0000)]
Add existing warnings to -Waddress so that it works closer to what GCC has.
Previously, -Waddress was empty.

Fixes PR9043.

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

10 years agoMove the -i[no-]system-prefix options from CC1Options.td to Options.td.
Alexander Kornienko [Wed, 26 Mar 2014 01:39:59 +0000 (01:39 +0000)]
Move the -i[no-]system-prefix options from CC1Options.td to Options.td.

Summary:
This allows them to be used without -cc1 the same way as -I and -isystem.
Renamed the options to --system-header-prefix=/--no-system-header-prefix to avoid interference with -isystem and make the intent of the option cleaner.

Reviewers: rsmith

Reviewed By: rsmith

CC: cfe-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D3185

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

10 years ago[PGO] Add simplified branch weights for Objective-C for-collection loops.
Bob Wilson [Tue, 25 Mar 2014 23:26:31 +0000 (23:26 +0000)]
[PGO] Add simplified branch weights for Objective-C for-collection loops.

Conceptually one of these loops is just a while-loop, but the actual code-gen
is more complicated. We don't instrument all the different control flow edges
to get accurate counts for each conditional branch, nor do I think it makes
sense to do so. Instead, make the simplifying assumption that the loop behaves
like a while-loop. Use the same branch weights for the first check for an
empty collection as would be used for the back-edge of a while loop, and use
that same weighting for the innermost loop, ignoring the possibility that there
may be some extra code to go fetch more elements.

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

10 years agoPR19249: Don't forget to DiagnoseUseOfDecl for the implicit use of a variable
Richard Smith [Tue, 25 Mar 2014 21:11:32 +0000 (21:11 +0000)]
PR19249: Don't forget to DiagnoseUseOfDecl for the implicit use of a variable
in a lambda capture.

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

10 years agoUse an option alias to implement -gmlt
David Blaikie [Tue, 25 Mar 2014 20:42:27 +0000 (20:42 +0000)]
Use an option alias to implement -gmlt

Review feedback from Reid Kleckner on r203603.

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

10 years ago-fms-compatibility: Only form implicit member exprs for unqualified ids
Reid Kleckner [Tue, 25 Mar 2014 20:31:28 +0000 (20:31 +0000)]
-fms-compatibility: Only form implicit member exprs for unqualified ids

If there are any scope specifiers, then a base class must be named or
the symbol isn't from a base class.

Fixes PR19233.

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

10 years agoMS ABI: Mark direct virtual bases as visted when building vtable paths
Reid Kleckner [Tue, 25 Mar 2014 18:33:27 +0000 (18:33 +0000)]
MS ABI: Mark direct virtual bases as visted when building vtable paths

Fixes PR19240.  In retrospect, this is a fairly obvious bug.  :)

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

10 years agoFix an logic error in the clang driver preventing crtfastmath.o from linking when...
Benjamin Kramer [Tue, 25 Mar 2014 18:02:07 +0000 (18:02 +0000)]
Fix an logic error in the clang driver preventing crtfastmath.o from linking when -Ofast is used without -ffast-math

In gcc using -Ofast forces linking of crtfastmath.o.
In the current clang crtfastmath.o is only linked when -ffast-math/-funsafe-math-optimizations passed. It can lead to performance issues, when using only -Ofast without explicit -ffast-math (I faced with it).
My patch fixes inconsistency with gcc behaviour and also introduces few tests on it.

Patch by Zinovy Nis!

Differential Revision: http://llvm-reviews.chandlerc.com/D3114

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

10 years agoclang-cl: make /Gy imply -fdata-sections in addition to -ffunction-sections
Hans Wennborg [Tue, 25 Mar 2014 17:50:25 +0000 (17:50 +0000)]
clang-cl: make /Gy imply -fdata-sections in addition to -ffunction-sections

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

10 years ago[analyzer] Don't track retain counts of objects directly accessed through ivars.
Jordan Rose [Tue, 25 Mar 2014 17:10:58 +0000 (17:10 +0000)]
[analyzer] Don't track retain counts of objects directly accessed through ivars.

A refinement of r198953 to handle cases where an object is accessed both through
a property getter and through direct ivar access. An object accessed through a
property should always be treated as +0, i.e. not owned by the caller. However,
an object accessed through an ivar may be at +0 or at +1, depending on whether
the ivar is a strong reference. Outside of ARC, we don't have that information,
so we just don't track objects accessed through ivars.

With this change, accessing an ivar directly will deliberately override the +0
provided by a getter, but only if the +0 hasn't participated in other retain
counting yet. That isn't perfect, but it's already unusual for people to be
mixing property access with direct ivar access. (The primary use case for this
is in setters, init methods, and -dealloc.)

Thanks to Ted for spotting a few mistakes in private review.

<rdar://problem/16333368>

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

10 years agoclang-cl: Forward /Gy or /Gy- when falling back to cl.exe
Hans Wennborg [Tue, 25 Mar 2014 14:48:54 +0000 (14:48 +0000)]
clang-cl: Forward /Gy or /Gy- when falling back to cl.exe

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

10 years agoFixes a bug in DynTypedNode.
Manuel Klimek [Tue, 25 Mar 2014 14:39:26 +0000 (14:39 +0000)]
Fixes a bug in DynTypedNode.

Two DynTypedNodes can be equal if they do not have the same node type,
because DynTypedNodes for the same underlying object might have been
created from different types (for example, Decl vs VarDecl).

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

10 years agoclang-format: Fix incorrect &/* detection.
Daniel Jasper [Tue, 25 Mar 2014 10:52:45 +0000 (10:52 +0000)]
clang-format: Fix incorrect &/* detection.

Before:
  STATIC_ASSERT((a &b) == 0);

After:
  STATIC_ASSERT((a & b) == 0);

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

10 years agoRemove redundant and misleading check. This could also lead to painful cyclic
Richard Smith [Tue, 25 Mar 2014 01:22:22 +0000 (01:22 +0000)]
Remove redundant and misleading check. This could also lead to painful cyclic
deserialization.

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

10 years agoSave out a correct lookup table if a lookup table entry is stale (it contains
Richard Smith [Tue, 25 Mar 2014 01:14:22 +0000 (01:14 +0000)]
Save out a correct lookup table if a lookup table entry is stale (it contains
an out-of-date external decls list). This happens if we declare some names,
force the lookup table for the decl context to be built, import a module that
adds more decls for the name, then write out our module without looking up the
name.

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

10 years agoIf a DeclContext's lookups need to be reconciled, and we're given external declaratio...
Richard Smith [Tue, 25 Mar 2014 00:34:21 +0000 (00:34 +0000)]
If a DeclContext's lookups need to be reconciled, and we're given external declarations for a name, reconcile first. Otherwise, when we come to reconcile, we'll ask for external declarations for that name again. No functionality change intended.

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

10 years agoSimplify: don't try to complete the list of decls twice when iterating over the
Richard Smith [Tue, 25 Mar 2014 00:27:18 +0000 (00:27 +0000)]
Simplify: don't try to complete the list of decls twice when iterating over the
lookups for a DeclContext.

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

10 years agoFix a bug where an explicit instantiation declaration of a class template
Richard Smith [Mon, 24 Mar 2014 23:54:09 +0000 (23:54 +0000)]
Fix a bug where an explicit instantiation declaration of a class template
specialization would make us think it might have a key function.

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

10 years agoProper handling of static local variables with address space qualifiers.
Eli Bendersky [Mon, 24 Mar 2014 22:05:38 +0000 (22:05 +0000)]
Proper handling of static local variables with address space qualifiers.

Similar to the implementation for globals in r157167.

Patch by Jingyue Wu.

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

10 years agoMS ABI: Eliminate Duplicate Strings
David Majnemer [Mon, 24 Mar 2014 21:43:36 +0000 (21:43 +0000)]
MS ABI: Eliminate Duplicate Strings

COFF doesn't have mergeable sections so LLVM/clang's normal tactics for
string deduplication will not have any effect.

To remedy this we place each string inside it's own section and mark
the section as IMAGE_COMDAT_SELECT_ANY.  However, we can only do this if the
string has an external name that we can generate from it's contents.

To be compatible with MSVC, we must use their scheme.  Otherwise identical
strings in translation units from clang may not be deduplicated with
translation units in MSVC.

This fixes PR18248.

N.B. We will not attempt to do anything with a string literal which is not of
type 'char' or 'wchar_t' because their compiler does not support unicode
string literals as of this date.  Further, we avoid doing this if
either -fwritable-strings or -fsanitize=address are present.

This reverts commit r204596.

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

10 years ago[MS-ABI] Drop Special Layout in 64-bit mode.
Warren Hunt [Mon, 24 Mar 2014 21:37:27 +0000 (21:37 +0000)]
[MS-ABI] Drop Special Layout in 64-bit mode.

As of cl.exe version 18, the special layout rules for structs with
alignment 16 or greater has been dropped.  This patch drops the behavior
from clang.  This patch also updates the lit tests to reflect the
change.

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

10 years agoCleanup testcase by adding return statements and replacing CHECK-DAG's with
Adrian Prantl [Mon, 24 Mar 2014 21:19:34 +0000 (21:19 +0000)]
Cleanup testcase by adding return statements and replacing CHECK-DAG's with
plain old CHECKs.

Follow-up to r204633.

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

10 years agoUpdate the powerpc64le check to include CALL_ELF=2 check.
Will Schmidt [Mon, 24 Mar 2014 21:09:16 +0000 (21:09 +0000)]
Update the powerpc64le check to include CALL_ELF=2 check.
This is a testcase follow-up to r204627.
(see also r204614 for CALL_ELF usage).

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

10 years agoCapability attributes can now be declared on a typedef declaration as well as a struc...
Aaron Ballman [Mon, 24 Mar 2014 19:29:19 +0000 (19:29 +0000)]
Capability attributes can now be declared on a typedef declaration as well as a structure declaration. This allows for C code to use Boolean expressions on a capability as part of another attribute. Eg) __attribute__((requires_capability(!SomeCapability)))

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

10 years agoUse CHECK-DAG in a test so that it isn't sensitive to metadata order.
Bob Wilson [Mon, 24 Mar 2014 18:14:15 +0000 (18:14 +0000)]
Use CHECK-DAG in a test so that it isn't sensitive to metadata order.

This was failing on an internal branch where the order was different for
some reason. <rdar://problem/16407581>

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

10 years ago[PPC64LE] Add a CALL_ELF macro to indicate use of the ELFv2 ABI.
Will Schmidt [Mon, 24 Mar 2014 17:27:03 +0000 (17:27 +0000)]
[PPC64LE] Add a CALL_ELF macro to indicate use of the ELFv2 ABI.

Additional clarification from Uli for the background on _CALL_ELF:
"Historically GCC has provided various _CALL_... predefines depending on the
ABI currently being compiled for. (_CALL_SYSV,_CALL_AIXDESC, _CALL_DARWIN )
When we needed a new define for the current ABI, we decided on using _CALL_ELF
since the official name of the ABI is the OpenPower ElfV2 ABI, with the
current Linux ABI retro-actively being renamed the ELFv1 ABI
and so we decided on using _CALL_ELF to identify the Linux (+BSD etc.) ELF ABI,
with _CALL_ELF=1 for the v1 ABI and _CALL_ELF=2 for the v2 ABI.
(Note that this matches the gcc compiler switch -mabi=elfv1 vs. -mabi=elfv2)."

In code, a (_CALL_ELF==2) check will indicate when the ELFv2 ABI is
to be used.   This is the desired default for the PPC64 LE target.

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

10 years agoUpdate the parameters passed to the assembler and linker for
Will Schmidt [Mon, 24 Mar 2014 17:10:37 +0000 (17:10 +0000)]
Update the parameters passed to the assembler and linker for
the PPC64LE target.  Specifically:
(assembler) adds/uses  -mppc64 -mlittle-endian
(linker) adds/uses  elf64lppc

Testcase included.

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

10 years agoUpdate DataLayout/DescriptionString for ppc64le
Will Schmidt [Mon, 24 Mar 2014 15:48:02 +0000 (15:48 +0000)]
Update DataLayout/DescriptionString for ppc64le
Update DataLayout/DescriptionString for ppc64le

Similar LLVM change made in r203664

Testcase included.

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

10 years agoAArch64_BE test case for predefined macros
Christian Pirker [Mon, 24 Mar 2014 13:57:21 +0000 (13:57 +0000)]
AArch64_BE test case for predefined macros

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

10 years agoFix a compile-time warning
Timur Iskhodzhanov [Mon, 24 Mar 2014 11:09:01 +0000 (11:09 +0000)]
Fix a compile-time warning

lib/CodeGen/CGBuiltin.cpp:3136:12: warning: variable ‘TblPos’ set but not used [-Wunused-but-set-variable]

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

10 years agoRevert r204562,204566,204586,204587 as they broke ASan on Windows
Timur Iskhodzhanov [Mon, 24 Mar 2014 10:31:09 +0000 (10:31 +0000)]
Revert r204562,204566,204586,204587 as they broke ASan on Windows

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

10 years agoDriver: Fix a typo in a command line description
David Majnemer [Mon, 24 Mar 2014 05:53:13 +0000 (05:53 +0000)]
Driver: Fix a typo in a command line description

Thanks to Richard Smith for catching this!

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

10 years agoCodeGen: Remove unneeded directives
David Majnemer [Mon, 24 Mar 2014 05:53:11 +0000 (05:53 +0000)]
CodeGen: Remove unneeded directives

Use two check-prefix patterns per FileCheck invocation for these tests,
this cleanly removes redundant CHECK directives.

Thanks to Richard Smith for the idea!

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

10 years agoMS ABI: Add tests, other cleanups for r204562
David Majnemer [Mon, 24 Mar 2014 05:53:08 +0000 (05:53 +0000)]
MS ABI: Add tests, other cleanups for r204562

This commit cleans up a few accidents:
- Do not rely on the order in which StringLiteral lays out bytes.
- Use a more efficient mechanism for handling so-called
  "special-mappings" when mangling string literals.
- There is no need to allocate a copy of the mangled name.
- Add the test written for r204562.

Thanks to Richard Smith for pointing these out!

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

10 years agoRemove unused diagnostic.
Benjamin Kramer [Sun, 23 Mar 2014 23:06:04 +0000 (23:06 +0000)]
Remove unused diagnostic.

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

10 years agoFix tests in r204576
Nico Rieck [Sun, 23 Mar 2014 22:07:53 +0000 (22:07 +0000)]
Fix tests in r204576

Proper redeclaration warnings for dllimport are not implemented yet.

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

10 years agoTreat dllimport globals without explicit storage class as extern
Nico Rieck [Sun, 23 Mar 2014 21:24:01 +0000 (21:24 +0000)]
Treat dllimport globals without explicit storage class as extern

dllimport implies a definition which means the 'extern' keyword is optional
when declaring imported variables.

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

10 years agoAdd missing file from r204570.
Richard Smith [Sun, 23 Mar 2014 21:01:41 +0000 (21:01 +0000)]
Add missing file from r204570.

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

10 years agoConsistently dump default template arguments for template parameters as 'TemplateArgu...
Richard Smith [Sun, 23 Mar 2014 20:50:39 +0000 (20:50 +0000)]
Consistently dump default template arguments for template parameters as 'TemplateArgument's.

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

10 years agoIf a name is injected into an imported inline namespace without reopening that
Richard Smith [Sun, 23 Mar 2014 20:41:56 +0000 (20:41 +0000)]
If a name is injected into an imported inline namespace without reopening that
namespace, we need to update both the visible names of that namespace and of
its enclosing namespace set.

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

10 years agoCleanup dead assignments reported by scan-build
Arnaud A. de Grandmaison [Sun, 23 Mar 2014 20:28:07 +0000 (20:28 +0000)]
Cleanup dead assignments reported by scan-build

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

10 years agoWhen we inject a declaration into a namespace, add the primary DeclContext to
Richard Smith [Sun, 23 Mar 2014 19:45:26 +0000 (19:45 +0000)]
When we inject a declaration into a namespace, add the primary DeclContext to
the update set rather than the current DeclContext. Add test for the local
extern case too.

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

10 years agoSimplify test/CodeGenCXX/microsoft-abi-vtables-virtual-inheritance.cpp by forcing...
Timur Iskhodzhanov [Sun, 23 Mar 2014 19:09:08 +0000 (19:09 +0000)]
Simplify test/CodeGenCXX/microsoft-abi-vtables-virtual-inheritance.cpp by forcing VFTableBuilder invocation with virtual function calls or constructors codegen

Previously the vftables were built at the end of the TU in a reverse-to-random order

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

10 years agoCodeGen: Make string tests exercise the MS ABI
David Majnemer [Sun, 23 Mar 2014 18:22:10 +0000 (18:22 +0000)]
CodeGen: Make string tests exercise the MS ABI

r204562 unwittingly failed tests for some bots.  Make those tests work
with both the Itanium and MS ABIs.

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

10 years agoDriver: Map /Gy to -ffunction-sections
David Majnemer [Sun, 23 Mar 2014 17:47:22 +0000 (17:47 +0000)]
Driver: Map /Gy to -ffunction-sections

/Gy is equivalent to -ffunction-sections.
/Gy- is equivalent to -fno-function-sections.

Currently, LLVM doesn't do anything interesting with -ffunction-sections
under WinCOFF.

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

10 years agoDriver: cleanup /vd2 test
David Majnemer [Sun, 23 Mar 2014 17:47:18 +0000 (17:47 +0000)]
Driver: cleanup /vd2 test

/vd2 is not ignored anymore, remove it from the ignored list.

Add a test to ensure that it does the right thing.

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

10 years agoMS ABI: Eliminate Duplicate Strings
David Majnemer [Sun, 23 Mar 2014 17:47:16 +0000 (17:47 +0000)]
MS ABI: Eliminate Duplicate Strings

COFF doesn't have mergeable sections so LLVM/clang's normal tactics for
string deduplication will not have any effect.

To remedy this we place each string inside it's own section and mark
the section as IMAGE_COMDAT_SELECT_ANY.  However, we can only do this if the
string has an external name that we can generate from it's contents.

To be compatible with MSVC, we must use their scheme.  Otherwise identical
strings in translation units from clang may not be deduplicated with
translation units in MSVC.

This fixes PR18248.

N.B. We will not attempt to do anything with a string literal which is not of
type 'char' or 'wchar_t' because their compiler does not support unicode
string literals as of this date.

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

10 years agoremove a bunch of unused private methods
Nuno Lopes [Sun, 23 Mar 2014 17:12:37 +0000 (17:12 +0000)]
remove a bunch of unused private methods
found with a smarter version of -Wunused-member-function that I'm playwing with.
Appologies in advance if I removed someone's WIP code.

 ARCMigrate/TransProperties.cpp                  |    8 -----
 AST/MicrosoftMangle.cpp                         |    1
 Analysis/AnalysisDeclContext.cpp                |    5 ---
 Analysis/LiveVariables.cpp                      |   14 ----------
 Index/USRGeneration.cpp                         |   10 -------
 Sema/Sema.cpp                                   |   33 +++++++++++++++++++++---
 Sema/SemaChecking.cpp                           |    3 --
 Sema/SemaDecl.cpp                               |   20 ++------------
 StaticAnalyzer/Checkers/GenericTaintChecker.cpp |    1
 9 files changed, 34 insertions(+), 61 deletions(-)

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

10 years agoIf a template instantation introduces a name into a namespace, we need to write
Richard Smith [Sun, 23 Mar 2014 02:30:01 +0000 (02:30 +0000)]
If a template instantation introduces a name into a namespace, we need to write
out a visible update record for that namespace even if it was never declared in
this module.

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

10 years agoIf an update record makes a declaration interesting, pass it to the consumer.
Richard Smith [Sun, 23 Mar 2014 00:27:18 +0000 (00:27 +0000)]
If an update record makes a declaration interesting, pass it to the consumer.

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

10 years agoEmit an update record if we instantiate the definition of a function template
Richard Smith [Sat, 22 Mar 2014 23:33:22 +0000 (23:33 +0000)]
Emit an update record if we instantiate the definition of a function template
specialization from a module. (This can also happen for function template
specializations in PCHs if they're instantiated eagerly, because they're
constexpr or have a deduced return type.)

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

10 years agoRevert r204493, "Make clang/test/lit.cfg pre-scan the RUN line looking for tool names,"
NAKAMURA Takumi [Sat, 22 Mar 2014 04:46:59 +0000 (04:46 +0000)]
Revert r204493, "Make clang/test/lit.cfg pre-scan the RUN line looking for tool names,"

It was incompatible to standlalone clang build.

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

10 years agoRefactor: move loading pending instantiations from chained PCHs to a more appropriate...
Richard Smith [Sat, 22 Mar 2014 01:43:32 +0000 (01:43 +0000)]
Refactor: move loading pending instantiations from chained PCHs to a more appropriate place, so that we only ask the external source once.

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

10 years agorelax testcase to unbreak windows buildbots.
Adrian Prantl [Fri, 21 Mar 2014 22:58:28 +0000 (22:58 +0000)]
relax testcase to unbreak windows buildbots.

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

10 years agoWhen generating the Attribute dumper code, do not dead-initialize MoreChildren
Arnaud A. de Grandmaison [Fri, 21 Mar 2014 22:35:34 +0000 (22:35 +0000)]
When generating the Attribute dumper code, do not dead-initialize MoreChildren

No functional change. This will cleanup a bunch of scan-build warnings.

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

10 years agoBe a bit smarter about what nested name qualifiers to allow when
Kaelyn Uhrain [Fri, 21 Mar 2014 21:54:25 +0000 (21:54 +0000)]
Be a bit smarter about what nested name qualifiers to allow when
performing typo correction on very short (1 or 2 char) identifiers.

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

10 years ago[C++11] Simplify some loops in Sema::CorrectTypo as range-based for loops.
Kaelyn Uhrain [Fri, 21 Mar 2014 21:54:22 +0000 (21:54 +0000)]
[C++11] Simplify some loops in Sema::CorrectTypo as range-based for loops.

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

10 years agoTest commit
Alexander Musman [Fri, 21 Mar 2014 21:25:24 +0000 (21:25 +0000)]
Test commit

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

10 years agoCGDebugInfo: At the end of EmitFunctionStart, Initialize PrevLoc to the
Adrian Prantl [Fri, 21 Mar 2014 21:01:58 +0000 (21:01 +0000)]
CGDebugInfo: At the end of EmitFunctionStart, Initialize PrevLoc to the
location that the next call emitLocation() would default to. Otherwise
setLocation() may wrongly believe that the current source file didn't
change, when in fact it did.

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

10 years agoMake clang/test/lit.cfg pre-scan the RUN line looking for tool names,
Paul Robinson [Fri, 21 Mar 2014 18:13:35 +0000 (18:13 +0000)]
Make clang/test/lit.cfg pre-scan the RUN line looking for tool names,
and substitute fully qualified path names pointing to the build
directory.  This ensures we're testing the just-built tools.

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

10 years agoPlacate -Wunreachable-code by removing unnecessary logic to handle NUM_OPENMP_DEFAULT...
Ted Kremenek [Fri, 21 Mar 2014 17:34:28 +0000 (17:34 +0000)]
Placate -Wunreachable-code by removing unnecessary logic to handle NUM_OPENMP_DEFAULT_KINDS <= 1.

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

10 years agoFixing code that doesn't compile in MSVC 2012 (but does in MSVC 2013) from r204417...
Aaron Ballman [Fri, 21 Mar 2014 15:22:56 +0000 (15:22 +0000)]
Fixing code that doesn't compile in MSVC 2012 (but does in MSVC 2013) from r204417 and related commits.

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

10 years agoThe release_capability, release_shared_capability and release_generic_capability...
Aaron Ballman [Fri, 21 Mar 2014 14:48:48 +0000 (14:48 +0000)]
The release_capability, release_shared_capability and release_generic_capability functions are now functionally distinct for capability analysis. The unlock_function attribute maps directly to release_generic_capability.

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

10 years agoclang-format: Add flag for removing empty lines at the start of blocks.
Daniel Jasper [Fri, 21 Mar 2014 13:43:14 +0000 (13:43 +0000)]
clang-format: Add flag for removing empty lines at the start of blocks.

This unbreaks polly-formatting-tests and we can make a decision for
LLVM style independently.

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

10 years agoSimplify test/CodeGenCXX/microsoft-abi-vtables-virtual-inheritance-vtordisps.cpp...
Timur Iskhodzhanov [Fri, 21 Mar 2014 13:27:08 +0000 (13:27 +0000)]
Simplify test/CodeGenCXX/microsoft-abi-vtables-virtual-inheritance-vtordisps.cpp by forcing VFTableBuilder invocation with virtual function calls

Previously the vftables were built at the end of the TU in a reverse-to-random order

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

10 years agoSimplify test/CodeGenCXX/microsoft-abi-vtables-multiple-nonvirtual-inheritance.cpp...
Timur Iskhodzhanov [Fri, 21 Mar 2014 13:11:09 +0000 (13:11 +0000)]
Simplify test/CodeGenCXX/microsoft-abi-vtables-multiple-nonvirtual-inheritance.cpp by forcing VFTableBuilder invocation with virtual function calls

Previously the vftables were built at the end of the TU in a reverse-to-random order

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

10 years ago[CMake] Propagate top-level targets for compiler-rt runtimes and test-suites
Alexey Samsonov [Fri, 21 Mar 2014 13:09:25 +0000 (13:09 +0000)]
[CMake] Propagate top-level targets for compiler-rt runtimes and test-suites
from (external) compiler-rt build tree into LLVM/Clang build tree in
LLVM_BUILD_EXTERNAL_COMPILER_RT mode.

For instance, running
  make asan -j12
in LLVM/Clang build tree will now build Clang, use it to configure
compiler-rt build tree, and invoke "make asan -j12" there. ASan runtime will
be built in the proper location, where Clang driver expects to find it.

Running
  make check-asan
will build Clang, use it to configure compiler-rt build tree, build everything
there, and then run "make check-asan" in compiler-rt build tree using just-built
Clang and ASan runtime.

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

10 years agoclang-format: Don't remove empty lines at the start of namespaces.
Daniel Jasper [Fri, 21 Mar 2014 13:03:33 +0000 (13:03 +0000)]
clang-format: Don't remove empty lines at the start of namespaces.

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

10 years agoclang-format: Remove empty lines at the beginning of blocks.
Daniel Jasper [Fri, 21 Mar 2014 12:58:53 +0000 (12:58 +0000)]
clang-format: Remove empty lines at the beginning of blocks.

They very rarely aid readability.

Formatting:
  void f() {

    if (a) {

      f();

    }

  }

Now leads to:
  void f() {
    if (a) {
      f();
    }
  }

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

10 years agoclang-format: Let a trailing comma in braced lists enforce linebreaks.
Daniel Jasper [Fri, 21 Mar 2014 12:38:57 +0000 (12:38 +0000)]
clang-format: Let a trailing comma in braced lists enforce linebreaks.

Before:
  vector<int> x{1, 2, 3, 4, };

After:
  vector<int> x{
      1, 2, 3, 4,
  };

This fixes llvm.org/PR18519.

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

10 years agoclang-format: Fix for r204456.
Daniel Jasper [Fri, 21 Mar 2014 12:15:40 +0000 (12:15 +0000)]
clang-format: Fix for r204456.

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

10 years agoclang-format: Preserve meaning of trailing comments on parameters.
Daniel Jasper [Fri, 21 Mar 2014 11:58:45 +0000 (11:58 +0000)]
clang-format: Preserve meaning of trailing comments on parameters.

Formatting:
  SomeFunction(a,
            b, // comment
            c);

Before:
  SomeFunction(a, b, // comment
               c);

After:
  SomeFunction(a,
               b, // comment
               c);

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

10 years agoSimplify test/CodeGenCXX/microsoft-abi-vtables-single-inheritance.cpp by forcing...
Timur Iskhodzhanov [Fri, 21 Mar 2014 11:39:24 +0000 (11:39 +0000)]
Simplify test/CodeGenCXX/microsoft-abi-vtables-single-inheritance.cpp by forcing VFTableBuilder invocation with virtual function calls

Previously the vftables were built at the end of the TU in a reverse-to-random order

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

10 years agoAdd one more test for PR19172
Timur Iskhodzhanov [Fri, 21 Mar 2014 11:07:24 +0000 (11:07 +0000)]
Add one more test for PR19172

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

10 years agoDocument removed flags in release notes
Alexey Samsonov [Fri, 21 Mar 2014 07:25:01 +0000 (07:25 +0000)]
Document removed flags in release notes

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

10 years agoKill deprecated -fbounds-checking flag
Alexey Samsonov [Fri, 21 Mar 2014 07:15:47 +0000 (07:15 +0000)]
Kill deprecated -fbounds-checking flag

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

10 years ago[-Wunreachable-code] add a specialized diagnostic for unreachable increment expressio...
Ted Kremenek [Fri, 21 Mar 2014 06:02:36 +0000 (06:02 +0000)]
[-Wunreachable-code] add a specialized diagnostic for unreachable increment expressions of loops.

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

10 years ago[OPENMP] parsing of clause 'safelen' (for directive 'omp simd')
Alexey Bataev [Fri, 21 Mar 2014 04:51:18 +0000 (04:51 +0000)]
[OPENMP] parsing of clause 'safelen' (for directive 'omp simd')

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

10 years agoSerialize and deserialize mangling numbers.
Richard Smith [Fri, 21 Mar 2014 01:48:23 +0000 (01:48 +0000)]
Serialize and deserialize mangling numbers.

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

10 years agoPR19215: When writing/reading a PCH that imported a module, store the location
Richard Smith [Fri, 21 Mar 2014 00:33:59 +0000 (00:33 +0000)]
PR19215: When writing/reading a PCH that imported a module, store the location
at which that PCH imported each visible submodule of the module. Such locations
are needed when synthesizing macro directives resulting from the import.

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

10 years agoFixed newlines.
Alexander Kornienko [Fri, 21 Mar 2014 00:07:27 +0000 (00:07 +0000)]
Fixed newlines.

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

10 years agoPGO: Don't define instrumentation data available_externally
Duncan P. N. Exon Smith [Thu, 20 Mar 2014 22:50:08 +0000 (22:50 +0000)]
PGO: Don't define instrumentation data available_externally

Variables with available_externally linkage can be dropped at will.
This causes link errors, since there are still references to the
instrumentation!  linkonce_odr is almost equivalent, so use that
instead.

As a drive-by fix (I don't have an Elf system, so I'm not sure how to
write a testcase), use linkonce linkage for the instrumentation of
extern_weak functions.

<rdar://problem/15943240>

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

10 years agoPGO: Rename FuncLinkage to VarLinkage; no functionality change
Duncan P. N. Exon Smith [Thu, 20 Mar 2014 22:49:50 +0000 (22:49 +0000)]
PGO: Rename FuncLinkage to VarLinkage; no functionality change

The variable is used to set the linkage for variables, and will become
different from function linkage in a follow-up commit.

<rdar://problem/15943240>

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

10 years agoWhen the exception specification for a function in an imported PCH or module is
Richard Smith [Thu, 20 Mar 2014 21:47:22 +0000 (21:47 +0000)]
When the exception specification for a function in an imported PCH or module is
resolved, emit an update record.

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

10 years agoRefactor and simplify DeclUpdates serialization.
Richard Smith [Thu, 20 Mar 2014 21:02:00 +0000 (21:02 +0000)]
Refactor and simplify DeclUpdates serialization.

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

10 years agoConsumed Analysis: IgnoreParens bugfix.
DeLesley Hutchins [Thu, 20 Mar 2014 20:39:20 +0000 (20:39 +0000)]
Consumed Analysis: IgnoreParens bugfix.

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

10 years agoFix PR19172 - wrong this adjustment calculated for virtual destructor in a class...
Timur Iskhodzhanov [Thu, 20 Mar 2014 20:38:34 +0000 (20:38 +0000)]
Fix PR19172 - wrong this adjustment calculated for virtual destructor in a class with complex inheritance

Reviewed at http://llvm-reviews.chandlerc.com/D3128

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

10 years agoRefactor to move decl update emission into the decl emission loop.
Richard Smith [Thu, 20 Mar 2014 20:07:19 +0000 (20:07 +0000)]
Refactor to move decl update emission into the decl emission loop.

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

10 years agoPGO: Change runtime prefix from pgo to profile
Duncan P. N. Exon Smith [Thu, 20 Mar 2014 20:00:41 +0000 (20:00 +0000)]
PGO: Change runtime prefix from pgo to profile

These functions are in the profile runtime.  PGO comes later.

Unfortunately, there's only room for 16 characters in a Darwin section,
so use __llvm_prf_ instead of __llvm_profile_ for section names.

<rdar://problem/15943240>

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

10 years agoRearrange serialization block order to put decl update emission into the same
Richard Smith [Thu, 20 Mar 2014 19:44:17 +0000 (19:44 +0000)]
Rearrange serialization block order to put decl update emission into the same
block as decl and type emission. This allows decl updates include statements
and expressions. No functionality change (but the generated PCM files are
incompatible with earlier versions of Clang).

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

10 years agoPGO: Remove explicit static initialization
Duncan P. N. Exon Smith [Thu, 20 Mar 2014 19:23:46 +0000 (19:23 +0000)]
PGO: Remove explicit static initialization

Remove the remaining explicit static initialization from translation
units, at least on Darwin.  Instead, create a use of __llvm_pgo_runtime,
which will pull in required code from compiler-rt.

After this commit (and its pair in compiler-rt), a user can define their
own __llvm_pgo_runtime to satisfy this undefined symbol and call the
functions in compiler-rt directly.

<rdar://problem/15943240>

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

10 years ago[-Wunreachable-code] Tweak isTrivialDoWhile() to handle implicit casts.
Ted Kremenek [Thu, 20 Mar 2014 18:47:53 +0000 (18:47 +0000)]
[-Wunreachable-code] Tweak isTrivialDoWhile() to handle implicit casts.

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

10 years agoRemove dead assignment dominated by a call to llvm_unreachable().
Ted Kremenek [Thu, 20 Mar 2014 18:47:50 +0000 (18:47 +0000)]
Remove dead assignment dominated by a call to llvm_unreachable().

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

10 years ago[analyzer] Fix a bad bug in reversePropagateInterstingSymbols() where only one subexp...
Ted Kremenek [Thu, 20 Mar 2014 18:47:47 +0000 (18:47 +0000)]
[analyzer] Fix a bad bug in reversePropagateInterstingSymbols() where only one subexpression of BinaryOperator would be explored.

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

10 years agoUse nullptr; no functionality change
Duncan P. N. Exon Smith [Thu, 20 Mar 2014 18:40:55 +0000 (18:40 +0000)]
Use nullptr; no functionality change

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

10 years agoCoding style fixup; no functionality change
Duncan P. N. Exon Smith [Thu, 20 Mar 2014 18:40:53 +0000 (18:40 +0000)]
Coding style fixup; no functionality change

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

10 years agoPrevent lookup of subframework modules by name without parent framework
Ben Langmuir [Thu, 20 Mar 2014 18:27:26 +0000 (18:27 +0000)]
Prevent lookup of subframework modules by name without parent framework

We were 'allowing' the following import
@import Sub;

where Sub is a subframework of Foo and we had a -F path inside
Foo.framework/Frameworks and no module map file for Sub. This would
later hit assertion failures in debug builds.

Now we should correctly diagnose this as a module not found error.

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