From 4d2711fbb505df9c27b65d869a0489669b55f981 Mon Sep 17 00:00:00 2001 From: Bob Haarman Date: Wed, 21 Jun 2017 22:31:52 +0000 Subject: [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 --- llvm/lib/ObjectYAML/CodeViewYAMLTypes.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'llvm/lib/ObjectYAML') diff --git a/llvm/lib/ObjectYAML/CodeViewYAMLTypes.cpp b/llvm/lib/ObjectYAML/CodeViewYAMLTypes.cpp index a03b9cd50fa..2d1cb4b1b27 100644 --- a/llvm/lib/ObjectYAML/CodeViewYAMLTypes.cpp +++ b/llvm/lib/ObjectYAML/CodeViewYAMLTypes.cpp @@ -138,7 +138,7 @@ StringRef ScalarTraits::input(StringRef Scalar, void *Ctx, void ScalarTraits::output(const APSInt &S, void *, llvm::raw_ostream &OS) { - S.print(OS, true); + S.print(OS, S.isSigned()); } StringRef ScalarTraits::input(StringRef Scalar, void *Ctx, APSInt &S) { -- cgit v1.2.3