Example #1
0
clang::CanQualType GenClangType::visitEnumType(CanEnumType type) {
  assert(type->getDecl()->isObjC() && "not an @objc enum?!");
  
  // @objc enums lower to their raw types.
  return Converter.convert(IGM,
                           type->getDecl()->getRawType()->getCanonicalType());
}
Example #2
0
clang::CanQualType GenClangType::visitEnumType(CanEnumType type) {
    // Special case: Uninhabited enums are not @objc, so we don't
    // know what to do below, but we can just convert to 'void'.
    if (type->isUninhabited())
        return Converter.convert(IGM, IGM.Context.TheEmptyTupleType);

    assert(type->getDecl()->isObjC() && "not an @objc enum?!");

    // @objc enums lower to their raw types.
    return Converter.convert(IGM,
                             type->getDecl()->getRawType()->getCanonicalType());
}