mirror of
https://github.com/RPCSX/llvm.git
synced 2024-12-04 01:43:06 +00:00
[ASan] fixup for r167725: Don't fetch name of StructType if it is literal
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167729 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
4c0ae9066f
commit
1faf9be569
@ -97,8 +97,9 @@ static StringRef GetGVTypeString(const GlobalVariable &G) {
|
||||
// Types of GlobalVariables are always pointer types.
|
||||
Type *GType = G.getType()->getElementType();
|
||||
// For now we support blacklisting struct types only.
|
||||
if (GType->isStructTy()) {
|
||||
return GType->getStructName();
|
||||
if (StructType *SGType = dyn_cast<StructType>(GType)) {
|
||||
if (!SGType->isLiteral())
|
||||
return SGType->getName();
|
||||
}
|
||||
return "<unknown type>";
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user