Simplify some code, NFC.

This commit is contained in:
Xi Ge
2016-02-24 16:21:06 -08:00
parent 5270e62bb4
commit 2db856e5f9

View File

@@ -1542,10 +1542,7 @@ Optional<CommentInfo> ModuleFile::getCommentForDecl(const Decl *D) const {
Optional<StringRef> ModuleFile::getGroupNameById(unsigned Id) const {
if(!GroupNamesMap || GroupNamesMap->count(Id) == 0)
return None;
auto Group = (*GroupNamesMap)[Id];
if (Group.empty())
return None;
return Group;
return (*GroupNamesMap)[Id];
}
Optional<StringRef> ModuleFile::getGroupNameForDecl(const Decl *D) const {