I'm writing a condition to see if a const llvm::Value* is a constant. The code is as following:
if(const Constant* c = dynamic_cast<Constant>(val)){
......
}
"val" here is a const llvm::Value*, however, the compiler says
error: 'llvm::Constant' is not a reference or pointer
if(const Constant* c = dynamic_cast<Constant>(val)){
^ ~~~~~~~~~~
How can I modify it?