Verifier: Check accessors of MDLocation
[oota-llvm.git] / lib / AsmParser / LLParser.cpp
index 0e98692e11c80e4270e60552590ba8d314f5cee7..103c8c48a5e97db9c8a9021b7a01fa65c78517d7 100644 (file)
@@ -3348,8 +3348,8 @@ bool LLParser::ParseMDLocation(MDNode *&Result, bool IsDistinct) {
   PARSE_MD_FIELDS();
 #undef VISIT_MD_FIELDS
 
-  auto get = (IsDistinct ? MDLocation::getDistinct : MDLocation::get);
-  Result = get(Context, line.Val, column.Val, scope.Val, inlinedAt.Val);
+  Result = GET_OR_DISTINCT(
+      MDLocation, (Context, line.Val, column.Val, scope.Val, inlinedAt.Val));
   return false;
 }