summaryrefslogtreecommitdiffstats
path: root/llvm/unittests/Support/DwarfTest.cpp
blob: 9b141601b204b698117d7f63e25afad0db05a488 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
//===- 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
OpenPOWER on IntegriCloud