32 if (!Directory.
empty())
33 O << Directory <<
"/";
45 O <<
"Compile unit: ";
50 O <<
"unknown-language(" <<
CU->getSourceLanguage() <<
")";
56 O <<
"Subprogram: " << S->getName();
57 printFile(O, S->getFilename(), S->getDirectory(), S->getLine());
58 if (!S->getLinkageName().empty())
59 O <<
" ('" << S->getLinkageName() <<
"')";
64 const auto *GV = GVU->getVariable();
65 O <<
"Global variable: " << GV->getName();
66 printFile(O, GV->getFilename(), GV->getDirectory(), GV->getLine());
67 if (!GV->getLinkageName().empty())
68 O <<
" ('" << GV->getLinkageName() <<
"')";
74 if (!
T->getName().empty())
75 O <<
' ' <<
T->getName();
76 printFile(O,
T->getFilename(),
T->getDirectory(),
T->getLine());
77 if (
auto *
BT = dyn_cast<DIBasicType>(
T)) {
80 if (!Encoding.empty())
83 O <<
"unknown-encoding(" <<
BT->getEncoding() <<
')';
90 O <<
"unknown-tag(" <<
T->getTag() <<
")";
92 if (
auto *CT = dyn_cast<DICompositeType>(
T)) {
93 if (
auto *S = CT->getRawIdentifier())
94 O <<
" (identifier: '" << S->getString() <<
"')";
This file contains constants used for implementing Dwarf debug support.
This header defines various interfaces for pass management in LLVM.
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)
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.