Skip to content

Commit c477285

Browse files
committed
minor
1 parent 3ca88e3 commit c477285

1 file changed

Lines changed: 4 additions & 6 deletions

File tree

lib/PhasarLLVM/TypeHierarchy/LLVMTypeHierarchy.cpp

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -294,12 +294,10 @@ LLVMTypeHierarchy::getSuperTypes(const llvm::StructType *Type) {
294294
}
295295

296296
const llvm::StructType *LLVMTypeHierarchy::getType(std::string TypeName) const {
297-
if (ClearNameTypeMap.count(TypeName)) {
298-
return ClearNameTypeMap.at(TypeName);
299-
}
300-
auto ClearName = boost::core::demangle(TypeName.c_str());
301-
if (ClearNameTypeMap.count(ClearName)) {
302-
return ClearNameTypeMap.at(ClearName);
297+
for (auto V : boost::make_iterator_range(boost::vertices(TypeGraph))) {
298+
if (TypeGraph[V].Type->getName() == TypeName) {
299+
return TypeGraph[V].Type;
300+
}
303301
}
304302
return nullptr;
305303
}

0 commit comments

Comments
 (0)