@@ -261,22 +261,96 @@ MLIR_CAPI_EXPORTED MlirLocation mlirLocationFileLineColRangeGet(
261261 MlirContext context , MlirStringRef filename , unsigned start_line ,
262262 unsigned start_col , unsigned end_line , unsigned end_col );
263263
264+ /// Getter for filename of FileLineColRange.
265+ MLIR_CAPI_EXPORTED MlirIdentifier
266+ mlirLocationFileLineColRangeGetFilename (MlirLocation location );
267+
268+ /// Getter for start_line of FileLineColRange.
269+ MLIR_CAPI_EXPORTED unsigned
270+ mlirLocationFileLineColRangeGetStartLine (MlirLocation location );
271+
272+ /// Getter for start_column of FileLineColRange.
273+ MLIR_CAPI_EXPORTED unsigned
274+ mlirLocationFileLineColRangeGetStartColumn (MlirLocation location );
275+
276+ /// Getter for end_line of FileLineColRange.
277+ MLIR_CAPI_EXPORTED unsigned
278+ mlirLocationFileLineColRangeGetEndLine (MlirLocation location );
279+
280+ /// Getter for end_column of FileLineColRange.
281+ MLIR_CAPI_EXPORTED unsigned
282+ mlirLocationFileLineColRangeGetEndColumn (MlirLocation location );
283+
284+ /// TypeID Getter for FileLineColRange.
285+ MLIR_CAPI_EXPORTED MlirTypeID mlirLocationFileLineColRangeGetTypeID (void );
286+
287+ /// Checks whether the given location is an FileLineColRange.
288+ MLIR_CAPI_EXPORTED bool mlirLocationisAFileLineColRange (MlirLocation location );
289+
264290/// Creates a call site location with a callee and a caller.
265291MLIR_CAPI_EXPORTED MlirLocation mlirLocationCallSiteGet (MlirLocation callee ,
266292 MlirLocation caller );
267293
294+ /// Getter for callee of CallSite.
295+ MLIR_CAPI_EXPORTED MlirLocation
296+ mlirLocationCallSiteGetCallee (MlirLocation location );
297+
298+ /// Getter for caller of CallSite.
299+ MLIR_CAPI_EXPORTED MlirLocation
300+ mlirLocationCallSiteGetCaller (MlirLocation location );
301+
302+ /// TypeID Getter for CallSite.
303+ MLIR_CAPI_EXPORTED MlirTypeID mlirLocationCallSiteGetTypeID (void );
304+
305+ /// Checks whether the given location is an CallSite.
306+ MLIR_CAPI_EXPORTED bool mlirLocationisACallSite (MlirLocation location );
307+
268308/// Creates a fused location with an array of locations and metadata.
269309MLIR_CAPI_EXPORTED MlirLocation
270310mlirLocationFusedGet (MlirContext ctx , intptr_t nLocations ,
271311 MlirLocation const * locations , MlirAttribute metadata );
272312
313+ /// Getter for number of locations fused together.
314+ MLIR_CAPI_EXPORTED unsigned
315+ mlirLocationFusedGetNumLocations (MlirLocation location );
316+
317+ /// Getter for locations of Fused. Requires pre-allocated memory of
318+ /// #fusedLocations X sizeof(MlirLocation).
319+ MLIR_CAPI_EXPORTED void
320+ mlirLocationFusedGetLocations (MlirLocation location ,
321+ MlirLocation * locationsCPtr );
322+
323+ /// Getter for metadata of Fused.
324+ MLIR_CAPI_EXPORTED MlirAttribute
325+ mlirLocationFusedGetMetadata (MlirLocation location );
326+
327+ /// TypeID Getter for Fused.
328+ MLIR_CAPI_EXPORTED MlirTypeID mlirLocationFusedGetTypeID (void );
329+
330+ /// Checks whether the given location is an Fused.
331+ MLIR_CAPI_EXPORTED bool mlirLocationisAFused (MlirLocation location );
332+
273333/// Creates a name location owned by the given context. Providing null location
274334/// for childLoc is allowed and if childLoc is null location, then the behavior
275335/// is the same as having unknown child location.
276336MLIR_CAPI_EXPORTED MlirLocation mlirLocationNameGet (MlirContext context ,
277337 MlirStringRef name ,
278338 MlirLocation childLoc );
279339
340+ /// Getter for name of Name.
341+ MLIR_CAPI_EXPORTED MlirIdentifier
342+ mlirLocationNameGetName (MlirLocation location );
343+
344+ /// Getter for childLoc of Name.
345+ MLIR_CAPI_EXPORTED MlirLocation
346+ mlirLocationNameGetChildLoc (MlirLocation location );
347+
348+ /// TypeID Getter for Name.
349+ MLIR_CAPI_EXPORTED MlirTypeID mlirLocationNameGetTypeID (void );
350+
351+ /// Checks whether the given location is an Name.
352+ MLIR_CAPI_EXPORTED bool mlirLocationisAName (MlirLocation location );
353+
280354/// Creates a location with unknown position owned by the given context.
281355MLIR_CAPI_EXPORTED MlirLocation mlirLocationUnknownGet (MlirContext context );
282356
0 commit comments