[TableGen] Remove unnecessary default constructed SMLoc that just existed to return. Instead just call the default constructor in the return.

llvm-svn: 239277
This commit is contained in:
Craig Topper 2015-06-08 01:35:45 +00:00
parent e78e7c74dc
commit 1797bda23a
1 changed files with 1 additions and 5 deletions

View File

@ -59,11 +59,7 @@ private:
SMLoc CTagsEmitter::locate(const Record *R) {
ArrayRef<SMLoc> Locs = R->getLoc();
if (Locs.empty()) {
SMLoc NullLoc;
return NullLoc;
}
return Locs.front();
return !Locs.empty() ? Locs.front() : SMLoc();
}
void CTagsEmitter::run(raw_ostream &OS) {