Simplify code. No functionality change.

llvm-svn: 194383
This commit is contained in:
Benjamin Kramer 2013-11-11 14:54:34 +00:00
parent 18636a8777
commit ae6bccea9e
1 changed files with 1 additions and 5 deletions

View File

@ -616,11 +616,7 @@ bool StructType::isLayoutIdentical(StructType *Other) const {
/// getTypeByName - Return the type with the specified name, or null if there /// getTypeByName - Return the type with the specified name, or null if there
/// is none by that name. /// is none by that name.
StructType *Module::getTypeByName(StringRef Name) const { StructType *Module::getTypeByName(StringRef Name) const {
StringMap<StructType*>::iterator I = return getContext().pImpl->NamedStructTypes.lookup(Name);
getContext().pImpl->NamedStructTypes.find(Name);
if (I != getContext().pImpl->NamedStructTypes.end())
return I->second;
return 0;
} }