Remember the number of positive and negative bits used by the enumerators of
an enum in the enum decl itself.  Use some spare bits from TagDecl for this
purpose.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103173 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Frontend/PCHReaderDecl.cpp b/lib/Frontend/PCHReaderDecl.cpp
index 6700dd3..7e12660 100644
--- a/lib/Frontend/PCHReaderDecl.cpp
+++ b/lib/Frontend/PCHReaderDecl.cpp
@@ -142,6 +142,8 @@
   VisitTagDecl(ED);
   ED->setIntegerType(Reader.GetType(Record[Idx++]));
   ED->setPromotionType(Reader.GetType(Record[Idx++]));
+  ED->setNumPositiveBits(Record[Idx++]);
+  ED->setNumNegativeBits(Record[Idx++]);
   // FIXME: C++ InstantiatedFrom
 }
 
diff --git a/lib/Frontend/PCHWriterDecl.cpp b/lib/Frontend/PCHWriterDecl.cpp
index d3618df..3585093 100644
--- a/lib/Frontend/PCHWriterDecl.cpp
+++ b/lib/Frontend/PCHWriterDecl.cpp
@@ -137,6 +137,8 @@
   VisitTagDecl(D);
   Writer.AddTypeRef(D->getIntegerType(), Record);
   Writer.AddTypeRef(D->getPromotionType(), Record);
+  Record.push_back(D->getNumPositiveBits());
+  Record.push_back(D->getNumNegativeBits());
   // FIXME: C++ InstantiatedFrom
   Code = pch::DECL_ENUM;
 }