[llvm-branch-commits] [cfe-branch] r278817 - Merging r278763:
Author: hans
Date: Tue Aug 16 11:19:18 2016
New Revision: 278817
URL: http://llvm.org/viewvc/llvm-project?rev=278817&view=rev
Log:
Merging r278763:
r278763 | rsmith | 2016-08-15 17:13:47 -0700 (Mon, 15 Aug 2016) | 5 lines
PR28978: If we need overload resolution for the move constructor of an
anonymous union member of a class, we need overload resolution for the move
constructor of the class itself too; we can't rely on Sema to do the right
thing for us for anonymous union types.
Modified:
cfe/branches/release_39/ (props changed)
cfe/branches/release_39/lib/AST/DeclCXX.cpp
cfe/branches/release_39/test/CXX/special/class.copy/p11.0x.move.cpp
Propchange: cfe/branches/release_39/
--
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Aug 16 11:19:18 2016
@@ -1,4 +1,4 @@
/cfe/branches/type-system-rewrite:134693-134817
-/cfe/trunk:275880,275967,276102,276350,276361,276473,276653,276716,276887,276891,276900,276979,276983,277095,277138,277141,277221,277307,277522,277743,277783,277796-277797,277866,277889,277900,278139,278156,278234-278235,278393,278395
+/cfe/trunk:275880,275967,276102,276350,276361,276473,276653,276716,276887,276891,276900,276979,276983,277095,277138,277141,277221,277307,277522,277743,277783,277796-277797,277866,277889,277900,278139,278156,278234-278235,278393,278395,278763
/cfe/trunk/test:170344
/cfe/trunk/test/SemaTemplate:126920
Modified: cfe/branches/release_39/lib/AST/DeclCXX.cpp
URL:
http://llvm.org/viewvc/llvm-project/cfe/branches/release_39/lib/AST/DeclCXX.cpp?rev=278817&r1=278816&r2=278817&view=diff
==
--- cfe/branches/release_39/lib/AST/DeclCXX.cpp (original)
+++ cfe/branches/release_39/lib/AST/DeclCXX.cpp Tue Aug 16 11:19:18 2016
@@ -807,6 +807,17 @@ void CXXRecordDecl::addedMember(Decl *D)
data().DefaultedDestructorIsDeleted = true;
}
+// For an anonymous union member, our overload resolution will perform
+// overload resolution for its members.
+if (Field->isAnonymousStructOrUnion()) {
+ data().NeedOverloadResolutionForMoveConstructor |=
+ FieldRec->data().NeedOverloadResolutionForMoveConstructor;
+ data().NeedOverloadResolutionForMoveAssignment |=
+ FieldRec->data().NeedOverloadResolutionForMoveAssignment;
+ data().NeedOverloadResolutionForDestructor |=
+ FieldRec->data().NeedOverloadResolutionForDestructor;
+}
+
// C++0x [class.ctor]p5:
// A default constructor is trivial [...] if:
//-- for all the non-static data members of its class that are of
Modified: cfe/branches/release_39/test/CXX/special/class.copy/p11.0x.move.cpp
URL:
http://llvm.org/viewvc/llvm-project/cfe/branches/release_39/test/CXX/special/class.copy/p11.0x.move.cpp?rev=278817&r1=278816&r2=278817&view=diff
==
--- cfe/branches/release_39/test/CXX/special/class.copy/p11.0x.move.cpp
(original)
+++ cfe/branches/release_39/test/CXX/special/class.copy/p11.0x.move.cpp Tue Aug
16 11:19:18 2016
@@ -4,6 +4,9 @@ struct Trivial {};
struct NonTrivial {
NonTrivial(NonTrivial&&); // expected-note{{copy constructor is implicitly
deleted}}
};
+struct DeletedCopy {
+ DeletedCopy(const DeletedCopy&) = delete;
+};
// A defaulted move constructor for a class X is defined as deleted if X has:
@@ -22,6 +25,15 @@ struct DeletedNTVariant2 {
};
DeletedNTVariant2::DeletedNTVariant2(DeletedNTVariant2&&) = default; //
expected-error{{would delete}}
+// Note, move constructor is not a candidate because it is deleted.
+template struct DeletedNTVariant3 { // expected-note 2{{default}}
expected-note 2{{copy}}
+ union {
+T NT;
+ };
+};
+extern DeletedNTVariant3 dntv3a(0); // expected-error {{no
matching}}
+extern DeletedNTVariant3 dntv3a(0); // expected-error {{no
matching}}
+
// -- a non-static data member of class type M (or array thereof) that cannot
be
//copied because overload resolution results in an ambiguity or a function
//that is deleted or inaccessible
___
llvm-branch-commits mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
[llvm-branch-commits] [llvm-branch] r278827 - Merging r278575 (with changes to the test):
Author: hans
Date: Tue Aug 16 12:51:12 2016
New Revision: 278827
URL: http://llvm.org/viewvc/llvm-project?rev=278827&view=rev
Log:
Merging r278575 (with changes to the test):
r278575 | haicheng | 2016-08-12 16:13:38 -0700 (Fri, 12 Aug 2016) | 6 lines
Reapply [BranchFolding] Restrict tail merging loop blocks after MBP
Fixed a bug in the test case.
To fix PR28104, this patch restricts tail merging to blocks that belong to the
same loop after MBP.
I had to adjust the test as it wasn't passing on the branch, presumably
due to different machine block placement.
Added:
llvm/branches/release_39/test/CodeGen/X86/tail-merge-after-mbp.ll
- copied, changed from r278575,
llvm/trunk/test/CodeGen/X86/tail-merge-after-mbp.ll
Modified:
llvm/branches/release_39/ (props changed)
llvm/branches/release_39/lib/CodeGen/BranchFolding.cpp
llvm/branches/release_39/test/CodeGen/ARM/arm-and-tst-peephole.ll
Propchange: llvm/branches/release_39/
--
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Aug 16 12:51:12 2016
@@ -1,3 +1,3 @@
/llvm/branches/Apple/Pertwee:110850,110961
/llvm/branches/type-system-rewrite:133420-134817
-/llvm/trunk:155241,275868-275870,275879,275898,275928,275935,275946,275978,275981,276015,276051,276077,276109,276119,276181,276209,276236-276237,276358,276364,276368,276389,276435,276438,276479,276510,276648,276676,276712,276740,276823,276956,276980,277093,277114,277135,277371,277399,277500,277504,277625,277691,277693,23,278002,278086,278133,278157,278370,278413,278558,278569,278573,278584
+/llvm/trunk:155241,275868-275870,275879,275898,275928,275935,275946,275978,275981,276015,276051,276077,276109,276119,276181,276209,276236-276237,276358,276364,276368,276389,276435,276438,276479,276510,276648,276676,276712,276740,276823,276956,276980,277093,277114,277135,277371,277399,277500,277504,277625,277691,277693,23,278002,278086,278133,278157,278370,278413,278558,278569,278573,278575,278584
Modified: llvm/branches/release_39/lib/CodeGen/BranchFolding.cpp
URL:
http://llvm.org/viewvc/llvm-project/llvm/branches/release_39/lib/CodeGen/BranchFolding.cpp?rev=278827&r1=278826&r2=278827&view=diff
==
--- llvm/branches/release_39/lib/CodeGen/BranchFolding.cpp (original)
+++ llvm/branches/release_39/lib/CodeGen/BranchFolding.cpp Tue Aug 16 12:51:12
2016
@@ -996,6 +996,24 @@ bool BranchFolder::TailMergeBlocks(Machi
MachineBasicBlock *IBB = &*I;
MachineBasicBlock *PredBB = &*std::prev(I);
MergePotentials.clear();
+MachineLoop *ML;
+
+// Bail if merging after placement and IBB is the loop header because
+// -- If merging predecessors that belong to the same loop as IBB, the
+// common tail of merged predecessors may become the loop top if block
+// placement is called again and the predecessors may branch to this common
+// tail and require more branches. This can be relaxed if
+// MachineBlockPlacement::findBestLoopTop is more flexible.
+// --If merging predecessors that do not belong to the same loop as IBB,
the
+// loop info of IBB's loop and the other loops may be affected. Calling the
+// block placement again may make big change to the layout and eliminate
the
+// reason to do tail merging here.
+if (AfterBlockPlacement && MLI) {
+ ML = MLI->getLoopFor(IBB);
+ if (ML && IBB == ML->getHeader())
+continue;
+}
+
for (MachineBasicBlock *PBB : I->predecessors()) {
if (MergePotentials.size() == TailMergeThreshold)
break;
@@ -1015,16 +1033,12 @@ bool BranchFolder::TailMergeBlocks(Machi
if (PBB->hasEHPadSuccessor())
continue;
- // Bail out if the loop header (IBB) is not the top of the loop chain
- // after the block placement. Otherwise, the common tail of IBB's
- // predecessors may become the loop top if block placement is called
again
- // and the predecessors may branch to this common tail.
- // FIXME: Relaxed this check if the algorithm of finding loop top is
- // changed in MBP.
+ // After block placement, only consider predecessors that belong to the
+ // same loop as IBB. The reason is the same as above when skipping loop
+ // header.
if (AfterBlockPlacement && MLI)
-if (MachineLoop *ML = MLI->getLoopFor(IBB))
- if (IBB == ML->getHeader() && ML == MLI->getLoopFor(PBB))
-continue;
+if (ML != MLI->getLoopFor(PBB))
+ continue;
MachineBasicBlock *TBB = nullptr, *FBB = nullptr;
SmallVector Cond;
Modified: llvm/branches/release_39/test/CodeGen/ARM/arm-and-tst-peephole.ll
URL:
http://llvm.org/viewvc/llvm-project/llvm/branches/release_39/test/CodeGen/ARM/arm-
[llvm-branch-commits] [llvm-branch] r278831 - Merging r278571:
Author: hans
Date: Tue Aug 16 13:06:44 2016
New Revision: 278831
URL: http://llvm.org/viewvc/llvm-project?rev=278831&view=rev
Log:
Merging r278571:
r278571 | rnk | 2016-08-12 15:23:04 -0700 (Fri, 12 Aug 2016) | 6 lines
[Inliner] Don't treat inalloca allocas as static
They aren't static, and moving them to the entry block across something
else will only result in tears.
Root cause of http://crbug.com/636558.
Added:
llvm/branches/release_39/test/Transforms/Inline/inalloca-not-static.ll
- copied unchanged from r278571,
llvm/trunk/test/Transforms/Inline/inalloca-not-static.ll
Modified:
llvm/branches/release_39/ (props changed)
llvm/branches/release_39/lib/Transforms/Utils/InlineFunction.cpp
Propchange: llvm/branches/release_39/
--
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Aug 16 13:06:44 2016
@@ -1,3 +1,3 @@
/llvm/branches/Apple/Pertwee:110850,110961
/llvm/branches/type-system-rewrite:133420-134817
-/llvm/trunk:155241,275868-275870,275879,275898,275928,275935,275946,275978,275981,276015,276051,276077,276109,276119,276181,276209,276236-276237,276358,276364,276368,276389,276435,276438,276479,276510,276648,276676,276712,276740,276823,276956,276980,277093,277114,277135,277371,277399,277500,277504,277625,277691,277693,23,278002,278086,278133,278157,278370,278413,278558,278569,278573,278575,278584
+/llvm/trunk:155241,275868-275870,275879,275898,275928,275935,275946,275978,275981,276015,276051,276077,276109,276119,276181,276209,276236-276237,276358,276364,276368,276389,276435,276438,276479,276510,276648,276676,276712,276740,276823,276956,276980,277093,277114,277135,277371,277399,277500,277504,277625,277691,277693,23,278002,278086,278133,278157,278370,278413,278558,278569,278571,278573,278575,278584
Modified: llvm/branches/release_39/lib/Transforms/Utils/InlineFunction.cpp
URL:
http://llvm.org/viewvc/llvm-project/llvm/branches/release_39/lib/Transforms/Utils/InlineFunction.cpp?rev=278831&r1=278830&r2=278831&view=diff
==
--- llvm/branches/release_39/lib/Transforms/Utils/InlineFunction.cpp (original)
+++ llvm/branches/release_39/lib/Transforms/Utils/InlineFunction.cpp Tue Aug 16
13:06:44 2016
@@ -1294,6 +1294,13 @@ updateInlinedAtInfo(const DebugLoc &DL,
return DebugLoc::get(DL.getLine(), DL.getCol(), DL.getScope(), Last);
}
+/// Return the result of AI->isStaticAlloca() if AI were moved to the entry
+/// block. Allocas used in inalloca calls and allocas of dynamic array size
+/// cannot be static.
+static bool allocaWouldBeStaticInEntry(const AllocaInst *AI ) {
+ return isa(AI->getArraySize()) && !AI->isUsedWithInAlloca();
+}
+
/// Update inlined instructions' line numbers to
/// to encode location where these instructions are inlined.
static void fixupLineNumbers(Function *Fn, Function::iterator FI,
@@ -1328,7 +1335,7 @@ static void fixupLineNumbers(Function *F
// Don't update static allocas, as they may get moved later.
if (auto *AI = dyn_cast(BI))
- if (isa(AI->getArraySize()))
+ if (allocaWouldBeStaticInEntry(AI))
continue;
BI->setDebugLoc(TheCallDL);
@@ -1626,7 +1633,7 @@ bool llvm::InlineFunction(CallSite CS, I
continue;
}
- if (!isa(AI->getArraySize()))
+ if (!allocaWouldBeStaticInEntry(AI))
continue;
// Keep track of the static allocas that we inline into the caller.
@@ -1635,7 +1642,7 @@ bool llvm::InlineFunction(CallSite CS, I
// Scan for the block of allocas that we can move over, and move them
// all at once.
while (isa(I) &&
- isa(cast(I)->getArraySize())) {
+ allocaWouldBeStaticInEntry(cast(I))) {
IFI.StaticAllocas.push_back(cast(I));
++I;
}
___
llvm-branch-commits mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
[llvm-branch-commits] [llvm-branch] r278874 - Merging r278841:
Author: hans
Date: Tue Aug 16 19:15:15 2016
New Revision: 278874
URL: http://llvm.org/viewvc/llvm-project?rev=278874&view=rev
Log:
Merging r278841:
r278841 | haicheng | 2016-08-16 13:06:25 -0700 (Tue, 16 Aug 2016) | 3 lines
[BranchFolding] Change a test case of r278575.
Rename the operands to make the test less brittle.
Modified:
llvm/branches/release_39/ (props changed)
llvm/branches/release_39/test/CodeGen/X86/tail-merge-after-mbp.ll
Propchange: llvm/branches/release_39/
--
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Aug 16 19:15:15 2016
@@ -1,3 +1,3 @@
/llvm/branches/Apple/Pertwee:110850,110961
/llvm/branches/type-system-rewrite:133420-134817
-/llvm/trunk:155241,275868-275870,275879,275898,275928,275935,275946,275978,275981,276015,276051,276077,276109,276119,276181,276209,276236-276237,276358,276364,276368,276389,276435,276438,276479,276510,276648,276676,276712,276740,276823,276956,276980,277093,277114,277135,277371,277399,277500,277504,277625,277691,277693,23,278002,278086,278133,278157,278370,278413,278558,278569,278571,278573,278575,278584
+/llvm/trunk:155241,275868-275870,275879,275898,275928,275935,275946,275978,275981,276015,276051,276077,276109,276119,276181,276209,276236-276237,276358,276364,276368,276389,276435,276438,276479,276510,276648,276676,276712,276740,276823,276956,276980,277093,277114,277135,277371,277399,277500,277504,277625,277691,277693,23,278002,278086,278133,278157,278370,278413,278558,278569,278571,278573,278575,278584,278841
Modified: llvm/branches/release_39/test/CodeGen/X86/tail-merge-after-mbp.ll
URL:
http://llvm.org/viewvc/llvm-project/llvm/branches/release_39/test/CodeGen/X86/tail-merge-after-mbp.ll?rev=278874&r1=278873&r2=278874&view=diff
==
--- llvm/branches/release_39/test/CodeGen/X86/tail-merge-after-mbp.ll (original)
+++ llvm/branches/release_39/test/CodeGen/X86/tail-merge-after-mbp.ll Tue Aug
16 19:15:15 2016
@@ -9,82 +9,86 @@
declare i32 @Up(...)
declare i32 @f(i32, i32)
+; check loop block_14 is not merged with block_21
+; check loop block_11 is not merged with block_18, block_25
define i32 @foo(%0* nocapture readonly, i32, i1 %c, i8* %p1, %2** %p2) {
; CHECK-LABEL: foo:
-; CHECK: BB#6:
+; CHECK: # %block_11
; CHECK-NEXT:movq(%r14), %rax
; CHECK-NEXT:testq %rax, %rax
; CHECK-NEXT:je
-; CHECK-NEXT:# BB#7:
+; CHECK-NEXT:# %block_14
; CHECK-NEXT:cmpq$0, 8(%rax)
; CHECK-NEXT:jne
-; CHECK-NEXT:# BB#8:
+; CHECK-NEXT:# %block_18
; CHECK-NEXT:movq(%r14), %rax
; CHECK-NEXT:testq %rax, %rax
; CHECK-NEXT:je
-; CHECK-NEXT:LBB0_9:
+; CHECK-NEXT:# %block_21
+; CHECK-NEXT:# =>This Inner Loop Header
; CHECK-NEXT:cmpq$0, 8(%rax)
; CHECK-NEXT:jne
-; CHECK-NEXT:# BB#10:
+; CHECK-NEXT:# %block_25
+; CHECK-NEXT:# in Loop
; CHECK-NEXT:movq(%r14), %rax
; CHECK-NEXT:testq %rax, %rax
; CHECK-NEXT:jne
- br i1 %c, label %34, label %3
+ br i1 %c, label %block_34, label %block_3
-; :3: ; preds = %2
- br i1 %c, label %7, label %4
+block_3: ; preds = %2
+ br i1 %c, label %block_7, label %block_4
-; :4: ; preds = %3
- %5 = tail call i32 @f(i32 undef, i32 undef)
- %6 = icmp eq i32 %5, 0
- br i1 %6, label %7, label %34
-
-; :7: ; preds = %4, %3
- %8 = icmp eq %2* null, null
- br i1 %8, label %34, label %9
-
-; :9: ; preds = %7
- %10 = icmp eq i8* %p1, null
- br i1 %10, label %11, label %32
-
-; :11: ; preds = %9
- %12 = load %2*, %2** %p2, align 8
- %13 = icmp eq %2* %12, null
- br i1 %13, label %34, label %14
-
-; :14: ; preds = %11
- %15 = getelementptr inbounds %2, %2* %12, i64 0, i32 1
- %16 = load i8*, i8** %15, align 8
- %17 = icmp eq i8* %16, null
- br i1 %17, label %18, label %32
-
-; :18: ; preds = %14
- %19 = load %2*, %2** %p2, align 8
- %20 = icmp eq %2* %19, null
- br i1 %20, label %34, label %21
-
-; :21: ; preds = %18
- %22 = getelementptr inbounds %2, %2* %19, i64 0, i32 1
- %23 = load i8*, i8** %22, align 8
- %24 = icmp eq i8* %23, null
- br i1 %24, label %25, label %32
-
-; :25: ; preds = %28, %21
- %26 = load %2*, %2** %p2, align 8
- %27 = icmp eq %2* %26, null
- br i1 %27, label %34, label %28
-
-; :28: ; preds = %25
- %29 = getelementptr inbounds %2, %
[llvm-branch-commits] [cfe-branch] r278876 - ReleaseNotes: mention new /imsvc flag
Author: hans Date: Tue Aug 16 19:19:41 2016 New Revision: 278876 URL: http://llvm.org/viewvc/llvm-project?rev=278876&view=rev Log: ReleaseNotes: mention new /imsvc flag Modified: cfe/branches/release_39/docs/ReleaseNotes.rst Modified: cfe/branches/release_39/docs/ReleaseNotes.rst URL: http://llvm.org/viewvc/llvm-project/cfe/branches/release_39/docs/ReleaseNotes.rst?rev=278876&r1=278875&r2=278876&view=diff == --- cfe/branches/release_39/docs/ReleaseNotes.rst (original) +++ cfe/branches/release_39/docs/ReleaseNotes.rst Tue Aug 16 19:19:41 2016 @@ -107,6 +107,10 @@ the precompiled header flags are honored included by an `#include ` in each source file instead of by a `/FIstdafx.h` flag, these flag continue to be ignored. +clang-cl has a new flag, `/imsvc `, for adding a directory to the system +include search path (where warnings are disabled default) without having to +set `%INCLUDE`. + C Language Changes in Clang --- The -faltivec and -maltivec flags no longer silently include altivec.h on Power platforms. ___ llvm-branch-commits mailing list [email protected] http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
[llvm-branch-commits] [cfe-branch] r278877 - Merging r277852:
Author: hans
Date: Tue Aug 16 19:25:07 2016
New Revision: 278877
URL: http://llvm.org/viewvc/llvm-project?rev=278877&view=rev
Log:
Merging r277852:
r277852 | dblaikie | 2016-08-05 12:03:01 -0700 (Fri, 05 Aug 2016) | 7 lines
PR26423: Assert on valid use of using declaration of a function with an
undeduced auto return type
For now just disregard the using declaration in this case. Suboptimal,
but wiring up the ability to have declarations of functions that are
separate from their definition (we currently only do that for member
functions) and have differing return types (we don't have any support
for that) is more work than seems reasonable to at least fix this crash.
Modified:
cfe/branches/release_39/ (props changed)
cfe/branches/release_39/lib/CodeGen/CGDebugInfo.cpp
cfe/branches/release_39/test/CodeGenCXX/debug-info-cxx1y.cpp
Propchange: cfe/branches/release_39/
--
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Aug 16 19:25:07 2016
@@ -1,4 +1,4 @@
/cfe/branches/type-system-rewrite:134693-134817
-/cfe/trunk:275880,275967,276102,276350,276361,276473,276653,276716,276887,276891,276900,276979,276983,277095,277138,277141,277221,277307,277522,277743,277783,277796-277797,277866,277889,277900,278139,278156,278234-278235,278393,278395,278763
+/cfe/trunk:275880,275967,276102,276350,276361,276473,276653,276716,276887,276891,276900,276979,276983,277095,277138,277141,277221,277307,277522,277743,277783,277796-277797,277852,277866,277889,277900,278139,278156,278234-278235,278393,278395,278763
/cfe/trunk/test:170344
/cfe/trunk/test/SemaTemplate:126920
Modified: cfe/branches/release_39/lib/CodeGen/CGDebugInfo.cpp
URL:
http://llvm.org/viewvc/llvm-project/cfe/branches/release_39/lib/CodeGen/CGDebugInfo.cpp?rev=278877&r1=278876&r2=278877&view=diff
==
--- cfe/branches/release_39/lib/CodeGen/CGDebugInfo.cpp (original)
+++ cfe/branches/release_39/lib/CodeGen/CGDebugInfo.cpp Tue Aug 16 19:25:07 2016
@@ -3637,6 +3637,16 @@ void CGDebugInfo::EmitUsingDecl(const Us
// Emitting one decl is sufficient - debuggers can detect that this is an
// overloaded name & provide lookup for all the overloads.
const UsingShadowDecl &USD = **UD.shadow_begin();
+
+ // FIXME: Skip functions with undeduced auto return type for now since we
+ // don't currently have the plumbing for separate declarations & definitions
+ // of free functions and mismatched types (auto in the declaration, concrete
+ // return type in the definition)
+ if (const auto *FD = dyn_cast(USD.getUnderlyingDecl()))
+if (const auto *AT =
+FD->getType()->getAs()->getContainedAutoType())
+ if (AT->getDeducedType().isNull())
+return;
if (llvm::DINode *Target =
getDeclarationOrDefinition(USD.getUnderlyingDecl()))
DBuilder.createImportedDeclaration(
Modified: cfe/branches/release_39/test/CodeGenCXX/debug-info-cxx1y.cpp
URL:
http://llvm.org/viewvc/llvm-project/cfe/branches/release_39/test/CodeGenCXX/debug-info-cxx1y.cpp?rev=278877&r1=278876&r2=278877&view=diff
==
--- cfe/branches/release_39/test/CodeGenCXX/debug-info-cxx1y.cpp (original)
+++ cfe/branches/release_39/test/CodeGenCXX/debug-info-cxx1y.cpp Tue Aug 16
19:25:07 2016
@@ -1,16 +1,25 @@
// RUN: %clang_cc1 -triple %itanium_abi_triple -emit-llvm-only -std=c++14
-emit-llvm -debug-info-kind=limited %s -o - | FileCheck %s
+// CHECK: imports: [[IMPS:![0-9]*]]
// CHECK: [[EMPTY:![0-9]*]] = !{}
+
// CHECK: [[FOO:![0-9]+]] = distinct !DICompositeType(tag:
DW_TAG_structure_type, name: "foo",
// CHECK-SAME: elements: [[EMPTY]]
-// FIXME: The context of this definition should be the CU/file scope, not the
class.
-// CHECK: !DISubprogram(name: "func", {{.*}} scope: [[FOO]]
+
+// CHECK: [[IMPS]] = !{[[IMP:![0-9]*]]}
+// CHECK: [[IMP]] = !DIImportedEntity(
+// CHECK-SAME: entity: [[F3:![0-9]*]]
+// CHECK: [[F3]] = distinct !DISubprogram(name: "f3"
// CHECK-SAME: type: [[SUBROUTINE_TYPE:![0-9]*]]
-// CHECK-SAME: isDefinition: true
-// CHECK-SAME: declaration: [[FUNC_DECL:![0-9]*]]
// CHECK: [[SUBROUTINE_TYPE]] = !DISubroutineType(types: [[TYPE_LIST:![0-9]*]])
// CHECK: [[TYPE_LIST]] = !{[[INT:![0-9]*]]}
// CHECK: [[INT]] = !DIBasicType(name: "int"
+
+// FIXME: The context of this definition should be the CU/file scope, not the
class.
+// CHECK: !DISubprogram(name: "func", {{.*}} scope: [[FOO]]
+// CHECK-SAME: type: [[SUBROUTINE_TYPE]]
+// CHECK-SAME: isDefinition: true
+// CHECK-SAME: declaration: [[FUNC_DECL:![0-9]*]]
// CHECK: [[FUNC_DECL]] = !DISubprogram(name: "func",
// CHECK-SAME:
