sc_report.cc (13313:306a97d3b040) | sc_report.cc (13314:d1f53683ab94) |
---|---|
1/* 2 * Copyright 2018 Google, Inc. 3 * 4 * Redistribution and use in source and binary forms, with or without 5 * modification, are permitted provided that the following conditions are 6 * met: redistributions of source code must retain the above copyright 7 * notice, this list of conditions and the following disclaimer; 8 * redistributions in binary form must reproduce the above copyright --- 88 unchanged lines hidden (view full) --- 97 98bool 99sc_report::is_suppressed(int id) 100{ 101 auto it = sc_gem5::reportIdToMsgMap.find(id); 102 if (it == sc_gem5::reportIdToMsgMap.end()) 103 return false; 104 | 1/* 2 * Copyright 2018 Google, Inc. 3 * 4 * Redistribution and use in source and binary forms, with or without 5 * modification, are permitted provided that the following conditions are 6 * met: redistributions of source code must retain the above copyright 7 * notice, this list of conditions and the following disclaimer; 8 * redistributions in binary form must reproduce the above copyright --- 88 unchanged lines hidden (view full) --- 97 98bool 99sc_report::is_suppressed(int id) 100{ 101 auto it = sc_gem5::reportIdToMsgMap.find(id); 102 if (it == sc_gem5::reportIdToMsgMap.end()) 103 return false; 104 |
105 return sc_gem5::reportMsgInfoMap[it->second].actions == SC_DO_NOTHING; | 105 auto &msgInfo = sc_gem5::reportMsgInfoMap[it->second]; 106 107 return (msgInfo.actions == SC_DO_NOTHING || 108 (msgInfo.sevActions[SC_INFO] == SC_DO_NOTHING && 109 msgInfo.sevActions[SC_WARNING] == SC_DO_NOTHING)); |
106} 107 108void 109sc_report::make_warnings_errors(bool val) 110{ 111 sc_gem5::reportWarningsAsErrors = val; 112} 113 --- 20 unchanged lines hidden (view full) --- 134 135void 136sc_report::suppress_id(int id, bool suppress) 137{ 138 auto it = sc_gem5::reportIdToMsgMap.find(id); 139 if (it == sc_gem5::reportIdToMsgMap.end()) 140 return; 141 | 110} 111 112void 113sc_report::make_warnings_errors(bool val) 114{ 115 sc_gem5::reportWarningsAsErrors = val; 116} 117 --- 20 unchanged lines hidden (view full) --- 138 139void 140sc_report::suppress_id(int id, bool suppress) 141{ 142 auto it = sc_gem5::reportIdToMsgMap.find(id); 143 if (it == sc_gem5::reportIdToMsgMap.end()) 144 return; 145 |
142 if (suppress) 143 sc_gem5::reportMsgInfoMap[it->second].actions = SC_DO_NOTHING; 144 else 145 sc_gem5::reportMsgInfoMap[it->second].actions = SC_UNSPECIFIED; | 146 if (suppress) { 147 sc_gem5::reportMsgInfoMap[it->second]. 148 sevActions[SC_INFO] = SC_DO_NOTHING; 149 sc_gem5::reportMsgInfoMap[it->second]. 150 sevActions[SC_WARNING] = SC_DO_NOTHING; 151 } else { 152 sc_gem5::reportMsgInfoMap[it->second]. 153 sevActions[SC_INFO] = SC_UNSPECIFIED; 154 sc_gem5::reportMsgInfoMap[it->second]. 155 sevActions[SC_WARNING] = SC_UNSPECIFIED; 156 } |
146} 147 148void 149sc_report::suppress_infos(bool suppress) 150{ 151 if (suppress) 152 sc_gem5::reportSevInfos[SC_INFO].actions = SC_DO_NOTHING; 153 else --- 21 unchanged lines hidden --- | 157} 158 159void 160sc_report::suppress_infos(bool suppress) 161{ 162 if (suppress) 163 sc_gem5::reportSevInfos[SC_INFO].actions = SC_DO_NOTHING; 164 else --- 21 unchanged lines hidden --- |