17 llvm::OpenMPIRBuilder &builder,
18 StringRef name, uint32_t &strLen) {
19 if (
auto fileLoc = dyn_cast<FileLineColLoc>(loc)) {
20 StringRef fileName = fileLoc.getFilename();
21 unsigned lineNo = fileLoc.getLine();
22 unsigned colNo = fileLoc.getColumn();
23 return builder.getOrCreateSrcLocStr(name, fileName, lineNo, colNo, strLen);
26 llvm::raw_string_ostream locOS(locStr);
28 return builder.getOrCreateSrcLocStr(locStr, strLen);
33 llvm::OpenMPIRBuilder &builder) {
35 if (
auto nameLoc = dyn_cast<NameLoc>(loc)) {
36 StringRef name = nameLoc.getName();
This class defines the main interface for locations in MLIR and acts as a non-nullable wrapper around...
llvm::Constant * createMappingInformation(Location loc, llvm::OpenMPIRBuilder &builder)
Create a constant string representing the mapping information extracted from the MLIR location inform...
llvm::Constant * createSourceLocStrFromLocation(Location loc, llvm::OpenMPIRBuilder &builder, StringRef name, uint32_t &strLen)
Create a constant string location from the MLIR Location information.