summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-pdbdump/CodeViewYaml.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/tools/llvm-pdbdump/CodeViewYaml.cpp')
-rw-r--r--llvm/tools/llvm-pdbdump/CodeViewYaml.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/llvm/tools/llvm-pdbdump/CodeViewYaml.cpp b/llvm/tools/llvm-pdbdump/CodeViewYaml.cpp
index 96bf1c19aa6..e75f454b34a 100644
--- a/llvm/tools/llvm-pdbdump/CodeViewYaml.cpp
+++ b/llvm/tools/llvm-pdbdump/CodeViewYaml.cpp
@@ -508,9 +508,13 @@ void ScalarEnumerationTraits<TypeLeafKind>::enumeration(IO &io,
}
}
-Error llvm::codeview::yaml::YamlTypeDumperCallbacks::visitTypeBegin(
+Expected<TypeLeafKind>
+llvm::codeview::yaml::YamlTypeDumperCallbacks::visitTypeBegin(
const CVRecord<TypeLeafKind> &CVR) {
+ // When we're outputting, `CVR.Type` already has the right value in it. But
+ // when we're inputting, we need to read the value. Since `CVR.Type` is const
+ // we do it into a temp variable.
TypeLeafKind K = CVR.Type;
YamlIO.mapRequired("Kind", K);
- return Error::success();
+ return K;
}
OpenPOWER on IntegriCloud