summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/trans/target.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/trans/target.cpp b/src/trans/target.cpp
index 6a65be15..141f5b78 100644
--- a/src/trans/target.cpp
+++ b/src/trans/target.cpp
@@ -589,6 +589,13 @@ bool Target_GetSizeAndAlignOf(const Span& sp, const StaticTraitResolve& resolve,
(Path,
if( te.binding.is_Opaque() )
return false;
+ if( te.binding.is_ExternType() )
+ {
+ DEBUG("sizeof on extern type - unsized");
+ out_align = 0;
+ out_size = SIZE_MAX;
+ return true;
+ }
const auto* repr = Target_GetTypeRepr(sp, resolve, ty);
if( !repr )
{
@@ -1158,6 +1165,11 @@ namespace {
{
return make_type_repr_enum(sp, resolve, ty);
}
+ else if( TU_TEST1(ty.m_data, Path, .binding.is_ExternType()) )
+ {
+ // TODO: Do extern types need anything?
+ return nullptr;
+ }
else if( ty.m_data.is_Primitive() )
{
return nullptr;