[llvm] r194383 - Simplify code. No functionality change.
Benjamin Kramer
benny.kra at googlemail.com
Mon Nov 11 06:54:34 PST 2013
Author: d0k
Date: Mon Nov 11 08:54:34 2013
New Revision: 194383
URL: http://llvm.org/viewvc/llvm-project?rev=194383&view=rev
Log:
Simplify code. No functionality change.
Modified:
llvm/trunk/lib/IR/Type.cpp
Modified: llvm/trunk/lib/IR/Type.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/Type.cpp?rev=194383&r1=194382&r2=194383&view=diff
==============================================================================
--- llvm/trunk/lib/IR/Type.cpp (original)
+++ llvm/trunk/lib/IR/Type.cpp Mon Nov 11 08:54:34 2013
@@ -616,11 +616,7 @@ bool StructType::isLayoutIdentical(Struc
/// 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);
}
More information about the llvm-commits
mailing list