Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions pass/pass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -382,11 +382,13 @@ void IRHashPass::hashType(const Type *Ty, Hasher &hash) {
case Type::StructTyID: {
const StructType *STy = cast<StructType>(Ty);

const StringRef name = STy->getName();
if (!name.empty()) {
// hash globaly once and just hash the name afterwards
hash.update(name);
return;
if (!STy->isLiteral()) {
const StringRef name = STy->getName();
if (!name.empty()) {
// hash globaly once and just hash the name afterwards
hash.update(name);
return;
}
}

hash.update(STy->isLiteral());
Expand Down