MCPcopy Create free account
hub / github.com/GaijinEntertainment/daScript / getAlignOf

Method getAlignOf

src/ast/ast_typedecl.cpp:3100–3114  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3098 }
3099
3100 int TypeDecl::getAlignOf() const {
3101 if ( baseType==Type::tHandle ) {
3102 return int(annotation->getAlignOf());
3103 } else if ( baseType==Type::tStructure ) {
3104 return !structType->circular ? structType->getAlignOf() : 0;
3105 } else if ( baseType==Type::tTuple ) {
3106 return getTupleAlign();
3107 } else if ( baseType==Type::tVariant ) {
3108 return getVariantAlign();
3109 } else if ( isEnumT() ) {
3110 return enumType ? getTypeBaseAlign(enumType->baseType) : getTypeBaseAlign(Type::tInt);
3111 } else {
3112 return getTypeBaseAlign(baseType);
3113 }
3114 }
3115
3116 int TypeDecl::getAlignOfFailed(bool &failed) const {
3117 if ( baseType==Type::tHandle ) {

Callers 5

getTupleFieldOffsetMethod · 0.45
getTupleSize64Method · 0.45
getTupleAlignMethod · 0.45
getVariantAlignMethod · 0.45
getAlignOfFailedMethod · 0.45

Calls 3

getTupleAlignFunction · 0.85
getVariantAlignFunction · 0.85
getTypeBaseAlignFunction · 0.85

Tested by

no test coverage detected