// // Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo // // The contents of this file are covered under the licence agreement in the // file "LICENCE" distributed with Cforall. // // FixLabels.cpp -- Normalizes labels and handles multi-level exit labels. // // Author : Andrew Beach // Created On : Mon Nov 1 09:39:00 2021 // Last Modified By : Peter A. Buhr // Last Modified On : Mon Jan 31 22:19:17 2022 // Update Count : 9 // #include "FixLabels.hpp" #include "AST/Label.hpp" #include "AST/Pass.hpp" #include "AST/Stmt.hpp" #include "ControlStruct/MultiLevelExit.hpp" using namespace ast; namespace ControlStruct { class FixLabelsCore final : public WithGuards { LabelToStmt labelTable; public: FixLabelsCore() : labelTable() {} void previsit( const FunctionDecl * ); const FunctionDecl * postvisit( const FunctionDecl * ); void previsit( const Stmt * ); void previsit( const BranchStmt * ); void previsit( const LabelAddressExpr * ); void setLabelsDef( const std::vector