-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Mark destructor of hyperobject member referenced
- Loading branch information
1 parent
fda22b2
commit 8b9ff9c
Showing
2 changed files
with
24 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// RUN: %clang_cc1 %s -x c++ -fopencilk -verify -disable-llvm-passes -S -emit-llvm -o - | FileCheck %s | ||
// expected-no-diagnostics | ||
template <typename T> | ||
struct Inner | ||
{ | ||
static void identity(void *); | ||
static void reduce(void *, void *); | ||
Inner(); | ||
~Inner() noexcept { } | ||
}; | ||
|
||
struct Outer { | ||
Inner<char> _Hyperobject(&Inner<char>::identity, &Inner<char>::reduce) member; | ||
Outer(); | ||
~Outer(); | ||
}; | ||
|
||
// Make sure the appropriate variant of ~Inner() is emitted. | ||
// CHECK: define dso_local void @_ZN5OuterD2Ev | ||
// CHECK: call void @_ZN5InnerIcED2Ev | ||
// CHECK: define linkonce_odr void @_ZN5InnerIcED2Ev | ||
|
||
Outer::~Outer() { } |