]> granicus.if.org Git - clang/log
clang
9 years agoUpdate Clang tests to handle explicitly typed gep changes in LLVM.
David Blaikie [Fri, 27 Feb 2015 19:18:17 +0000 (19:18 +0000)]
Update Clang tests to handle explicitly typed gep changes in LLVM.

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

9 years agoReland __leave tests (r230717 and r230720, reverted in r230740).
Nico Weber [Fri, 27 Feb 2015 16:40:43 +0000 (16:40 +0000)]
Reland __leave tests (r230717 and r230720, reverted in r230740).

The only change is that line 266 changed from
    // CHECK:  br label %[[except]]
to
    // CHECK:  br label %[[except:[^ ]*]]

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

9 years agoAdd __ARM_DWARF_EH__ to signify the use of Itanium ABI for unwind instructions.
Renato Golin [Fri, 27 Feb 2015 16:35:48 +0000 (16:35 +0000)]
Add __ARM_DWARF_EH__ to signify the use of Itanium ABI for unwind instructions.

Equally to NetBSD, Bitrig will be using .eh_frame unwinding on ARM.

Patch by Patrick Wildt.

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

9 years agoAMDGCN: Define cl_khr_fp64 when compiling OpenCL programs
Tom Stellard [Fri, 27 Feb 2015 15:10:19 +0000 (15:10 +0000)]
AMDGCN: Define cl_khr_fp64 when compiling OpenCL programs

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

9 years agoSilence an MSVC warning about not all control paths returning a value; NFC.
Aaron Ballman [Fri, 27 Feb 2015 13:55:58 +0000 (13:55 +0000)]
Silence an MSVC warning about not all control paths returning a value; NFC.

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

9 years agoclang-format: Make trailing commas in array inits force one per line.
Daniel Jasper [Fri, 27 Feb 2015 08:41:05 +0000 (08:41 +0000)]
clang-format: Make trailing commas in array inits force one per line.

Before:
  NSArray *array = @[ @"a", @"a", ];

After:
  NSArray *array = @[
    @"a",
    @"a",
  ];

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

9 years agoRevert r230717 (and subsequent r230720).
Daniel Jasper [Fri, 27 Feb 2015 08:16:32 +0000 (08:16 +0000)]
Revert r230717 (and subsequent r230720).

The tests keeps failing on build bots:
http://lab.llvm.org:8080/green/job/clang-stage2-configure-Rlto_check/2355/testReport/junit/Clang/CodeGen/exceptions_seh_leave_c/

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

9 years ago[X86] Remove pblendw and pblendd builtins that aren't being used by the intrinsic...
Craig Topper [Fri, 27 Feb 2015 06:54:25 +0000 (06:54 +0000)]
[X86] Remove pblendw and pblendd builtins that aren't being used by the intrinsic headers.

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

9 years ago[OPENMP] Codegen for "#pragma omp atomic write"
Alexey Bataev [Fri, 27 Feb 2015 06:33:30 +0000 (06:33 +0000)]
[OPENMP] Codegen for "#pragma omp atomic write"
For global reg lvalue - use regular store through global register.
For simple lvalue - use simple atomic store.
For bitfields, vector element, extended vector elements - the original value of the whole storage (for vector elements) or of some aligned value (for bitfields) is atomically read, the part of this value for the given lvalue is modified and then use atomic compare-and-exchange operation to try to atomically write modified value (if it was not modified).
Also, changes in this patch fix the bug for '#pragma omp atomic read' applied to extended vector elements.
Differential Revision: http://reviews.llvm.org/D7369

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

9 years ago[modules] Don't write out name lookup table entries merely because the module
Richard Smith [Fri, 27 Feb 2015 03:40:09 +0000 (03:40 +0000)]
[modules] Don't write out name lookup table entries merely because the module
happened to query them; only write them out if something new was added.

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

9 years agoMS ABI: Simplify the code which performs base adjustments
David Majnemer [Fri, 27 Feb 2015 02:38:02 +0000 (02:38 +0000)]
MS ABI: Simplify the code which performs base adjustments

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

9 years agoAdd last missing __leave test.
Nico Weber [Fri, 27 Feb 2015 02:26:14 +0000 (02:26 +0000)]
Add last missing __leave test.

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

9 years agoAdd another __leave test.
Nico Weber [Fri, 27 Feb 2015 01:58:08 +0000 (01:58 +0000)]
Add another __leave test.

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

9 years ago[modules] For an inheriting constructor, the inherited constructor is stored in
Richard Smith [Fri, 27 Feb 2015 01:57:00 +0000 (01:57 +0000)]
[modules] For an inheriting constructor, the inherited constructor is stored in
a map keyed off the canonical declaration. Don't try to set it if we're loading
some non-canonical merged declaration.

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

9 years ago[modules] When loading in multiple canonical definitions of a template,
Richard Smith [Fri, 27 Feb 2015 00:25:58 +0000 (00:25 +0000)]
[modules] When loading in multiple canonical definitions of a template,
accumulate the set of specializations rather than overwriting one list
with another.

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

9 years agoDon't crash on leaving nested __finally blocks through an EH edge.
Nico Weber [Thu, 26 Feb 2015 22:34:33 +0000 (22:34 +0000)]
Don't crash on leaving nested __finally blocks through an EH edge.

The __finally emission block tries to be clever by removing unused continuation
edges if there's an unconditional jump out of the __finally block. With
exception edges, the EH continuation edge isn't always unused though and we'd
crash in a few places.

Just don't be clever. That makes the IR for __finally blocks a bit longer in
some cases (hence small and behavior-preserving changes to existing tests), but
it makes no difference in general and it fixes the last crash from PR22553.

http://reviews.llvm.org/D7918

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

9 years agoWrap to 80 columns. No behavior change.
Nico Weber [Thu, 26 Feb 2015 20:43:00 +0000 (20:43 +0000)]
Wrap to 80 columns. No behavior change.

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

9 years agoAdd myself as a code owner for Microsoft C++ ABI code and general Windows support
Reid Kleckner [Thu, 26 Feb 2015 20:37:49 +0000 (20:37 +0000)]
Add myself as a code owner for Microsoft C++ ABI code and general Windows support

Reviewers: rsmith

Subscribers: cfe-commits

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

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

9 years agoWin64: Silently ignore __stdcall, __fastcall, and __thiscall
Reid Kleckner [Thu, 26 Feb 2015 19:43:46 +0000 (19:43 +0000)]
Win64: Silently ignore __stdcall, __fastcall, and __thiscall

MSVC doesn't warn on this. Users are expected to apply the WINAPI macro
to functions passed by pointer to the Win32 API, and this macro expands
to __stdcall. This means we end up with a lot of useless noisy warnings
about ignored calling conventions when compiling code with clang for
Win64.

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

9 years agoAdd -frtti/-fexceptions to some more tests that assume they're on
Filipe Cabecinhas [Thu, 26 Feb 2015 18:29:41 +0000 (18:29 +0000)]
Add -frtti/-fexceptions to some more tests that assume they're on

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

9 years agoAdd support for generating MIPS legacy NaN
Petar Jovanovic [Thu, 26 Feb 2015 18:19:22 +0000 (18:19 +0000)]
Add support for generating MIPS legacy NaN

Currently, the NaN values emitted for MIPS architectures do not cover
non-IEEE754-2008 compliant case. This change fixes the issue.

Patch by Vladimir Radosavljevic.

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

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

9 years agoPatch to prevent crash when default argument expression
Fariborz Jahanian [Thu, 26 Feb 2015 17:59:54 +0000 (17:59 +0000)]
Patch to prevent crash when default argument expression
is null due to its previous bad declaration, etc.
rdar://19871240

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

9 years ago[msan] Change track-origins default mode from 1 to 2.
Evgeniy Stepanov [Thu, 26 Feb 2015 15:59:30 +0000 (15:59 +0000)]
[msan] Change track-origins default mode from 1 to 2.

Change -fsanitize-memory-track-origins to be equivalent to
-fsanitize-memory-track-origins=2.

Track-origins=2 provides a lot more detailed reports at the cost of
some additional slowdown (ranging from none to, sometimes, 3x; ~3% average on
SPEC2006).

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

9 years agoclang-format: Make braced list formatting more consistent.
Daniel Jasper [Thu, 26 Feb 2015 11:46:29 +0000 (11:46 +0000)]
clang-format: Make braced list formatting more consistent.

Before:
  Aaaa aaaaaaaaaaa{
      {
       a, // +1 indent weird.
       b, // trailing comma signals one per line.
      },  // trailing comma signals one per line.
  };

After:
  Aaaa aaaaaaaaaaa{
      {
          a, // better!?
          b, // trailing comma signals one per line.
      },     // trailing comma signals one per line.
  };

