MLIR 22.0.0git
PrintCallHelper.cpp File Reference

Go to the source code of this file.

Functions

static std::string ensureSymbolNameIsUnique (ModuleOp moduleOp, StringRef symbolName, SymbolTableCollection *symbolTables=nullptr)
 Check if a given symbol name is already in use within the module operation.

Function Documentation

◆ ensureSymbolNameIsUnique()

std::string ensureSymbolNameIsUnique ( ModuleOp moduleOp,
StringRef symbolName,
SymbolTableCollection * symbolTables = nullptr )
static

Check if a given symbol name is already in use within the module operation.

If no symbol with such name is present, then the same identifier is returned. Otherwise, a unique and yet unused identifier is computed starting from the requested one.

Definition at line 25 of file PrintCallHelper.cpp.

References mlir::SymbolTable::generateSymbolName(), and mlir::SymbolTable::lookupSymbolIn().

Referenced by mlir::LLVM::createPrintStrCall().