mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-05 12:31:33 +00:00
17e8d42c63
`dwarf::TagString()` shouldn't stringify `DW_TAG_lo_user` or `DW_TAG_hi_user`. These aren't actual tags; they're markers for the edge of vendor-specific tag regions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228029 91177308-0d34-0410-b5e6-96231b3b80d8
30 lines
887 B
C++
30 lines
887 B
C++
//===- unittest/Support/DwarfTest.cpp - Dwarf support tests ---------------===//
|
|
//
|
|
// The LLVM Compiler Infrastructure
|
|
//
|
|
// This file is distributed under the University of Illinois Open Source
|
|
// License. See LICENSE.TXT for details.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#include "llvm/Support/Dwarf.h"
|
|
#include "gtest/gtest.h"
|
|
|
|
using namespace llvm;
|
|
using namespace llvm::dwarf;
|
|
|
|
namespace {
|
|
|
|
TEST(DwarfTest, TagStringOnInvalid) {
|
|
// This is invalid, so it shouldn't be stringified.
|
|
EXPECT_EQ(nullptr, TagString(DW_TAG_invalid));
|
|
|
|
// These aren't really tags: they describe ranges within tags. They
|
|
// shouldn't be stringified either.
|
|
EXPECT_EQ(nullptr, TagString(DW_TAG_lo_user));
|
|
EXPECT_EQ(nullptr, TagString(DW_TAG_hi_user));
|
|
EXPECT_EQ(nullptr, TagString(DW_TAG_user_base));
|
|
}
|
|
|
|
} // end namespace
|