Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想问的是,我们能否检查给定指令是否包含一个数组作为 LLVM 中的操作数。我正在写一个通行证并停留在这个阶段。
是的,您可以使用以下代码进行检查:
Instruction *I; bool UsingArray = false; for (unsigned num = 0; num < I->getNumOperands(); ++num) if (isa<ArrayType>(I->getOperand(num)->getType())) UsingArray = true;