diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2013-11-11 14:54:34 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2013-11-11 14:54:34 +0000 |
commit | 877ca3418f8fcd8e966e80b7e7f1dcb944dbed59 (patch) | |
tree | 4c97cdcdcf96797f83f1cdc27cea5dd1bf000b3a | |
parent | fa6ab4393ebb7add77a4a957dc50453d07b54a62 (diff) | |
download | llvm-877ca3418f8fcd8e966e80b7e7f1dcb944dbed59.tar.gz llvm-877ca3418f8fcd8e966e80b7e7f1dcb944dbed59.tar.bz2 llvm-877ca3418f8fcd8e966e80b7e7f1dcb944dbed59.tar.xz |
Simplify code. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194383 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/IR/Type.cpp | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/lib/IR/Type.cpp b/lib/IR/Type.cpp index 46c61fc06e..432cbc99f5 100644 --- a/lib/IR/Type.cpp +++ b/lib/IR/Type.cpp @@ -616,11 +616,7 @@ bool StructType::isLayoutIdentical(StructType *Other) const { /// getTypeByName - Return the type with the specified name, or null if there /// is none by that name. StructType *Module::getTypeByName(StringRef Name) const { - StringMap<StructType*>::iterator I = - getContext().pImpl->NamedStructTypes.find(Name); - if (I != getContext().pImpl->NamedStructTypes.end()) - return I->second; - return 0; + return getContext().pImpl->NamedStructTypes.lookup(Name); } |