about summary refs log tree commit diff
path: root/compiler/rustc_middle/src/middle
diff options
context:
space:
mode:
authorGary Guo <gary@garyguo.net>2022-04-02 22:54:51 +0100
committerGary Guo <gary@garyguo.net>2022-04-18 20:50:56 +0100
commit773f533eae25129cea7241b74e54f26ce5eebb62 (patch)
tree966b18c563ba92671a3f7e39d63e496bd43f63ec /compiler/rustc_middle/src/middle
parenta1dae4bc9d708bfea8a8bb5996e96de5c5180f7f (diff)
downloadrust-773f533eae25129cea7241b74e54f26ce5eebb62.tar.gz
rust-773f533eae25129cea7241b74e54f26ce5eebb62.zip
Synthesis object file for `#[used]` and exported symbols
Diffstat (limited to 'compiler/rustc_middle/src/middle')
-rw-r--r--compiler/rustc_middle/src/middle/exported_symbols.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/compiler/rustc_middle/src/middle/exported_symbols.rs b/compiler/rustc_middle/src/middle/exported_symbols.rs
index a605e6dfdc1..631fd09ec4c 100644
--- a/compiler/rustc_middle/src/middle/exported_symbols.rs
+++ b/compiler/rustc_middle/src/middle/exported_symbols.rs
@@ -21,11 +21,21 @@ impl SymbolExportLevel {
     }
 }
 
+/// Kind of exported symbols.
+#[derive(Eq, PartialEq, Debug, Copy, Clone, Encodable, Decodable, HashStable)]
+pub enum SymbolExportKind {
+    Text,
+    Data,
+    Tls,
+}
+
 /// The `SymbolExportInfo` of a symbols specifies symbol-related information
 /// that is relevant to code generation and linking.
 #[derive(Eq, PartialEq, Debug, Copy, Clone, TyEncodable, TyDecodable, HashStable)]
 pub struct SymbolExportInfo {
     pub level: SymbolExportLevel,
+    pub kind: SymbolExportKind,
+    pub used: bool,
 }
 
 #[derive(Eq, PartialEq, Debug, Copy, Clone, TyEncodable, TyDecodable, HashStable)]