The type ids making up a filter are unsigned, and
authorDuncan Sands <baldrick@free.fr>
Thu, 12 Jul 2007 13:51:39 +0000 (13:51 +0000)
committerDuncan Sands <baldrick@free.fr>
Thu, 12 Jul 2007 13:51:39 +0000 (13:51 +0000)
should be output as unsigned values.  Checked against
gcc.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@39775 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/DwarfWriter.cpp

index f86c4d5d76a76f4a7f9bc1ec3449fee06227bbc9..257a776d2f127821a4ea596d589b7cea5238da5d 100644 (file)
@@ -3002,7 +3002,7 @@ private:
     for(std::vector<unsigned>::const_iterator I = FilterIds.begin(),
         E = FilterIds.end(); I != E; ++I) {
       FilterOffsets.push_back(Offset);
-      Offset -= Asm->SizeSLEB128(*I);
+      Offset -= Asm->SizeULEB128(*I);
     }
 
     // Compute sizes for exception table.
@@ -3191,7 +3191,7 @@ private:
     // Emit the filter typeids.
     for (unsigned j = 0, M = FilterIds.size(); j < M; ++j) {
       unsigned TypeID = FilterIds[j];
-      Asm->EmitSLEB128Bytes(TypeID);
+      Asm->EmitULEB128Bytes(TypeID);
       Asm->EOL("Filter TypeInfo index");
     }