summaryrefslogtreecommitdiff
path: root/src/hir/hir.cpp
diff options
context:
space:
mode:
authorJohn Hodge <tpg@mutabah.net>2018-12-29 15:00:52 +0800
committerJohn Hodge <tpg@mutabah.net>2018-12-29 15:00:52 +0800
commit28a48cfe2fde578219de5e15268348897c73b0d7 (patch)
tree78f4762893e6f624ab42df726f9bc33ca3b07d85 /src/hir/hir.cpp
parente8401bfcea28bef9151aea9a8bd9b1c2789b5f79 (diff)
downloadmrust-28a48cfe2fde578219de5e15268348897c73b0d7.tar.gz
HIR - Add new struct reprs (mostly stubbed)
- Also cleared out some dead code in target.cpp
Diffstat (limited to 'src/hir/hir.cpp')
-rw-r--r--src/hir/hir.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/hir/hir.cpp b/src/hir/hir.cpp
index 475928a1..bd396df9 100644
--- a/src/hir/hir.cpp
+++ b/src/hir/hir.cpp
@@ -93,6 +93,21 @@ namespace HIR {
)
return true;
}
+
+ ::std::ostream& operator<<(::std::ostream& os, const Struct::Repr& x) {
+ os << "repr(";
+ switch(x)
+ {
+ case Struct::Repr::Rust: os << "Rust"; break;
+ case Struct::Repr::C: os << "C"; break;
+ case Struct::Repr::Packed: os << "packed"; break;
+ case Struct::Repr::Simd: os << "simd"; break;
+ case Struct::Repr::Aligned: os << "align(?)"; break;
+ case Struct::Repr::Transparent: os << "transparent"; break;
+ }
+ os << ")";
+ return os;
+ }
}
size_t HIR::Enum::find_variant(const ::std::string& name) const