修改了输出

This commit is contained in:
lyc 2024-12-03 00:44:20 +08:00
parent 9020d824bd
commit 3d6ed0a5a9
2 changed files with 6 additions and 5 deletions

View File

@ -28,7 +28,7 @@ void init_log(const std::string& log_file_name, const std::string& log_path) {
google::InitGoogleLogging(log_file_name.c_str());
google::SetLogDestination(google::GLOG_INFO, (log_path + "/").c_str());
google::InstallFailureSignalHandler(); // Capture signals
FLAGS_log_prefix = true; // Log prefixes
FLAGS_log_prefix = false; // Log prefixes
FLAGS_colorlogtostderr = true; // Color logs in stderr
FLAGS_alsologtostderr = true; // Log to console
FLAGS_logbufsecs = 0; // Disable log buffering

View File

@ -45,10 +45,11 @@ ASMBlock BlockTranslator::BlockTranslate(SymbolManager& SymbolManager_, std::sha
for (int i = 0; i < TACBlock_->size(); i++) {
LOG(INFO) << std::left
<< std::setw(20) << std::setfill(' ') << (*TACBlock_)[i].to_string()
<< (*TACBlock_)[i].src1.use_info << "\t"
<< (*TACBlock_)[i].src2.use_info << "\t"
<< (*TACBlock_)[i].dst.use_info << "\t"
<< "scope " << (*TACBlock_)[i].scope;
// << (*TACBlock_)[i].src1.use_info << "\t"
// << (*TACBlock_)[i].src2.use_info << "\t"
// << (*TACBlock_)[i].dst.use_info << "\t"
// << "scope " << (*TACBlock_)[i].scope
;
// 更新 SymbolManager 的 scope 和 待用信息
SymbolManager_.set_scope((*TACBlock_)[i].scope);
if ((*TACBlock_)[i].src1.OperType == TACOPERANDTYPE::VAR) {