aboutsummaryrefslogtreecommitdiffstats
path: root/lib/IR/Type.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/IR/Type.cpp')
-rw-r--r--lib/IR/Type.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/lib/IR/Type.cpp b/lib/IR/Type.cpp
index 46c61fc..432cbc9 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);
}