summaryrefslogtreecommitdiffstats
path: root/llvm/unittests/DebugInfo
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/unittests/DebugInfo')
-rw-r--r--llvm/unittests/DebugInfo/CodeView/TypeIndexDiscoveryTest.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/llvm/unittests/DebugInfo/CodeView/TypeIndexDiscoveryTest.cpp b/llvm/unittests/DebugInfo/CodeView/TypeIndexDiscoveryTest.cpp
index 14d358dd152..54da2b719e9 100644
--- a/llvm/unittests/DebugInfo/CodeView/TypeIndexDiscoveryTest.cpp
+++ b/llvm/unittests/DebugInfo/CodeView/TypeIndexDiscoveryTest.cpp
@@ -593,3 +593,11 @@ TEST_F(TypeIndexIteratorTest, Precomp) {
writeTypeRecords(P, EP);
checkTypeReferences(0);
}
+
+// This is a test for getEncodedIntegerLength()
+TEST_F(TypeIndexIteratorTest, VariableSizeIntegers) {
+ BaseClassRecord BaseClass1(MemberAccess::Public, TypeIndex(47), (uint64_t)-1);
+ BaseClassRecord BaseClass2(MemberAccess::Public, TypeIndex(48), 1);
+ writeFieldList(BaseClass1, BaseClass2);
+ checkTypeReferences(0, TypeIndex(47), TypeIndex(48));
+} \ No newline at end of file
OpenPOWER on IntegriCloud