当前位置: 首页 > news >正文

seo网站平台百度点击器下载

seo网站平台,百度点击器下载,温州网站建设模板总部,日本优秀包装设计案例1、抛出error信息并终止程序 使用DiagnosticInfoUnsupported可以向用户抛出error信息并且终止程序,效果如同report_fatal_error、Error。后端用法如下: void xxxx::reportErrorMsg(const MachineFunction &MF)const {const Function &F MF.ge…

1、抛出error信息并终止程序

使用DiagnosticInfoUnsupported可以向用户抛出error信息并且终止程序,效果如同report_fatal_error、Error。后端用法如下:

void xxxx::reportErrorMsg(const MachineFunction &MF)const {const Function &F = MF.getFunction();// Diagnostic information for unsupported feature in backend.F.getContext().diagnose(DiagnosticInfoUnsupported{F, "report msg."});
}

2、优化pass中抛出警告信息之OptimizationRemark

使用时clang得加上-Rpass=name,llc得加上–pass-remarks=name才行,后端用法如下:

#include "llvm/Analysis/OptimizationRemarkEmitter.h"void getAnalysisUsage(AnalysisUsage &AU) const override {AU.addRequired<OptimizationRemarkEmitterWrapperPass>();MachineFunctionPass::getAnalysisUsage(AU);}
void xxx::reportWarningMsg(const MachineFunction &MF)const {auto *ORE = &getAnalysis<OptimizationRemarkEmitterWrapperPass>().getORE();const Function &F = MF.getFunction();// Diagnostic information for applied optimization remarksOptimizationRemark R(DEBUG_TYPE, "replace-spill-register", &F);R << "report msg";ORE->emit(R);
}

3、machine ir抛信息之DiagnosticInfoMIRParser

该接口同样支持DS_Error,DS_Warning,DS_Remark和DS_Note 4种方式,后端用法如下:

#include "llvm/IR/DiagnosticInfo.h"
#include "llvm/Support/SourceMgr.h"
void xxx::reportWarningMsg(const MachineFunction &MF)const {const Function &F = MF.getFunction();// Diagnostic information for machine IR parser.F.getContext().diagnose(DiagnosticInfoMIRParser(DS_Warning,SMDiagnostic(DEBUG_TYPE, SourceMgr::DK_Warning, "report msg")));
}

4、AsmParser之Warning

基本用法如下:

XXXAsmParser &Parser;
void Warning(SMLoc L, const Twine &Msg) { Parser.Warning(L, Msg); }

5、MCContext之reportWarning

基本用法如下:

MCContext &Context;
void MCContext::reportWarning(SMLoc Loc, const Twine &Msg)
Context.reportWarning(MCxxx.getLoc(), Msg);

6、其它类型的信息

包括DiagnosticInfoInlineAsm,DiagnosticInfoResourceLimit,DiagnosticInfoStackSize,DiagnosticInfoOptimizationBase,DiagnosticInfoIROptimization以及debug,Profileing,remarks等。

  1. 其中llvm_unreachable为开发者使用,发布时用户不可见,所看到的信息为segment fatal。
  2. assert由于存在判断开销,一般也不在发布中开启。

7、用例如何检查report_fatal_error

  1. RUN命令需要使用not,用法如下:
// RUN: not %clang --target=xx -mcpu=xxx -O3 -c %s -o - 2>&1 | FileCheck %s --check-prefix=expected-error
....
// expected-error: xxxx
  1. 使用-fsyntax-only -verify,用法如下:
// RUN: %clang_cc1 -triple xxx  -target-feature xx -fsyntax-only -verify %s
// expected-warning{{xxxxxxxx}} expected-error{{xxxxxxxxxxxxxxx}}
http://www.hkea.cn/news/476847/

相关文章:

  • 知名做网站费用2024年将爆发新瘟疫
  • 河北省城乡与建设厅网站企业关键词排名优化哪家好
  • 网站开发合同协议百度百科推广费用
  • 推荐黄的网站产品推广策划
  • 济南网站建设设计公司线上运营推广
  • 小清新 wordpressseo排名是什么意思
  • 从客户—管理者为某一公司做一份电子商务网站管理与维护的方案自媒体是如何赚钱的
  • 黑龙江住房和城乡建设厅网站首页每日精选12条新闻
  • 做网站工作都包括什么企业网站搭建
  • 自己可以进行网站建设吗河北网站推广
  • 网站建设与管理论文seo整站怎么优化
  • 西安做网站收费价格网站流量监控
  • 福州网站制作有限公司南京疫情最新情况
  • 国外品牌设计网站天津疫情最新消息
  • 宁波有做网站的地方吗seo报价单
  • 深圳企业网站开发中国法律服务网app最新下载
  • 大连企业网站建站国外域名注册网站
  • 站长工具seo综合查询权重百度在线搜索
  • 伊犁网站建设评价怎样才能上百度
  • 房地产网站建设方案百度实名认证
  • 做外贸可以在哪些网站注册网络项目免费的资源网
  • 中国建设银行信用卡网站首页青岛关键词优化平台
  • 阿里云网站建设考试题目长沙网站推广服务公司
  • 甘肃建设项目审批权限网站俄罗斯搜索引擎yandex官网入口
  • 网站建设公司新员工培训ppt模板百度热门搜索排行榜
  • 仿魔客吧网站模板网址大全是ie浏览器吗
  • 网站产品后台界面怎么做湖南关键词排名推广
  • 网站数据每隔几秒切换怎么做的湖南百度seo排名点击软件
  • 网站制作先学什么百度新闻下载安装
  • 河南省网站建设哪家好免费观看行情软件网站进入