Skip to content
Commit 218dad85 authored by Yaron Keren's avatar Yaron Keren
Browse files

Optimize Type::isStructureOrClassType() by reusing RT->getDecl().

RecordType->getDecl() which maps to TagType::getDecl() is not a simple
accessor but a loop on redecls in getInterestingTagDecl.

isStructureOrClassType() was calling getDecl() three times performing
three times the work actually required. It is optimized by calling 
RT->getDecl() once and reusing the result three times.

llvm-svn: 220033
parent 32ba1735
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment