summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-pdbutil/YAMLOutputStyle.cpp
diff options
context:
space:
mode:
authorZachary Turner <zturner@google.com>2017-06-14 15:59:27 +0000
committerZachary Turner <zturner@google.com>2017-06-14 15:59:27 +0000
commita8cfc29c9a3e39a18f576a2820a7a259654fe953 (patch)
tree0707a0cba986b7f81b14e8781df132f561701660 /llvm/tools/llvm-pdbutil/YAMLOutputStyle.cpp
parent50a9dfa2718fda3bacdc95984d7065fac59ad147 (diff)
downloadbcm5719-llvm-a8cfc29c9a3e39a18f576a2820a7a259654fe953.tar.gz
bcm5719-llvm-a8cfc29c9a3e39a18f576a2820a7a259654fe953.zip
Resubmit "[codeview] Make obj2yaml/yaml2obj support .debug$S..."
This was originally reverted because of some non-deterministic failures on certain buildbots. Luckily ASAN eventually caught this as a stack-use-after-scope, so the fix is included in this patch. llvm-svn: 305393
Diffstat (limited to 'llvm/tools/llvm-pdbutil/YAMLOutputStyle.cpp')
-rw-r--r--llvm/tools/llvm-pdbutil/YAMLOutputStyle.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/llvm/tools/llvm-pdbutil/YAMLOutputStyle.cpp b/llvm/tools/llvm-pdbutil/YAMLOutputStyle.cpp
index 4ab7cd39b29..8f7aba6d30c 100644
--- a/llvm/tools/llvm-pdbutil/YAMLOutputStyle.cpp
+++ b/llvm/tools/llvm-pdbutil/YAMLOutputStyle.cpp
@@ -18,6 +18,7 @@
#include "llvm/DebugInfo/CodeView/DebugSubsection.h"
#include "llvm/DebugInfo/CodeView/DebugUnknownSubsection.h"
#include "llvm/DebugInfo/CodeView/Line.h"
+#include "llvm/DebugInfo/CodeView/StringsAndChecksums.h"
#include "llvm/DebugInfo/MSF/MappedBlockStream.h"
#include "llvm/DebugInfo/PDB/Native/DbiStream.h"
#include "llvm/DebugInfo/PDB/Native/InfoStream.h"
@@ -236,14 +237,16 @@ Error YAMLOutputStyle::dumpDbiStream() {
if (!ExpectedChecksums)
return ExpectedChecksums.takeError();
+ StringsAndChecksumsRef SC(ExpectedST->getStringTable(),
+ *ExpectedChecksums);
+
for (const auto &SS : ModS.subsections()) {
opts::ModuleSubsection OptionKind = convertSubsectionKind(SS.kind());
if (!opts::checkModuleSubsection(OptionKind))
continue;
auto Converted =
- CodeViewYAML::YAMLDebugSubsection::fromCodeViewSubection(
- ExpectedST->getStringTable(), *ExpectedChecksums, SS);
+ CodeViewYAML::YAMLDebugSubsection::fromCodeViewSubection(SC, SS);
if (!Converted)
return Converted.takeError();
DMI.Subsections.push_back(*Converted);
OpenPOWER on IntegriCloud