9 #include "PassDetail.h" 18 struct StripDebugInfo :
public StripDebugInfoBase<StripDebugInfo> {
19 void runOnOperation()
override;
23 void StripDebugInfo::runOnOperation() {
24 auto unknownLoc = UnknownLoc::get(&getContext());
31 for (
Block &block : region.getBlocks()) {
33 arg.setLoc(unknownLoc);
42 return std::make_unique<StripDebugInfo>();
Include the generated interface declarations.
This class contains a list of basic blocks and a link to the parent operation it is attached to...
Operation is a basic unit of execution within MLIR.
MutableArrayRef< Region > getRegions()
Returns the regions held by this operation.
Block represents an ordered list of Operations.
This class represents an argument of a Block.
void setLoc(Location loc)
Set the source location the operation was defined or derived from.
std::unique_ptr< Pass > createStripDebugInfoPass()
Creates a pass to strip debug information from a function.