Interesting that this apparently was entirely untested :-(.

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

9 years agoclang-format: Fix space of arrays of pointers to templated types.
Daniel Jasper [Thu, 26 Feb 2015 11:30:50 +0000 (11:30 +0000)]
clang-format: Fix space of arrays of pointers to templated types.

Before:
  vector<int>(*foo_)[6];

After:
  vector<int> (*foo_)[6];

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

9 years ago[OPENMP] Fixed codegen for directives without function outlining.
Alexey Bataev [Thu, 26 Feb 2015 10:27:34 +0000 (10:27 +0000)]
[OPENMP] Fixed codegen for directives without function outlining.
Fixed crash on codegen for directives like 'omp for', 'omp single' etc. inside of the 'omp parallel', 'omp task' etc. regions.

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

9 years agoclang-format: Allow breaking after "else if(" as a last resort.
Daniel Jasper [Thu, 26 Feb 2015 09:49:08 +0000 (09:49 +0000)]
clang-format: Allow breaking after "else if(" as a last resort.

This isn't generally nice, but better than violating the column limit.

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

9 years ago[X86] Remove the blendps/blendpd builtins. They aren't used by the intrinsic headers...
Craig Topper [Thu, 26 Feb 2015 08:09:05 +0000 (08:09 +0000)]
[X86] Remove the blendps/blendpd builtins. They aren't used by the intrinsic headers. We use appropriate shuffle vector instead.

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

9 years ago[X86] Correct immediate range checking for blendps/blendpd/blendpd256 builtins.
Craig Topper [Thu, 26 Feb 2015 06:23:15 +0000 (06:23 +0000)]
[X86] Correct immediate range checking for blendps/blendpd/blendpd256 builtins.

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

9 years ago[Mips] Handle -mips32r[3|5] / -mips64r[3|5] options while selecting lib/headers paths
Simon Atanasyan [Thu, 26 Feb 2015 04:45:57 +0000 (04:45 +0000)]
[Mips] Handle -mips32r[3|5] / -mips64r[3|5] options while selecting lib/headers paths

There is no supported toolchain which provides headers / libs / object
files specific to the mips32r[3|5] and mips64r[3|5] ISA. So select "r2"
specific folders when they are available.

http://reviews.llvm.org/D7879

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

9 years agoCGDebugInfo: Use DIImportedEntity default constructor, NFC
Duncan P. N. Exon Smith [Thu, 26 Feb 2015 04:44:27 +0000 (04:44 +0000)]
CGDebugInfo: Use DIImportedEntity default constructor, NFC

Use the newly minted `DIImportedEntity` default constructor (r230609)
rather than explicitly specifying `nullptr`.  The latter will become
ambiguous when the new debug info hierarchy is committed, since we'll
have both of the following:

    explicit DIImportedEntity(const MDNode *);
    DIImportedEntity(const MDImportedEntity *);

(Currently we just have the former.)

A default constructor is just as clear.

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

9 years agoUpdate assumption in template diffing about integer template arguments.
Richard Trieu [Thu, 26 Feb 2015 02:40:48 +0000 (02:40 +0000)]
Update assumption in template diffing about integer template arguments.

Fix for PR22017.  Integer template arguments are automatically bit extended to
the size of the integer type.  In template diffing, evaluated expressions were
not having their results extending, leading to comparing two APSInt's with
different widths.  Apply the proper bit extending when evaluating template
arguments.  This mainly affected bool template arguments.

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

9 years agoSplit StaticAnalyzer module into three to fix a cyclic dependency. Dependencies
Richard Smith [Thu, 26 Feb 2015 01:11:08 +0000 (01:11 +0000)]
Split StaticAnalyzer module into three to fix a cyclic dependency. Dependencies
are now:

  FrontendTool -> StaticAnalyzer/Frontend -> Frontend -> StaticAnalyzer/Core

The final dependency edge here is probably removable: AnalyzerOptions (and
Analyses.def) should probably live in Basic rather than StaticAnalyzer/Core.

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

9 years agoclang-cl: Expose -fcolor-diagnostics and -fansi-escape-codes
Reid Kleckner [Thu, 26 Feb 2015 01:10:15 +0000 (01:10 +0000)]
clang-cl: Expose -fcolor-diagnostics and -fansi-escape-codes

They don't conflict with MSVC flags.

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

9 years agoSema: __assume with side effects shouldn't result in invalid AST nodes
David Majnemer [Thu, 26 Feb 2015 00:57:33 +0000 (00:57 +0000)]
Sema: __assume with side effects shouldn't result in invalid AST nodes

We'd diagnose an __assume expression which contained a function call.
This would result in us wrongly returning ExprError, causing mysterious
failures later on.

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

9 years agoSilence unused variable warning in NDEBUG build
Reid Kleckner [Thu, 26 Feb 2015 00:33:41 +0000 (00:33 +0000)]
Silence unused variable warning in NDEBUG build

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

9 years agoFix a [-Werror,-Wreorder] initialization ordering error.
Eric Christopher [Thu, 26 Feb 2015 00:29:54 +0000 (00:29 +0000)]
Fix a [-Werror,-Wreorder] initialization ordering error.

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

9 years agodocs: Document CFI padding and all-ones optimizations. Link to viewvc.
Peter Collingbourne [Thu, 26 Feb 2015 00:18:04 +0000 (00:18 +0000)]
docs: Document CFI padding and all-ones optimizations. Link to viewvc.

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

9 years agoAdd -fuse-line-directive flag to control usage of #line with -E
Reid Kleckner [Thu, 26 Feb 2015 00:17:25 +0000 (00:17 +0000)]
Add -fuse-line-directive flag to control usage of #line with -E

Currently -fms-extensions controls this behavior, which doesn't make
much sense. It means we can't identify what is and isn't a system header
when compiling our own preprocessed output, because #line doesn't
represent this information.

If someone is feeding Clang's preprocessed output to another compiler,
they can use this flag.

Fixes PR20553.

Reviewers: rsmith

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

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

9 years agoRemove some unused includes of llvm/IR headers from parts of Clang that really
Richard Smith [Thu, 26 Feb 2015 00:01:03 +0000 (00:01 +0000)]
Remove some unused includes of llvm/IR headers from parts of Clang that really
shouldn't depend on LLVM IR.

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

9 years agoImprovement on sized deallocation from r230160:
Larisse Voufo [Wed, 25 Feb 2015 23:48:43 +0000 (23:48 +0000)]
Improvement on sized deallocation from r230160:
Do not declare sized deallocation functions dependently on whether it is found in global scope. Instead, enforce the branching in emitted code by (1) declaring the functions extern_weak and (2) emitting sized delete expressions as a branching between both forms delete.

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

9 years agoFix typo.
Larisse Voufo [Wed, 25 Feb 2015 23:48:35 +0000 (23:48 +0000)]
Fix typo.

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

9 years agoMove -fdefine-sized-deallocation and -fno-sized-deallocation options from driver...
Larisse Voufo [Wed, 25 Feb 2015 23:48:25 +0000 (23:48 +0000)]
Move -fdefine-sized-deallocation and -fno-sized-deallocation options from driver into CC1 for now.

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

9 years agoUBSan: Use the correct function prologue for x32.
Peter Collingbourne [Wed, 25 Feb 2015 23:18:42 +0000 (23:18 +0000)]
UBSan: Use the correct function prologue for x32.

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

9 years agoMS ABI: Turn throw into std::terminate for now, make try/catch "work"
David Majnemer [Wed, 25 Feb 2015 23:01:21 +0000 (23:01 +0000)]
MS ABI: Turn throw into std::terminate for now, make try/catch "work"

This lets us compile programs which make use of exceptional constructs
statically without executing any of them dynamically.

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

9 years ago[modules] Even if we already have a definition of a class, loading in another
Richard Smith [Wed, 25 Feb 2015 22:20:13 +0000 (22:20 +0000)]
[modules] Even if we already have a definition of a class, loading in another
one can give us more lookup results (due to implicit special members). Be sure
to complete the redecl chain for every kind of DeclContext before performing a
lookup into it, rather than only doing so for NamespaceDecls.

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

9 years agoRemove non-existent file from module map.
Richard Smith [Wed, 25 Feb 2015 20:20:39 +0000 (20:20 +0000)]
Remove non-existent file from module map.

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

9 years agoAllow (Object *)kMyGlobalCFObj casts without bridging
Ben Langmuir [Wed, 25 Feb 2015 20:09:06 +0000 (20:09 +0000)]
Allow (Object *)kMyGlobalCFObj casts without bridging

Previously we allowed these casts only for constants declared in system
headers, which we assume are retain/release-neutral. Now also allow them
for constants in user headers, treating them as +0.  Practically, this
means that we will now allow:
id x = (id)kMyGlobalConst;

But unlike with system headers we cannot mix them with +1 values:
id y = (id)(b ? kMyGlobalConst : [Obj newValAtPlusOne]); // error
id z = (id)(b ? kSystemGlobalConst: [Obj newValAtPlusOne]); // OK

Thanks to John for suggesting this improvement.

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

9 years agoAdd missing #include found by modules buildbot.
Richard Smith [Wed, 25 Feb 2015 19:55:49 +0000 (19:55 +0000)]
Add missing #include found by modules buildbot.

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

9 years agoclang-cl: Ignore /Fd silently
Reid Kleckner [Wed, 25 Feb 2015 19:17:50 +0000 (19:17 +0000)]
clang-cl: Ignore /Fd silently

While it's true that we don't create the PDB as requested on the command
line, this is a well-documented limitation. Warning about it doesn't
help people using legacy build systems with clang-cl, and it makes the
clang-cl self-host very noisy.

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

9 years agoReland (2x) r230314, "Fix codegen for virtual methods that are (re-) exported from...
Reid Kleckner [Wed, 25 Feb 2015 19:17:48 +0000 (19:17 +0000)]
Reland (2x) r230314, "Fix codegen for virtual methods that are (re-) exported from multiple modules."

This reverts commits r230477 and r230478.

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

9 years agoReland r230446, "MS ABI: Try to respect external AST source record layouts"
Reid Kleckner [Wed, 25 Feb 2015 19:17:45 +0000 (19:17 +0000)]
Reland r230446, "MS ABI: Try to respect external AST source record layouts"

It broke test/PCH/headersearch.cpp because it was using -Wpadding, which
only works for Itanium layout. Before this commit, we would use Itanium
record layout when using PCH, which is crazy. Now that the test uses an
explicit Itanium triple, we can reland.

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

9 years agoUse Itanium triple in test using -Wpadding
Reid Kleckner [Wed, 25 Feb 2015 19:04:51 +0000 (19:04 +0000)]
Use Itanium triple in test using -Wpadding

-Wpadding is not implemented in the Microsoft record layout builder.
This test only passes on Windows because PCH forces us to use the
Itanium record layout builder. I'm about to fix that, so change the
test to not rely on that ridiculous behavior.

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

9 years agoMake __leave test pass in -Asserts builds.
Nico Weber [Wed, 25 Feb 2015 17:44:04 +0000 (17:44 +0000)]
Make __leave test pass in -Asserts builds.

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

9 years agoSema: Parenthesized bound destructor member expressions can be called
David Majnemer [Wed, 25 Feb 2015 17:36:15 +0000 (17:36 +0000)]
Sema: Parenthesized bound destructor member expressions can be called

We would wrongfully reject (a.~A)() in both the destructor and
pseudo-destructor cases.

This fixes PR22668.

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

9 years agoReland r230460 with a test fix for -Asserts builds.
Nico Weber [Wed, 25 Feb 2015 16:25:00 +0000 (16:25 +0000)]
Reland r230460 with a test fix for -Asserts builds.

Original CL description:
Produce less broken basic block sequences for __finally blocks.

The way cleanups (such as PerformSEHFinally) get emitted is that codegen
generates some initialization code, then calls the cleanup's Emit() with the
insertion point set to a good place, then the cleanup is supposed to emit its
stuff, and then codegen might tack in a jump or similar to where the insertion
point is after the cleanup.

The PerformSEHFinally cleanup tries to just stash away the block it's supposed
to codegen into, and then does codegen later, into that stashed block.  However,
after codegen'ing the __finally block, it used to set the insertion point to
the finally's continuation block (where the __finally cleanup goes when its body
is completed after regular, non-exceptional control flow).  That's not correct,
as that block can (and generally does) already ends in a jump.  Instead,
remember the insertion point that was current before the __finally got emitted,
and restore that.

