1 //===- llvm/unittest/DebugInfo/DWARFFormValueTest.cpp ---------------------===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 #include "../lib/CodeGen/AsmPrinter/DIE.h"
11 #include "../lib/CodeGen/AsmPrinter/DIEHash.h"
12 #include "llvm/Support/Dwarf.h"
13 #include "llvm/Support/Debug.h"
14 #include "llvm/Support/Format.h"
15 #include "gtest/gtest.h"
20 TEST(DIEHashData1Test, DIEHash) {
22 DIE Die(dwarf::DW_TAG_base_type);
24 Die.addValue(dwarf::DW_AT_byte_size, dwarf::DW_FORM_data1, &Size);
25 uint64_t MD5Res = Hash.computeTypeSignature(&Die);
26 ASSERT_EQ(MD5Res, 0x540e9ff30ade3e4aULL);