[codeview] respect signedness of APSInts when printing to YAML

Summary:
This fixes a bug where we always treat APSInts in Codeview as
signed when writing them to YAML. One symptom of this problem is that
llvm-pdbdump raw would show Enumerator Values that differ between the
original PDB and a PDB that has been round-tripped through YAML.

Reviewers: zturner

Reviewed By: zturner

Subscribers: llvm-commits, fhahn

Differential Revision: https://reviews.llvm.org/D34013

llvm-svn: 305965
This commit is contained in:
Bob Haarman 2017-06-21 22:31:52 +00:00
parent a8b26936d0
commit 4d2711fbb5
2 changed files with 2 additions and 2 deletions

View File

@ -138,7 +138,7 @@ StringRef ScalarTraits<TypeIndex>::input(StringRef Scalar, void *Ctx,
void ScalarTraits<APSInt>::output(const APSInt &S, void *,
llvm::raw_ostream &OS) {
S.print(OS, true);
S.print(OS, S.isSigned());
}
StringRef ScalarTraits<APSInt>::input(StringRef Scalar, void *Ctx, APSInt &S) {

View File

@ -785,7 +785,7 @@ YAML: Name: eIDLModuleUsage
YAML: - Kind: LF_ENUMERATE
YAML: Enumerator:
YAML: Attrs: 3
YAML: Value: -32768
YAML: Value: 32768
YAML: Name: eAnonymousUsage
YAML: - Kind: LF_ENUMERATE
YAML: Enumerator: