Use canonical type when making type based decision
This commit is contained in:
parent
569ef839cb
commit
df44a9d01d
@ -162,9 +162,9 @@ static std::string executePrintValue(const Value &V, const T &val) {
|
||||
|
||||
static std::string invokePrintValueOverload(const Value &V) {
|
||||
clang::ASTContext &C = V.getASTContext();
|
||||
clang::QualType Ty = V.getType().getDesugaredType(C);
|
||||
clang::QualType Ty = V.getType().getDesugaredType(C).getCanonicalType();
|
||||
if (const clang::BuiltinType *BT
|
||||
= llvm::dyn_cast<clang::BuiltinType>(Ty.getCanonicalType())) {
|
||||
= llvm::dyn_cast<clang::BuiltinType>(Ty.getTypePtr())) {
|
||||
switch (BT->getKind()) {
|
||||
case clang::BuiltinType::Bool:
|
||||
return executePrintValue<bool>(V, V.getLL());
|
||||
|
Loading…
x
Reference in New Issue
Block a user