summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-pdbutil/llvm-pdbutil.cpp
diff options
context:
space:
mode:
authorZachary Turner <zturner@google.com>2017-06-14 06:24:24 +0000
committerZachary Turner <zturner@google.com>2017-06-14 06:24:24 +0000
commit0085dce221b820f4287b6a2bbf428500501ece39 (patch)
tree9db447d1534241dbb854f7fe446b332392405a0a /llvm/tools/llvm-pdbutil/llvm-pdbutil.cpp
parent9cac9ad9d4b835f7f1da76dde865e358363e1e75 (diff)
downloadbcm5719-llvm-0085dce221b820f4287b6a2bbf428500501ece39.tar.gz
bcm5719-llvm-0085dce221b820f4287b6a2bbf428500501ece39.zip
Revert "[codeview] Make obj2yaml/yaml2obj support .debug$S..."
This is causing failures on linux bots with an invalid stream read. It doesn't repro in any configuration on Windows, so reverting until I have a chance to investigate on Linux. llvm-svn: 305371
Diffstat (limited to 'llvm/tools/llvm-pdbutil/llvm-pdbutil.cpp')
-rw-r--r--llvm/tools/llvm-pdbutil/llvm-pdbutil.cpp17
1 files changed, 5 insertions, 12 deletions
diff --git a/llvm/tools/llvm-pdbutil/llvm-pdbutil.cpp b/llvm/tools/llvm-pdbutil/llvm-pdbutil.cpp
index 3826ba79a20..dc46da4a90f 100644
--- a/llvm/tools/llvm-pdbutil/llvm-pdbutil.cpp
+++ b/llvm/tools/llvm-pdbutil/llvm-pdbutil.cpp
@@ -35,7 +35,6 @@
#include "llvm/DebugInfo/CodeView/DebugInlineeLinesSubsection.h"
#include "llvm/DebugInfo/CodeView/DebugLinesSubsection.h"
#include "llvm/DebugInfo/CodeView/LazyRandomTypeCollection.h"
-#include "llvm/DebugInfo/CodeView/StringsAndChecksums.h"
#include "llvm/DebugInfo/CodeView/TypeStreamMerger.h"
#include "llvm/DebugInfo/CodeView/TypeTableBuilder.h"
#include "llvm/DebugInfo/MSF/MSFBuilder.h"
@@ -512,12 +511,10 @@ static void yamlToPdb(StringRef Path) {
for (uint32_t I = 0; I < kSpecialStreamCount; ++I)
ExitOnErr(Builder.getMsfBuilder().addStream(0));
- StringsAndChecksums Strings;
- Strings.setStrings(std::make_shared<DebugStringTableSubsection>());
-
if (YamlObj.StringTable.hasValue()) {
+ auto &Strings = Builder.getStringTableBuilder();
for (auto S : *YamlObj.StringTable)
- Strings.strings()->insert(S);
+ Strings.insert(S);
}
pdb::yaml::PdbInfoStream DefaultInfoStream;
@@ -535,6 +532,8 @@ static void yamlToPdb(StringRef Path) {
for (auto F : Info.Features)
InfoBuilder.addFeature(F);
+ auto &Strings = Builder.getStringTableBuilder().getStrings();
+
const auto &Dbi = YamlObj.DbiStream.getValueOr(DefaultDbiStream);
auto &DbiBuilder = Builder.getDbiBuilder();
DbiBuilder.setAge(Dbi.Age);
@@ -558,14 +557,10 @@ static void yamlToPdb(StringRef Path) {
}
}
- // Each module has its own checksum subsection, so scan for it every time.
- Strings.setChecksums(nullptr);
- CodeViewYAML::initializeStringsAndChecksums(MI.Subsections, Strings);
-
auto CodeViewSubsections = ExitOnErr(CodeViewYAML::toCodeViewSubsectionList(
Allocator, MI.Subsections, Strings));
for (auto &SS : CodeViewSubsections) {
- ModiBuilder.addDebugSubsection(SS);
+ ModiBuilder.addDebugSubsection(std::move(SS));
}
}
@@ -585,8 +580,6 @@ static void yamlToPdb(StringRef Path) {
IpiBuilder.addTypeRecord(Type.RecordData, None);
}
- Builder.getStringTableBuilder().setStrings(*Strings.strings());
-
ExitOnErr(Builder.commit(opts::yaml2pdb::YamlPdbOutputFile));
}
OpenPOWER on IntegriCloud