Fixes two of the crashes in PR22553.

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

9 years agoAdd support for inserting ArrayRef<FixItHint> into DiagnosticBuilder.
Alexander Kornienko [Wed, 25 Feb 2015 14:40:56 +0000 (14:40 +0000)]
Add support for inserting ArrayRef<FixItHint> into DiagnosticBuilder.

This is going to be needed in clang-tidy as more checks add complex fixits.

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

9 years agoFix UTF8 chars to ASCII.
NAKAMURA Takumi [Wed, 25 Feb 2015 11:02:00 +0000 (11:02 +0000)]
Fix UTF8 chars to ASCII.

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

9 years agoWhitespace.
NAKAMURA Takumi [Wed, 25 Feb 2015 10:50:06 +0000 (10:50 +0000)]
Whitespace.

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

9 years agoRevert r230448, "Reland r230314 "Fix codegen for virtual methods that are (re-) expor...
NAKAMURA Takumi [Wed, 25 Feb 2015 10:49:59 +0000 (10:49 +0000)]
Revert r230448, "Reland r230314 "Fix codegen for virtual methods that are (re-) exported from multiple modules."", since I have reverted r230446.

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

9 years agoWhitespace.
NAKAMURA Takumi [Wed, 25 Feb 2015 10:32:20 +0000 (10:32 +0000)]
Whitespace.

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

