【发布时间】:2021-07-21 12:25:37
【问题描述】:
在https://github.com/llvm/llvm-project/tree/main/llvm/examples/ModuleMaker 中是静态变量。 如何读取参数模块并放入添加指令?
Instruction *Add = BinaryOperator::Create(Instruction::Add, x, y, "tmp");
如何分配给 x = 参数块 1
【问题讨论】:
在https://github.com/llvm/llvm-project/tree/main/llvm/examples/ModuleMaker 中是静态变量。 如何读取参数模块并放入添加指令?
Instruction *Add = BinaryOperator::Create(Instruction::Add, x, y, "tmp");
如何分配给 x = 参数块 1
【问题讨论】:
Function::arg_iterator argument = F->arg_begin();
Argument *Pierwszy = argument++;
Pierwszy->setName("c");
Value *Drugi = argument++;
Drugi->setName("d");
/* tworzymy instrukcję */
Instruction *Dodaj = BinaryOperator::Create(Instruction::Add,
Pierwszy, Drugi, "wynik");
【讨论】: