The Index field of an AttributeWithIndex is of type unsigned, not uint16_t.
authorNicolas Geoffray <nicolas.geoffray@lip6.fr>
Sat, 8 Nov 2008 15:36:01 +0000 (15:36 +0000)
committerNicolas Geoffray <nicolas.geoffray@lip6.fr>
Sat, 8 Nov 2008 15:36:01 +0000 (15:36 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58908 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/CppBackend/CPPBackend.cpp

index 351c3394f4c8dc0f2e3cf8b86f7449142852fcff..ead92674c8240578b5ce00d34f599cae995214b7 100644 (file)
@@ -439,9 +439,9 @@ namespace {
       Out << "SmallVector<AttributeWithIndex, 4> Attrs;"; nl(Out);
       Out << "AttributeWithIndex PAWI;"; nl(Out);
       for (unsigned i = 0; i < PAL.getNumSlots(); ++i) {
-        uint16_t index = PAL.getSlot(i).Index;
+        unsigned index = PAL.getSlot(i).Index;
         Attributes attrs = PAL.getSlot(i).Attrs;
-        Out << "PAWI.Index = " << index << "; PAWI.Attrs = 0 ";
+        Out << "PAWI.Index = " << index << "U; PAWI.Attrs = 0 ";
         if (attrs & Attribute::SExt)
           Out << " | Attribute::SExt";
         if (attrs & Attribute::ZExt)