diff options
| author | bors <bors@rust-lang.org> | 2019-05-30 03:37:37 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2019-05-30 03:37:37 +0000 |
| commit | c28084ac16af4ab594b6860958df140e7c876a13 (patch) | |
| tree | 5e71af9a3c56f961563959bf3a297dcf39d9a1e7 /src/test/codegen | |
| parent | 19e0ddbb9f29c27f907fd0d23b70fbd53aeb6efb (diff) | |
| parent | a19a9e9194a03add87cd10aacfe518a61487cf0d (diff) | |
| download | rust-c28084ac16af4ab594b6860958df140e7c876a13.tar.gz rust-c28084ac16af4ab594b6860958df140e7c876a13.zip | |
Auto merge of #61005 - michaelwoerister:error-pgo-windows-unwind, r=zackmdavis
Emit error when trying to use PGO in conjunction with unwinding on Windows. This PR makes `rustc` emit an error when trying use PGO in conjunction with `-Cpanic=unwind` on Windows, isn't supported by LLVM yet. The error messages points to https://github.com/rust-lang/rust/issues/61002, which documents this known limitation.
Diffstat (limited to 'src/test/codegen')
| -rw-r--r-- | src/test/codegen/pgo-instrumentation.rs | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/test/codegen/pgo-instrumentation.rs b/src/test/codegen/pgo-instrumentation.rs index 8493ef565d8..e9436505886 100644 --- a/src/test/codegen/pgo-instrumentation.rs +++ b/src/test/codegen/pgo-instrumentation.rs @@ -1,20 +1,23 @@ // Test that `-Zpgo-gen` creates expected instrumentation artifacts in LLVM IR. +// Compiling with `-Cpanic=abort` because PGO+unwinding isn't supported on all platforms. // needs-profiler-support -// compile-flags: -Z pgo-gen -Ccodegen-units=1 +// compile-flags: -Z pgo-gen -Ccodegen-units=1 -Cpanic=abort // CHECK: @__llvm_profile_raw_version = // CHECK: @__profc_{{.*}}pgo_instrumentation{{.*}}some_function{{.*}} = private global // CHECK: @__profd_{{.*}}pgo_instrumentation{{.*}}some_function{{.*}} = private global -// CHECK: @__profc_{{.*}}pgo_instrumentation{{.*}}main{{.*}} = private global -// CHECK: @__profd_{{.*}}pgo_instrumentation{{.*}}main{{.*}} = private global +// CHECK: @__profc_{{.*}}pgo_instrumentation{{.*}}some_other_function{{.*}} = private global +// CHECK: @__profd_{{.*}}pgo_instrumentation{{.*}}some_other_function{{.*}} = private global // CHECK: @__llvm_profile_filename = {{.*}}"default_%m.profraw\00"{{.*}} +#![crate_type="lib"] + #[inline(never)] fn some_function() { } -fn main() { +pub fn some_other_function() { some_function(); } |
