From 0a98a4e422bd2d80ee7910b00c0286f1eefde9c5 Mon Sep 17 00:00:00 2001 From: Michael Woerister Date: Fri, 30 May 2014 17:09:16 +0200 Subject: debuginfo: Generate cross-crate unique type identifiers for debuginfo types. With this change, rustc creates a unique type identifier for types in debuginfo. These type identifiers are used by LLVM to correctly handle link-time-optimization scenarios but also help rustc with dealing with inlining from other crates. For more information, see the documentation block at the top of librustc/middle/trans/debuginfo.rs. Fixes #13681. --- src/test/debuginfo/cross-crate-type-uniquing.rs | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 src/test/debuginfo/cross-crate-type-uniquing.rs (limited to 'src/test/debuginfo') diff --git a/src/test/debuginfo/cross-crate-type-uniquing.rs b/src/test/debuginfo/cross-crate-type-uniquing.rs new file mode 100644 index 00000000000..47de06c4856 --- /dev/null +++ b/src/test/debuginfo/cross-crate-type-uniquing.rs @@ -0,0 +1,24 @@ +// Copyright 2013-2014 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 or the MIT license +// , at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +// ignore-android: FIXME(#10381) + +// aux-build:cross_crate_debuginfo_type_uniquing.rs +extern crate cross_crate_debuginfo_type_uniquing; + +// no-prefer-dynamic +// compile-flags:-g -Zlto + +pub struct C; +pub fn p() -> C { + C +} + +fn main() { } \ No newline at end of file -- cgit 1.4.1-3-g733a5