diff options
author | Reid Kleckner <rnk@google.com> | 2017-07-17 23:59:44 +0000 |
---|---|---|
committer | Reid Kleckner <rnk@google.com> | 2017-07-17 23:59:44 +0000 |
commit | 67653ee0865fb7819fce751f8923b149e42d6027 (patch) | |
tree | efafe177d491e3aad201c87ff6cd090694590201 /llvm/lib/DebugInfo/CodeView/Formatters.cpp | |
parent | e737fc120e96fbdabab24060ec33567ea6c265db (diff) | |
download | llvm-67653ee0865fb7819fce751f8923b149e42d6027.zip llvm-67653ee0865fb7819fce751f8923b149e42d6027.tar.gz llvm-67653ee0865fb7819fce751f8923b149e42d6027.tar.bz2 |
[codeview] Fix YAML for LF_TYPESERVER2 by hoisting PDB_UniqueId
Summary:
We were treating the GUIDs in TypeServer2Record as strings, and the
non-ASCII bytes in the GUID would not round-trip through YAML.
We already had the PDB_UniqueId type portably represent a Windows GUID,
but we need to hoist that up to the DebugInfo/CodeView library so that
we can use it in the TypeServer2Record as well as in PDB parsing code.
Reviewers: inglorion, amccarth
Subscribers: llvm-commits, hiraditya
Differential Revision: https://reviews.llvm.org/D35495
llvm-svn: 308234
Diffstat (limited to 'llvm/lib/DebugInfo/CodeView/Formatters.cpp')
-rw-r--r-- | llvm/lib/DebugInfo/CodeView/Formatters.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/llvm/lib/DebugInfo/CodeView/Formatters.cpp b/llvm/lib/DebugInfo/CodeView/Formatters.cpp index 1fa8d21..b8d89c7 100644 --- a/llvm/lib/DebugInfo/CodeView/Formatters.cpp +++ b/llvm/lib/DebugInfo/CodeView/Formatters.cpp @@ -9,6 +9,7 @@ #include "llvm/DebugInfo/CodeView/Formatters.h" #include "llvm/ADT/ArrayRef.h" +#include "llvm/DebugInfo/CodeView/GUID.h" #include "llvm/Support/raw_ostream.h" #include <algorithm> #include <cassert> @@ -39,3 +40,9 @@ void GuidAdapter::format(raw_ostream &Stream, StringRef Style) { } Stream << "}"; } + +raw_ostream &llvm::codeview::operator<<(raw_ostream &OS, const GUID &Guid) { + codeview::detail::GuidAdapter A(Guid.Guid); + A.format(OS, ""); + return OS; +} |