9 years agoRevert r230446, "MS ABI: Try to respect external AST source record layouts"
NAKAMURA Takumi [Wed, 25 Feb 2015 10:32:13 +0000 (10:32 +0000)]
Revert r230446, "MS ABI: Try to respect external AST source record layouts"

It fails on Clang::PCH/headersearch.cpp for targeting msvc.

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

9 years agoclang-format: Fix spacing for function with ref-qualification ..
Daniel Jasper [Wed, 25 Feb 2015 10:30:06 +0000 (10:30 +0000)]
clang-format: Fix spacing for function with ref-qualification ..

.. when using SpacesInCStyleCastParentheses != SpacesInParentheses.

Before:
  FormatStyle Spaces = getLLVMStyle();
  Deleted &operator=(const Deleted &)& = default;

  Spaces.SpacesInParentheses = true;
  Deleted(const Deleted &)& = default;

  Spaces.SpacesInCStyleCastParentheses = true;
  Spaces.SpacesInParentheses= false;
  Deleted( const Deleted & )& = default;

After:
  FormatStyle Spaces = getLLVMStyle();
  Deleted &operator=(const Deleted &)& = default;;

  Spaces.SpacesInParentheses= true;
  Deleted( const Deleted & )& = default;

  Spaces.SpacesInCStyleCastParentheses = true;
  Spaces.SpacesInParentheses= false;
  Deleted(const Deleted &)& = default;

