]> granicus.if.org Git - clang/commitdiff
Classify enum types correctly
authorAnders Carlsson <andersca@mac.com>
Thu, 26 Feb 2009 17:31:15 +0000 (17:31 +0000)
committerAnders Carlsson <andersca@mac.com>
Thu, 26 Feb 2009 17:31:15 +0000 (17:31 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65533 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CGCall.cpp

index 974b9b46f6df5c8e1a5a52a8365156723a324be1..6de07e165e6b93f006c96ea43d39d01229ee466f 100644 (file)
@@ -522,6 +522,9 @@ void X86_64ABIInfo::classify(QualType Ty,
     // FIXME: _Decimal32 and _Decimal64 are SSE.
     // FIXME: _float128 and _Decimal128 are (SSE, SSEUp).
     // FIXME: __int128 is (Integer, Integer).
+  } else if (const EnumType *ET = Ty->getAsEnumType()) {
+    // Classify the underlying integer type.
+    classify(ET->getDecl()->getIntegerType(), Context, OffsetBase, Lo, Hi);
   } else if (Ty->isPointerLikeType() || Ty->isBlockPointerType() ||
              Ty->isObjCQualifiedIdType() ||
              Ty->isObjCQualifiedInterfaceType()) {