summaryrefslogtreecommitdiff
path: root/lib/ObjectYAML/DWARFEmitter.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2017-12-18 20:10:56 +0000
committerDimitry Andric <dim@FreeBSD.org>2017-12-18 20:10:56 +0000
commit044eb2f6afba375a914ac9d8024f8f5142bb912e (patch)
tree1475247dc9f9fe5be155ebd4c9069c75aadf8c20 /lib/ObjectYAML/DWARFEmitter.cpp
parenteb70dddbd77e120e5d490bd8fbe7ff3f8fa81c6b (diff)
Notes
Diffstat (limited to 'lib/ObjectYAML/DWARFEmitter.cpp')
-rw-r--r--lib/ObjectYAML/DWARFEmitter.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/ObjectYAML/DWARFEmitter.cpp b/lib/ObjectYAML/DWARFEmitter.cpp
index 89fc652035ca..c49c2249cdfe 100644
--- a/lib/ObjectYAML/DWARFEmitter.cpp
+++ b/lib/ObjectYAML/DWARFEmitter.cpp
@@ -62,8 +62,8 @@ static void ZeroFillBytes(raw_ostream &OS, size_t Size) {
OS.write(reinterpret_cast<char *>(FillData.data()), Size);
}
-void writeInitialLength(const DWARFYAML::InitialLength &Length, raw_ostream &OS,
- bool IsLittleEndian) {
+static void writeInitialLength(const DWARFYAML::InitialLength &Length,
+ raw_ostream &OS, bool IsLittleEndian) {
writeInteger((uint32_t)Length.TotalLength, OS, IsLittleEndian);
if (Length.isDWARF64())
writeInteger((uint64_t)Length.TotalLength64, OS, IsLittleEndian);
@@ -131,6 +131,7 @@ void DWARFYAML::EmitPubSection(raw_ostream &OS,
}
}
+namespace {
/// \brief An extension of the DWARFYAML::ConstVisitor which writes compile
/// units and DIEs to a stream.
class DumpVisitor : public DWARFYAML::ConstVisitor {
@@ -195,6 +196,7 @@ public:
DumpVisitor(const DWARFYAML::Data &DI, raw_ostream &Out)
: DWARFYAML::ConstVisitor(DI), OS(Out) {}
};
+} // namespace
void DWARFYAML::EmitDebugInfo(raw_ostream &OS, const DWARFYAML::Data &DI) {
DumpVisitor Visitor(DI, OS);