Patch by Jean-Philippe Dufraigne. Thank you!

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

9 years agoRevert "Produce less broken basic block sequences for __finally blocks."
Daniel Jasper [Wed, 25 Feb 2015 10:07:14 +0000 (10:07 +0000)]
Revert "Produce less broken basic block sequences for __finally blocks."

The test is broken on buildbots:
http://lab.llvm.org:8080/green/job/clang-stage2-configure-Rlto_check/2279/

This reverts commit adda738b6dc533c42db5f5f5b31344098a3aba7d.

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

9 years ago[OPENMP] Rename methods of OpenMPRuntime class. NFC.
Alexey Bataev [Wed, 25 Feb 2015 08:32:46 +0000 (08:32 +0000)]
[OPENMP] Rename methods of OpenMPRuntime class. NFC.

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

9 years ago[Mips] Support mips-r6 path suffix for Adnroid MIPS toolchain
Simon Atanasyan [Wed, 25 Feb 2015 07:31:12 +0000 (07:31 +0000)]
[Mips] Support mips-r6 path suffix for Adnroid MIPS toolchain

This path suffix is used if user provides the -mips32r6 command line
options.

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

9 years agoRestores r228382, which was reverted in r228406.
Sameer Sahasrabuddhe [Wed, 25 Feb 2015 05:48:23 +0000 (05:48 +0000)]
Restores r228382, which was reverted in r228406.

The original commit failed to handle "shift assign" (<<=), which
broke the test mentioned in r228406. This is now fixed and the
test added to the lit tests under SemaOpenCL.

*** Original commit message from r228382 ***

OpenCL: handle shift operator with vector operands

Introduce a number of checks:
1. If LHS is a scalar, then RHS cannot be a vector.
2. Operands must be of integer type.
3. If both are vectors, then the number of elements must match.

Relax the requirement for "usual arithmetic conversions":
When LHS is a vector, a scalar RHS can simply be expanded into a
vector; OpenCL does not require that its rank be lower than the LHS.
For example, the following code is not an error even if the implicit
type of the constant literal is "int".

  char2 foo(char2 v) { return v << 1; }

Consolidate existing tests under CodeGenOpenCL, and add more tests
under SemaOpenCL.

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

9 years agoProduce less broken basic block sequences for __finally blocks.
Nico Weber [Wed, 25 Feb 2015 04:05:18 +0000 (04:05 +0000)]
Produce less broken basic block sequences for __finally blocks.

The way cleanups (such as PerformSEHFinally) get emitted is that codegen
generates some initialization code, then calls the cleanup's Emit() with the
insertion point set to a good place, then the cleanup is supposed to emit its
stuff, and then codegen might tack in a jump or similar to where the insertion
point is after the cleanup.

The PerformSEHFinally cleanup tries to just stash away the block it's supposed
to codegen into, and then does codegen later, into that stashed block.  However,
after codegen'ing the __finally block, it used to set the insertion point to
the finally's continuation block (where the __finally cleanup goes when its body
is completed after regular, non-exceptional control flow).  That's not correct,
as that block can (and generally does) already ends in a jump.  Instead,
remember the insertion point that was current before the __finally got emitted,
and restore that.

Fixes two of the crashes in PR22553.

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

9 years agoAdd comments for two CleanupKinds.
Nico Weber [Wed, 25 Feb 2015 03:58:36 +0000 (03:58 +0000)]
Add comments for two CleanupKinds.

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

9 years agodocs: Document optimizations in control flow integrity design doc.
Peter Collingbourne [Wed, 25 Feb 2015 03:35:03 +0000 (03:35 +0000)]
docs: Document optimizations in control flow integrity design doc.

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

9 years agoRevert "Wrap clang module files in a Mach-O, ELF, or COFF container."
Adrian Prantl [Wed, 25 Feb 2015 02:44:04 +0000 (02:44 +0000)]
Revert "Wrap clang module files in a Mach-O, ELF, or COFF container."

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

9 years agoRevert "Add a missing target requirement."
Adrian Prantl [Wed, 25 Feb 2015 02:43:38 +0000 (02:43 +0000)]
Revert "Add a missing target requirement."

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

9 years agoFix bots failing on an explicit triple
Reid Kleckner [Wed, 25 Feb 2015 02:32:00 +0000 (02:32 +0000)]
Fix bots failing on an explicit triple

Why do we need a registered target for this?

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

