about summary refs log tree commit diff
path: root/src/test/codegen/auxiliary
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2017-10-04 14:54:28 -0700
committerAlex Crichton <alex@alexcrichton.com>2017-10-11 09:05:38 -0700
commit24cc38e3b00ff399acc99a57f92bfdef4ab8c949 (patch)
treef64b7561d7bf67481376d931d9db916a3e4a1339 /src/test/codegen/auxiliary
parent264aafe0566e521bbc95bd3f44dae97591c9fd20 (diff)
downloadrust-24cc38e3b00ff399acc99a57f92bfdef4ab8c949.tar.gz
rust-24cc38e3b00ff399acc99a57f92bfdef4ab8c949.zip
rustc: Add LLVM `nounwind` with `-C panic=abort`
This informs LLVM that functions can't unwind, which while it should typically
have already been inferred when necessary or otherwise not impact codegen is
apparently needed on targets like ARM to avoid references to unnecessary
symbols.

Closes #44992
Diffstat (limited to 'src/test/codegen/auxiliary')
-rw-r--r--src/test/codegen/auxiliary/nounwind.rs13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/test/codegen/auxiliary/nounwind.rs b/src/test/codegen/auxiliary/nounwind.rs
new file mode 100644
index 00000000000..5e40e8ede15
--- /dev/null
+++ b/src/test/codegen/auxiliary/nounwind.rs
@@ -0,0 +1,13 @@
+// Copyright 2017 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#[no_mangle]
+pub fn bar() {
+}