From: Craig Topper Date: Mon, 8 Jun 2015 01:35:45 +0000 (+0000) Subject: [TableGen] Remove unnecessary default constructed SMLoc that just existed to return... X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=095bfde743392245f62d2f9e8da690db439684ef;p=oota-llvm.git [TableGen] Remove unnecessary default constructed SMLoc that just existed to return. Instead just call the default constructor in the return. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239277 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/utils/TableGen/CTagsEmitter.cpp b/utils/TableGen/CTagsEmitter.cpp index 43915ccd0c7..35f4ad6dd5b 100644 --- a/utils/TableGen/CTagsEmitter.cpp +++ b/utils/TableGen/CTagsEmitter.cpp @@ -59,11 +59,7 @@ private: SMLoc CTagsEmitter::locate(const Record *R) { ArrayRef 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) {