9 years agoDon't crash on missing '{' after __except or __finally, PR22687.
Nico Weber [Wed, 25 Feb 2015 02:22:06 +0000 (02:22 +0000)]
Don't crash on missing '{' after __except or __finally, PR22687.

Also add some general test/Parser coverage for SEH blocks.

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

9 years agoReland r230314 "Fix codegen for virtual methods that are (re-) exported from multiple...
Reid Kleckner [Wed, 25 Feb 2015 02:19:56 +0000 (02:19 +0000)]
Reland r230314 "Fix codegen for virtual methods that are (re-) exported from multiple modules."

This reverts the revert from commit r230406.

The changes in r230445 and r230446 make the test pass on Windows now.

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

9 years agoMS ABI: Add triple to test relying on key functions
Reid Kleckner [Wed, 25 Feb 2015 02:16:15 +0000 (02:16 +0000)]
MS ABI: Add triple to test relying on key functions

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

9 years agoMS ABI: Try to respect external AST source record layouts
Reid Kleckner [Wed, 25 Feb 2015 02:16:09 +0000 (02:16 +0000)]
MS ABI: Try to respect external AST source record layouts

Covered by existing tests in test/CodeGen/override-layout.c and
test/CodeGenCXX/override-layout.cpp. Seriously, they found real bugs in
my code. :)

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

9 years agoAdd missing MD canonicalization to MS vtable builder
Reid Kleckner [Wed, 25 Feb 2015 02:16:02 +0000 (02:16 +0000)]
Add missing MD canonicalization to MS vtable builder

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

9 years agoAdd a missing target requirement.
Adrian Prantl [Wed, 25 Feb 2015 01:52:05 +0000 (01:52 +0000)]
Add a missing target requirement.

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

9 years agoRemove slow and apparently pointless updating of all identifiers at the start
Richard Smith [Wed, 25 Feb 2015 01:45:32 +0000 (01:45 +0000)]
Remove slow and apparently pointless updating of all identifiers at the start
of writing out an AST file.

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

9 years agoFold ParseSEHTryBlockCommon() into its only caller. No behavior change.
Nico Weber [Wed, 25 Feb 2015 01:43:27 +0000 (01:43 +0000)]
Fold ParseSEHTryBlockCommon() into its only caller. No behavior change.

ParseCXXTryBlockCommon() makes sense because it has two callers due to
function try blocks.  There are no SEH function try blocks.

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

9 years agoWrap clang module files in a Mach-O, ELF, or COFF container.
Adrian Prantl [Wed, 25 Feb 2015 01:31:45 +0000 (01:31 +0000)]
Wrap clang module files in a Mach-O, ELF, or COFF container.
This is a necessary prerequisite for debugging with modules.
The .pcm files become containers that hold the serialized AST which allows
us to store debug information in the module file that can be shared by all
object files that were built importing the module.

This reapplies r230044 with a fixed configure+make build and updated
dependencies and testcase requirements. Over the last iteration this
version adds
- missing target requirements for testcases that specify an x86 triple,
- a missing clangCodeGen.a dependency to libClang.a in the make build.

rdar://problem/19104245

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

9 years agoMake RedeclarableResult's ownership-transferring constructor be a move
Richard Smith [Wed, 25 Feb 2015 01:11:29 +0000 (01:11 +0000)]
Make RedeclarableResult's ownership-transferring constructor be a move
constructor.

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

9 years ago[modules] Fix a bug that would result in a build with P paths through a module
Richard Smith [Wed, 25 Feb 2015 00:56:02 +0000 (00:56 +0000)]
[modules] Fix a bug that would result in a build with P paths through a module
graph with M modules to take O(P) time, not just O(M) time, when using explicit
module builds.

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

9 years agoRevert r230314, "Fix codegen for virtual methods that are (re-) exported from multipl...
NAKAMURA Takumi [Wed, 25 Feb 2015 00:18:22 +0000 (00:18 +0000)]
Revert r230314, "Fix codegen for virtual methods that are (re-) exported from multiple modules."

It crashes for targeting (i686|x86_64)-win32.

  clang: clang/lib/AST/VTableBuilder.cpp:142: {anonymous}::FinalOverriders::OverriderInfo {anonymous}::FinalOverriders::getOverrider(const clang::CXXMethodDecl*, clang::CharUnits) const: Assertion `OverridersMap.count(std::make_pair(MD, BaseOffset)) && "Did not find overrider!"' failed.

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

9 years agoclang-format: Change location of stashed token
Jacques Pienaar [Tue, 24 Feb 2015 23:23:24 +0000 (23:23 +0000)]
clang-format: Change location of stashed token

Commit of patch in http://reviews.llvm.org/D7871

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

9 years agoInstrProf: Simplify a couple of tests after r230383
Justin Bogner [Tue, 24 Feb 2015 21:49:28 +0000 (21:49 +0000)]
InstrProf: Simplify a couple of tests after r230383

Most of the checks in these two tests were actually testing the
behaviour of the instrprof LLVM pass. Now that we're testing that
specifically in LLVM's test suite, it's better if we only test the
frontend's behaviour here.

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

9 years agoCUDA: Add option to allow host device functions to call host functions
Jacques Pienaar [Tue, 24 Feb 2015 21:45:33 +0000 (21:45 +0000)]
CUDA: Add option to allow host device functions to call host functions

Commiting code from review http://reviews.llvm.org/D7841

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

9 years agoPR22673 again: diagnose use of the used decl, not the found decl. This is also
Richard Smith [Tue, 24 Feb 2015 21:44:43 +0000 (21:44 +0000)]
PR22673 again: diagnose use of the used decl, not the found decl. This is also
wrong (DiagnoseUseOfDecl should take both), but it's more consistent with what
we do in other places.

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

9 years agoPR22673: Don't forget to check a constructor for deletedness when we use it to
Richard Smith [Tue, 24 Feb 2015 21:16:19 +0000 (21:16 +0000)]
PR22673: Don't forget to check a constructor for deletedness when we use it to
implicitly construct a temporary in a reference binding.

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

9 years agoAdd test that we reject invocations of deleted constructors. One of these
Richard Smith [Tue, 24 Feb 2015 20:41:36 +0000 (20:41 +0000)]
Add test that we reject invocations of deleted constructors. One of these
constructs is not rejected by should be; that's PR22673.

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

9 years agoMS extensions: Properly diagnose address of MS property decl
Reid Kleckner [Tue, 24 Feb 2015 20:29:40 +0000 (20:29 +0000)]
MS extensions: Properly diagnose address of MS property decl

Summary: Fixes PR22671.

Reviewers: rsmith

Subscribers: cfe-commits

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

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

9 years agoARM: Simplify PCS handling.
Tim Northover [Tue, 24 Feb 2015 17:22:40 +0000 (17:22 +0000)]
ARM: Simplify PCS handling.

The backend should now be able to handle all AAPCS rules based on argument
type, which means Clang no longer has to duplicate the register-counting logic
and the CodeGen can be significantly simplified.

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

9 years agoCommit patch for PR19649. Set the correct sign of wide character for literals based...
Michael Wong [Tue, 24 Feb 2015 13:34:20 +0000 (13:34 +0000)]
Commit patch for PR19649. Set the correct sign of wide character for literals based on underlying type of wchar_t.
Reviewed:
http://reviews.llvm.org/D7559
Patch by Rachel Craig; Test cases by Hubert Tong.

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

9 years ago[OPENMP] Update codegen for 'omp flush' directive.
Alexey Bataev [Tue, 24 Feb 2015 12:55:09 +0000 (12:55 +0000)]
[OPENMP] Update codegen for 'omp flush' directive.
__kmpc_omp_flush() runtime library now has only one argument and is not a vararg
anymore. This update makes the codegen compatible with these changes.

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

9 years ago[WinX86_64 ABI] Treat C99 _Complex as a struct
Michael Kuperstein [Tue, 24 Feb 2015 09:35:58 +0000 (09:35 +0000)]
[WinX86_64 ABI] Treat C99 _Complex as a struct

MSVC does not support C99 _Complex.
ICC, however, does support it on windows x86_64, and treats it, for purposes of parameter passing, as equivalent to a struct containing two fields (for the real and imaginary part).

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

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

9 years agoFix codegen for virtual methods that are (re-) exported from multiple modules.
Manuel Klimek [Tue, 24 Feb 2015 09:06:28 +0000 (09:06 +0000)]
Fix codegen for virtual methods that are (re-) exported from multiple modules.

Fixes multiple crashes where a non-canonical decl would be used as key
in a lookup.

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

9 years agoRevert "Wrap clang module files in a Mach-O, ELF, or COFF container."
Adrian Prantl [Tue, 24 Feb 2015 05:14:17 +0000 (05:14 +0000)]
Revert "Wrap clang module files in a Mach-O, ELF, or COFF container."

This reverts commit r230305.
Off to fix another round of missing dependencies on various platforms.

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

9 years agoDon't load Framework module.map files when searching subdirectories
Ben Langmuir [Tue, 24 Feb 2015 04:58:15 +0000 (04:58 +0000)]
Don't load Framework module.map files when searching subdirectories

This would cause frameworks to have spurious "redefinition" errors if
they had both a (legacy) "module.map" and a (new) "module.modulemap" file and we
happened to do a sub-directory search in that directory using a
non-framework include path (e.g. -Ifoo/ -Ffoo/).  For migration
purposes it's very handy that the compiler will prefer the new spelling
of the filename and not look at the old one if it doesn't need to.

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

9 years agoWrap clang module files in a Mach-O, ELF, or COFF container.
Adrian Prantl [Tue, 24 Feb 2015 04:25:59 +0000 (04:25 +0000)]
Wrap clang module files in a Mach-O, ELF, or COFF container.
This is a necessary prerequisite for debugging with modules.
The .pcm files become containers that hold the serialized AST which allows
us to store debug information in the module file that can be shared by all
object files that were built importing the module.

rdar://problem/19104245

This reapplies r230044 with a fixed configure+make build and updated
dependencies. Take 3.

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