forked from llvm/llvm-project
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[AutoBump] Merge with 3c53745 (Aug 20)
- Loading branch information
Showing
70 changed files
with
657 additions
and
343 deletions.
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
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
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,39 @@ | ||
// Check that we can still observe the value of the coroutine frame | ||
// with optimizations. | ||
// | ||
// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -std=c++20 \ | ||
// RUN: -emit-llvm %s -debug-info-kind=limited -dwarf-version=5 \ | ||
// RUN: -O2 -o - | FileCheck %s | ||
|
||
#include "Inputs/coroutine.h" | ||
|
||
template <> | ||
struct std::coroutine_traits<void> { | ||
struct promise_type { | ||
void get_return_object(); | ||
std::suspend_always initial_suspend(); | ||
std::suspend_always final_suspend() noexcept; | ||
void return_void(); | ||
void unhandled_exception(); | ||
}; | ||
}; | ||
|
||
struct ScalarAwaiter { | ||
template <typename F> void await_suspend(F); | ||
bool await_ready(); | ||
int await_resume(); | ||
}; | ||
|
||
extern "C" void UseScalar(int); | ||
|
||
extern "C" void f() { | ||
UseScalar(co_await ScalarAwaiter{}); | ||
|
||
int Val = co_await ScalarAwaiter{}; | ||
|
||
co_await ScalarAwaiter{}; | ||
} | ||
|
||
// CHECK: define {{.*}}@f.resume({{.*}} %[[ARG:.*]]) | ||
// CHECK: #dbg_value(ptr %[[ARG]], ![[CORO_NUM:[0-9]+]], !DIExpression(DW_OP_deref) | ||
// CHECK: ![[CORO_NUM]] = !DILocalVariable(name: "__coro_frame" |
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
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,41 @@ | ||
REQUIRES: x86 | ||
RUN: split-file %s %t.dir && cd %t.dir | ||
|
||
RUN: llvm-mc -filetype=obj -triple=x86_64-windows test.s -o test.obj | ||
RUN: llvm-mc -filetype=obj -triple=x86_64-windows sym2.s -o sym2.obj | ||
RUN: llvm-mc -filetype=obj -triple=x86_64-windows def.s -o def.obj | ||
|
||
RUN: not lld-link -machine:amd64 -dll -noentry -out:test.dll test.obj sym2.obj 2>&1 | FileCheck -check-prefix=ERR %s | ||
|
||
ERR: error: undefined symbol: testsym | ||
ERR-NEXT: >>> referenced by test.obj | ||
ERR-EMPTY: | ||
ERR-NEXT: error: undefined symbol: sym1 | ||
ERR-NEXT: >>> referenced by test.obj | ||
ERR-NEXT: >>> referenced by sym2.obj | ||
ERR-EMPTY: | ||
ERR-NEXT: error: undefined symbol: sym2 | ||
ERR-NEXT: >>> referenced by test.obj | ||
ERR-NEXT: >>> referenced by sym2.obj | ||
|
||
Depending on symbol processing order, we may have temporary weak reference cycles: | ||
|
||
RUN: lld-link -machine:amd64 -dll -noentry -out:test.dll test.obj sym2.obj def.obj | ||
RUN: lld-link -machine:amd64 -dll -noentry -out:test.dll test.obj def.obj sym2.obj | ||
RUN: lld-link -machine:amd64 -dll -noentry -out:test.dll def.obj test.obj sym2.obj | ||
|
||
#--- test.s | ||
.weak testsym | ||
.set testsym, sym1 | ||
.weak sym1 | ||
.set sym1, sym2 | ||
|
||
#--- sym2.s | ||
.weak sym2 | ||
.set sym2, sym1 | ||
|
||
#--- def.s | ||
.globl sym1 | ||
.data | ||
sym1: | ||
.word 0 |
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
Oops, something went wrong.