Changeset 72e76fd


Ignore:
Timestamp:
Jun 28, 2022, 3:07:04 PM (2 years ago)
Author:
Andrew Beach <ajbeach@…>
Branches:
ADT, ast-experimental, master, pthread-emulation, qualifiedEnum
Children:
d7af839
Parents:
43aec9e
Message:

Converted the last pass in validate B (linkReferenceToTypes). Cleaned up a related test.

Files:
2 added
4 edited

Legend:

Unmodified
Added
Removed
  • src/SymTab/Validate.cc

    r43aec9e r72e76fd  
    312312                        Stats::Heap::newPass("validate-B");
    313313                        Stats::Time::BlockGuard guard("validate-B");
    314                         //linkReferenceToTypes( translationUnit );
     314                        linkReferenceToTypes( translationUnit ); // Must happen before auto-gen, because it uses the sized flag.
    315315                        mutateAll( translationUnit, fixQual ); // must happen after LinkReferenceToTypes_old, because aggregate members are accessed
    316316                        HoistStruct::hoistStruct( translationUnit );
  • src/Validate/module.mk

    r43aec9e r72e76fd  
    4141        Validate/LabelAddressFixer.cpp \
    4242        Validate/LabelAddressFixer.hpp \
     43        Validate/LinkReferenceToTypes.cpp \
     44        Validate/LinkReferenceToTypes.hpp \
    4345        Validate/NoIdSymbolTable.hpp \
    4446        Validate/ReturnCheck.cpp \
  • src/main.cc

    r43aec9e r72e76fd  
    8585#include "Validate/InitializerLength.hpp"   // for setLengthFromInitializer
    8686#include "Validate/LabelAddressFixer.hpp"   // for fixLabelAddresses
     87#include "Validate/LinkReferenceToTypes.hpp" // for linkReferenceToTypes
    8788#include "Validate/ReturnCheck.hpp"         // for checkReturnStatements
    8889#include "Virtual/ExpandCasts.h"            // for expandCasts
     
    333334                PASS( "Validate-A", SymTab::validate_A( translationUnit ) );
    334335
    335                 // Must happen before auto-gen, because it uses the sized flag.
    336                 PASS( "Link Reference To Types", SymTab::linkReferenceToTypes( translationUnit ) );
    337 
    338336                CodeTools::fillLocations( translationUnit );
    339337
     
    348346
    349347                        forceFillCodeLocations( transUnit );
     348
     349                        // Must happen before auto-gen, because it uses the sized flag.
     350                        PASS( "Link Reference To Types", Validate::linkReferenceToTypes( transUnit ) );
    350351
    351352                        // Must happen after Link References To Types,
  • tests/enum_tests/structEnum.cfa

    r43aec9e r72e76fd  
    2424int main() {
    2525    printf("%d %c\n", apple.x, apple.y);
    26     // Failed; enumInstType is now not a real type and not instantiated. 
     26    // Failed; enumInstType is now not a real type and not instantiated.
    2727    // Not sure if we want that
    2828    // printf("%d %c\n", second.x, second.y);
    2929    return 0;
    3030}
    31 
    32 
    33 
Note: See TracChangeset for help on using the changeset viewer.