2 = full debug info with variable and type information"),
opt_level: Option<String> = (None, parse_opt_string, [TRACKED],
"optimize with possible levels 0-3, s, or z"),
+ force_frame_pointers: bool = (false, parse_bool, [TRACKED],
+ "force frame pointers to be used"),
debug_assertions: Option<bool> = (None, parse_opt_bool, [TRACKED],
"explicitly enable the cfg(debug_assertions) directive"),
inline_threshold: Option<usize> = (None, parse_opt_uint, [TRACKED],
opts.cg.debuginfo = Some(0xba5eba11);
assert!(reference.dep_tracking_hash() != opts.dep_tracking_hash());
+ opts = reference.clone();
+ opts.cg.force_frame_pointers = true;
+ assert!(reference.dep_tracking_hash() != opts.dep_tracking_hash());
+
opts = reference.clone();
opts.cg.debug_assertions = Some(true);
assert!(reference.dep_tracking_hash() != opts.dep_tracking_hash());
use middle::allocator::AllocatorKind;
use middle::dependency_format;
use session::search_paths::PathKind;
-use session::config::{DebugInfoLevel, OutputType};
+use session::config::{OutputType};
use ty::tls;
use util::nodemap::{FxHashSet};
use util::common::{duration_to_secs_str, ErrorReported};
}
pub fn set_frame_pointer_elimination(cx: &CodegenCx, llfn: ValueRef) {
- // FIXME: #11906: Omitting frame pointers breaks retrieving the value of a
- // parameter.
if cx.sess().must_not_eliminate_frame_pointers() {
llvm::AddFunctionAttrStringValue(
llfn, llvm::AttributePlace::Function,
--- /dev/null
+// Copyright 2018 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.
+//
+// compile-flags: -C no-prepopulate-passes -C force-frame-pointers
+
+#![crate_type="lib"]
+
+// CHECK: attributes #{{.*}} "no-frame-pointer-elim"="true"
+pub fn foo() {}