c++ - make 'new GlobalVariable' 时参数是什么意思?在“llvm FunctionPass”中
问题描述
GlobalVariable(Module &M, Type *Ty, bool isConstant,
LinkageTypes Linkage, Constant *Initializer,
const Twine &Name = "", GlobalVariable *InsertBefore = nullptr,
ThreadLocalMode = NotThreadLocal, unsigned AddressSpace = 0,
bool isExternallyInitialized = false);
我能理解这些东西(Module &M / Type *Ty / bool isConstant / Constant *Initializer)。
但我无法理解这些。(LinkageTypes Linkage / GlobalVariable *InsertBefore / ThreadLocalMode / unsigned AddressSpace / bool isExternallyInitialized)
你能解释一下吗?请!或者请告诉我如何参考这些。
我希望您对 Covid19 保持谨慎。谢谢你。
-------- 示例代码 --------
这是示例代码
GlobalVariable *SomeGV = new GlobalVariable(
*(SomeGV->getParent()), SomeConst->getType(), false,
SomeGV->getLinkage(), SomeConst, "HelloString", nullptr,
SomeGV->getThreadLocalMode(), SomeGV->getType()->getAddressSpace());
解决方案
推荐阅读
- math - 标记数据的离散度测量
- c++ - 对 Google CodeJam 2018 预选赛进行故障排序
- .net - 无法访问已处置的对象。此错误的常见原因是处理上下文
- haskell - 为什么这个单射类型族实际上不是单射的?
- maven - jenkins(openshift) chrome 节点上的“org.openqa.selenium.WebDriverException:未知错误:Chrome 无法启动:异常退出”问题
- php - 如何使用 Laravel 显示具有匹配记录字段的用户?
- javascript - d3 树工具提示不出现
- scala - Scala:如何异步捕获通过 Kafka 发送的所有多条消息的状态?
- android - GPS位置检索和在后台比较值的最佳方法?
- javascript - 大量输入,但在 redux-saga 中只有一个按钮提交