Changeset 61efa42 for src/AST/Decl.cpp


Ignore:
Timestamp:
Nov 10, 2023, 5:04:30 PM (7 months ago)
Author:
Andrew Beach <ajbeach@…>
Branches:
master
Children:
2174191
Parents:
f5ec35a
Message:

Took the special main linkage code out of FunctionDecl? and put it into a new pass. There is also a lot of related clean-up done.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/AST/Decl.cpp

    rf5ec35a r61efa42  
    2020#include <unordered_map>
    2121
    22 #include "CodeGen/FixMain.h"   // for FixMain
    2322#include "Common/Eval.h"       // for eval
    2423
     
    7675        }
    7776        this->type = ftype;
    78         // Hack forcing the function "main" to have Cforall linkage to replace
    79         // main even if it is inside an extern "C", and also makes sure the
    80         // replacing function is always a C function.
    81         if ( name == "main" ) {
    82                 this->linkage = CodeGen::FixMain::getMainLinkage();
    83         }
    8477}
    8578
     
    108101        }
    109102        this->type = type;
    110         // See note above about this hack.
    111         if ( name == "main" ) {
    112                 this->linkage = CodeGen::FixMain::getMainLinkage();
    113         }
    114103}
    115104
Note: See TracChangeset for help on using the changeset viewer.