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);
llvm::Constant * createSourceLocStrFromLocation(Location loc, llvm::OpenMPIRBuilder &builder, StringRef name, uint32_t &strLen)
Create a constant string location from the MLIR Location information.