1 /* 2 * (C) Copyright 2007-2015 Diomidis Spinellis 3 * 4 * This file is part of CScout. 5 * 6 * CScout is free software: you can redistribute it and/or modify 7 * it under the terms of the GNU General Public License as published by 8 * the Free Software Foundation, either version 3 of the License, or 9 * (at your option) any later version. 10 * 11 * CScout is distributed in the hope that it will be useful, 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 * GNU General Public License for more details. 15 * 16 * You should have received a copy of the GNU General Public License 17 * along with CScout. If not, see <http://www.gnu.org/licenses/>. 18 * 19 * 20 * For documentation read the corresponding .h file 21 * 22 */ 23 24 #include <map> 25 #include <string> 26 #include <deque> 27 #include <vector> 28 #include <stack> 29 #include <iterator> 30 #include <fstream> 31 #include <iostream> 32 #include <list> 33 #include <set> 34 35 #include "cpp.h" 36 #include "debug.h" 37 #include "error.h" 38 #include "attr.h" 39 #include "metrics.h" 40 #include "fileid.h" 41 #include "tokid.h" 42 #include "token.h" 43 #include "parse.tab.h" 44 #include "ptoken.h" 45 #include "fchar.h" 46 #include "pltoken.h" 47 #include "macro.h" 48 #include "pdtoken.h" 49 #include "ctoken.h" 50 #include "type.h" 51 #include "stab.h" 52 #include "fdep.h" 53 #include "call.h" 54 #include "mcall.h" 55 #include "macro.h" 56 57 void set_current_fun(Macro & m)58MCall::set_current_fun(Macro &m) 59 { 60 current_fun = m.get_mcall(); 61 csassert(current_fun); 62 current_fun->mark_begin(); 63 nesting.push(current_fun); 64 } 65 66 const string & entity_type_name() const67MCall::entity_type_name() const 68 { 69 static string s("function-like macro"); 70 return (s); 71 } 72