AsmParser: Simplify ParseMDTuple(), NFC
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>
Mon, 12 Jan 2015 22:23:04 +0000 (22:23 +0000)
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>
Mon, 12 Jan 2015 22:23:04 +0000 (22:23 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225708 91177308-0d34-0410-b5e6-96231b3b80d8

lib/AsmParser/LLParser.cpp

index aac8022a2466b33c4ba39cbbdecd2df79e422643..5090cfb8a508e21b0fe9fa4010b6df534e1d9572 100644 (file)
@@ -2908,10 +2908,7 @@ bool LLParser::ParseMDTuple(MDNode *&MD, bool IsDistinct) {
   if (ParseMDNodeVector(Elts))
     return true;
 
-  if (IsDistinct)
-    MD = MDNode::getDistinct(Context, Elts);
-  else
-    MD = MDNode::get(Context, Elts);
+  MD = (IsDistinct ? MDNode::getDistinct : MDNode::get)(Context, Elts);
   return false;
 }