14#include "llvm/Analysis/RegionInfo.h"
15#include "llvm/IR/DebugInfoMetadata.h"
22 std::string &FileName) {
26 for (
const BasicBlock *BB : R->blocks())
27 for (
const Instruction &Inst : *BB) {
28 DebugLoc DL = Inst.getStableDebugLoc();
32 auto *Scope = cast<DIScope>(DL.getScope());
35 FileName = Scope->getFilename().str();
37 unsigned NewLine = DL.getLine();
39 LineBegin = std::min(LineBegin, NewLine);
40 LineEnd = std::max(LineEnd, NewLine);
This file contains the declaration of the PolyhedralInfo class, which will provide an interface to ex...
void getDebugLocation(const llvm::Region *R, unsigned &LineBegin, unsigned &LineEnd, std::string &FileName)
Get the location of a region from the debug info.