R600/SI: Move gds operand to the end of operand list
[oota-llvm.git] / lib / IR / DebugLoc.cpp
index 88f2dbc5410cf5cf88c4263b81e3d25095b630c7..e1bf7951a5882142f8bf062e92a59e4769a0044f 100644 (file)
@@ -53,17 +53,8 @@ DebugLoc DebugLoc::get(unsigned Line, unsigned Col,
   if (!Scope)
     return DebugLoc();
 
-  // Saturate line and col to "unknown".
-  // FIXME: Allow 16-bits for columns.
-  if (Col > 255) Col = 0;
-  if (Line >= (1 << 24)) Line = 0;
-
-  LLVMContext &Context = Scope->getContext();
-  Type *Int32 = Type::getInt32Ty(Context);
-  Metadata *Elts[] = {ConstantAsMetadata::get(ConstantInt::get(Int32, Line)),
-                      ConstantAsMetadata::get(ConstantInt::get(Int32, Col)),
-                      Scope, InlinedAt};
-  return getFromDILocation(MDNode::get(Context, Elts));
+  return getFromDILocation(
+      MDLocation::get(Scope->getContext(), Line, Col, Scope, InlinedAt));
 }
 
 /// getAsMDNode - This method converts the compressed DebugLoc node into a