14#ifndef LLVM_DEBUGINFO_LOGICALVIEW_CORE_LVREADER_H 
   15#define LLVM_DEBUGINFO_LOGICALVIEW_CORE_LVREADER_H 
   35  std::unique_ptr<ToolOutputFile> OutputFile;
 
   49      OutputFile->os().close();
 
 
 
   68  using LVCompileUnits = std::map<LVOffset, LVScopeCompileUnit *>;
 
   69  LVCompileUnits CompileUnits;
 
   78  Error createSplitFolder();
 
   79  bool OutputSplit = 
false;
 
   82#define LV_OBJECT_ALLOCATOR(KIND)                                              \ 
   83  llvm::SpecificBumpPtrAllocator<LV##KIND> Allocated##KIND; 
 
  124#undef LV_OBJECT_ALLOCATOR 
  129  using LVSectionRanges = std::map<LVSectionIndex, std::unique_ptr<LVRange>>;
 
  130  LVSectionRanges SectionRanges;
 
  168    Root = createScopeRoot();
 
  170    if (
options().getAttributeFormat())
 
 
  189    return std::string(Path);
 
 
  192  virtual Error printScopes();
 
  193  virtual Error printMatchedElements(
bool UseMatchedElements);
 
  200      : BinaryType(BinaryType), OutputSplit(
options().getOutputSplit()),
 
  202        OS(
W.getOStream()) {}
 
 
  214#define LV_CREATE_OBJECT(KIND)                                                 \ 
  215  LV##KIND *create##KIND() {                                                   \ 
  216    return new (Allocated##KIND.Allocate()) LV##KIND();                        \ 
 
  255#undef LV_CREATE_OBJECT 
  259    return new (AllocatedOperation.Allocate()) 
LVOperation(OpCode, Operands);
 
 
  275    assert(Scope && Scope->isCompileUnit() && 
"Scope is not a compile unit");
 
 
  311    if (!
options().getCompareContext() && 
options().getCompareLines())
 
  312      Lines.push_back(
Line);
 
 
  315    if (!
options().getCompareContext() && 
options().getCompareScopes())
 
  316      Scopes.push_back(Scope);
 
 
  319    if (!
options().getCompareContext() && 
options().getCompareSymbols())
 
  320      Symbols.push_back(Symbol);
 
 
  323    if (!
options().getCompareContext() && 
options().getCompareTypes())
 
  324      Types.push_back(
Type);
 
 
  340    return patterns().printElement(Scope);
 
 
  343    return patterns().printElement(Symbol);
 
 
  350  static void setInstance(
LVReader *Reader);
 
  355#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) 
 
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
 
static void print(raw_ostream &Out, object::Archive::Kind Kind, T Val)
 
static SmallString< 128 > getFilename(const DIScope *SP, vfs::FileSystem &VFS)
Extract a filename for a DIScope.
 
#define LV_CREATE_OBJECT(KIND)
 
#define LV_OBJECT_ALLOCATOR(KIND)
 
PowerPC Reduce CR logical Operation
 
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
 
Lightweight error class with error context and mandatory checking.
 
static ErrorSuccess success()
Create a success value.
 
SmallString - A SmallString is just a SmallVector with methods and accessors that make it work better...
 
StringRef - Represent a constant reference to a string, i.e.
 
The instances of the Type class are immutable: once they are created, they are never changed.
 
The logical reader owns of all the logical elements created during the debug information parsing.
 
virtual void sortScopes()
 
StringRef getFileFormatName() const
 
LVRange * getSectionRanges(LVSectionIndex SectionIndex)
 
void addCompileUnitOffset(LVOffset Offset, LVScopeCompileUnit *CompileUnit)
 
bool doPrintLine(const LVLine *Line) const
 
std::vector< LVAddressRange > CurrentRanges
 
const LVTypes & getTypes() const
 
std::string FileFormatName
 
void notifyAddedElement(LVType *Type)
 
void notifyAddedElement(LVLine *Line)
 
virtual std::string getRegisterName(LVSmall Opcode, ArrayRef< uint64_t > Operands)
 
const LVSymbols & getSymbols() const
 
void notifyAddedElement(LVSymbol *Symbol)
 
raw_ostream & outputStream()
 
codeview::CPUType getCompileUnitCPUType()
 
std::string createAlternativePath(StringRef From)
 
const LVLines & getLines() const
 
LVElement * CurrentElement
 
LVReader(const LVReader &)=delete
 
bool doPrintSymbol(const LVSymbol *Symbol) const
 
void setFilename(std::string Name)
 
bool isBinaryTypeCOFF() const
 
bool isBinaryTypeNone() const
 
LVSectionIndex getDotTextSectionIndex() const
 
void setCompileUnitCPUType(codeview::CPUType Type)
 
LVReader & operator=(const LVReader &)=delete
 
bool doPrintLocation(const LVLocation *Location) const
 
virtual bool isSystemEntry(LVElement *Element, StringRef Name={}) const
 
std::string InputFilename
 
LVSplitContext & getSplitContext()
 
bool isBinaryTypeELF() const
 
virtual ~LVReader()=default
 
StringRef getFilename() const
 
static LVReader & getInstance()
 
const LVScopes & getScopes() const
 
LVScopeCompileUnit * CompileUnit
 
LVReader(StringRef InputFilename, StringRef FileFormatName, ScopedPrinter &W, LVBinaryType BinaryType=LVBinaryType::NONE)
 
LVScopeCompileUnit * getCompileUnit() const
 
LVScopeRoot * getScopesRoot() const
 
virtual LVSectionIndex getSectionIndex(LVScope *Scope)
 
LVSectionIndex DotTextSectionIndex
 
void setCompileUnit(LVScope *Scope)
 
LVOperation * createOperation(LVSmall OpCode, ArrayRef< LVUnsigned > Operands)
 
bool doPrintType(const LVType *Type) const
 
void addSectionRange(LVSectionIndex SectionIndex, LVScope *Scope)
 
virtual Error createScopes()
 
bool doPrintScope(const LVScope *Scope) const
 
void notifyAddedElement(LVScope *Scope)
 
virtual void printRecords(raw_ostream &OS) const
 
std::string getLocation() const
 
LVSplitContext(const LVSplitContext &)=delete
 
LVSplitContext & operator=(const LVSplitContext &)=delete
 
LLVM_ABI Error createSplitFolder(StringRef Where)
 
LLVM_ABI std::error_code open(std::string Name, std::string Extension, raw_ostream &OS)
 
~LVSplitContext()=default
 
A raw_ostream that writes to a file descriptor.
 
This class implements an extremely fast bulk output stream that can only output to a stream.
 
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
 
CPUType
These values correspond to the CV_CPU_TYPE_e enumeration, and are documented here: https://msdn....
 
constexpr LVSectionIndex UndefinedSectionIndex
 
LVScopeCompileUnit * getReaderCompileUnit()
 
SmallVector< LVScope *, 8 > LVScopes
 
SmallVector< LVSymbol *, 8 > LVSymbols
 
LVSplitContext & getReaderSplitContext()
 
SmallVector< LVLine *, 8 > LVLines
 
SmallVector< LVType *, 8 > LVTypes
 
LLVM_ABI StringRef parent_path(StringRef path LLVM_LIFETIME_BOUND, Style style=Style::native)
Get parent path.
 
LLVM_ABI StringRef filename(StringRef path LLVM_LIFETIME_BOUND, Style style=Style::native)
Get filename.
 
LLVM_ABI std::string convert_to_slash(StringRef path, Style style=Style::native)
Replaces backslashes with slashes if Windows.
 
LLVM_ABI void append(SmallVectorImpl< char > &path, const Twine &a, const Twine &b="", const Twine &c="", const Twine &d="")
Append to path.
 
This is an optimization pass for GlobalISel generic memory operations.
 
LLVM_ABI raw_ostream & dbgs()
dbgs() - This returns a reference to a raw_ostream for debugging messages.