34 if (!Directory.
empty())
35 O << Directory <<
"/";
47 O <<
"Compile unit: ";
52 O <<
"unknown-language(" <<
CU->getSourceLanguage() <<
")";
58 O <<
"Subprogram: " << S->getName();
59 printFile(O, S->getFilename(), S->getDirectory(), S->getLine());
60 if (!S->getLinkageName().empty())
61 O <<
" ('" << S->getLinkageName() <<
"')";
66 const auto *GV = GVU->getVariable();
67 O <<
"Global variable: " << GV->getName();
68 printFile(O, GV->getFilename(), GV->getDirectory(), GV->getLine());
69 if (!GV->getLinkageName().empty())
70 O <<
" ('" << GV->getLinkageName() <<
"')";
76 if (!
T->getName().empty())
77 O <<
' ' <<
T->getName();
78 printFile(O,
T->getFilename(),
T->getDirectory(),
T->getLine());
79 if (
auto *
BT = dyn_cast<DIBasicType>(
T)) {
82 if (!Encoding.empty())
85 O <<
"unknown-encoding(" <<
BT->getEncoding() <<
')';
92 O <<
"unknown-tag(" <<
T->getTag() <<
")";
94 if (
auto *CT = dyn_cast<DICompositeType>(
T)) {
95 if (
auto *S = CT->getRawIdentifier())
96 O <<
" (identifier: '" << S->getString() <<
"')";
This file contains constants used for implementing Dwarf debug support.
static void printModuleDebugInfo(raw_ostream &O, const Module *M, const DebugInfoFinder &Finder)
static void printFile(raw_ostream &O, StringRef Filename, StringRef Directory, unsigned Line=0)
This header defines various interfaces for pass management in LLVM.
A container for analyses that lazily runs them and caches their results.
Utility to find all debug info in a module.
void processModule(const Module &M)
Process entire module and collect debug info anchors.
iterator_range< global_variable_expression_iterator > global_variables() const
iterator_range< subprogram_iterator > subprograms() const
iterator_range< type_iterator > types() const
iterator_range< compile_unit_iterator > compile_units() const
PreservedAnalyses run(Module &M, ModuleAnalysisManager &AM)
ModuleDebugInfoPrinterPass(raw_ostream &OS)
A Module instance is used to store all the information related to an LLVM module.
A set of analyses that are preserved following a run of a transformation pass.
static PreservedAnalyses all()
Construct a special preserved set that preserves all passes.
StringRef - Represent a constant reference to a string, i.e.
constexpr bool empty() const
empty - Check if the string is empty.
This class implements an extremely fast bulk output stream that can only output to a stream.
StringRef LanguageString(unsigned Language)
StringRef AttributeEncodingString(unsigned Encoding)
StringRef TagString(unsigned Tag)
This is an optimization pass for GlobalISel generic memory operations.