Check pointer to pointer type in LLVM
c++, clang, llvm
Solution
You can invoke `Type::getContainedType(int)` to get access to the pointee type. So it should look like this:
bool isPointerToPointer(const Value* V) {
const Type* T = V->getType();
return T->isPointerTy() && T->getContainedType(0)->isPointerTy();
}
Problem
How to check an operand is `pointer to pointer` type in `LLVM`? We can check is operand pointer or not, but how to check is it pointing to a pointer? I am using `Clang` to generate intermediate code and using `C++` for source file.