mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-03-06 01:19:28 +00:00
Don't recurse twice when we can recurse once
llvm-svn: 112246
This commit is contained in:
parent
2561aa6124
commit
f5bae22db7
@ -765,9 +765,10 @@ ASTContext::getTypeInfo(const Type *T) {
|
||||
|
||||
case Type::Typedef: {
|
||||
const TypedefDecl *Typedef = cast<TypedefType>(T)->getDecl();
|
||||
Align = std::max(Typedef->getMaxAlignment(),
|
||||
getTypeAlign(Typedef->getUnderlyingType().getTypePtr()));
|
||||
Width = getTypeSize(Typedef->getUnderlyingType().getTypePtr());
|
||||
std::pair<uint64_t, unsigned> Info
|
||||
= getTypeInfo(Typedef->getUnderlyingType().getTypePtr());
|
||||
Align = std::max(Typedef->getMaxAlignment(), Info.second);
|
||||
Width = Info.first;
|
||||
break;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user