This machine mirrors various open-source projects. 20 Gbit/s uplink. If there are any issues or you want another project mirrored, please contact mirror-service -=AT=- netcologne DOT de !
00001 //===-- ast/SignatureSet.cpp ---------------------------------- -*- C++ -*-===// 00002 // 00003 // This file is distributed under the MIT license. See LICENSE.txt for details. 00004 // 00005 // Copyright (C) 2009, Stephen Wilson 00006 // 00007 //===----------------------------------------------------------------------===// 00008 00009 #include "comma/ast/AstRewriter.h" 00010 #include "comma/ast/Decl.h" 00011 #include "comma/ast/SignatureSet.h" 00012 #include "comma/ast/Type.h" 00013 00014 using namespace comma; 00015 00016 bool SignatureSet::addDirectSignature(SigInstanceDecl *signature, 00017 const AstRewriter &rewriter) 00018 { 00019 if (directSignatures.insert(signature)) { 00020 Sigoid *sigDecl = signature->getSigoid(); 00021 const SignatureSet& sigset = sigDecl->getSignatureSet(); 00022 allSignatures.insert(signature); 00023 for (iterator iter = sigset.begin(); iter != sigset.end(); ++iter) { 00024 SigInstanceDecl *rewrite = rewriter.rewriteSigInstance(*iter); 00025 allSignatures.insert(rewrite); 00026 } 00027 return true; 00028 } 00029 return false; 00030 } 00031