summaryrefslogtreecommitdiffstats
path: root/llvm/unittests/Support/DwarfTest.cpp
diff options
context:
space:
mode:
authorMehdi Amini <mehdi.amini@apple.com>2016-10-05 00:37:18 +0000
committerMehdi Amini <mehdi.amini@apple.com>2016-10-05 00:37:18 +0000
commit32b297a42fa8ce8e2018356341401c92a72e8f27 (patch)
treee26fd084a01464bb0c4b5dfd805bf82114e88c20 /llvm/unittests/Support/DwarfTest.cpp
parent4a759ff44c9ed31693902b019ee8f488ad4dc4c9 (diff)
downloadbcm5719-llvm-32b297a42fa8ce8e2018356341401c92a72e8f27.tar.gz
bcm5719-llvm-32b297a42fa8ce8e2018356341401c92a72e8f27.zip
Re-commit "Use StringRef in Support/Darf APIs (NFC)"
This reverts commit r283278 and re-commit r283275 with the update to fix the build on the LLDB side. llvm-svn: 283281
Diffstat (limited to 'llvm/unittests/Support/DwarfTest.cpp')
-rw-r--r--llvm/unittests/Support/DwarfTest.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/llvm/unittests/Support/DwarfTest.cpp b/llvm/unittests/Support/DwarfTest.cpp
index 74fcc989b45..148ea2736e1 100644
--- a/llvm/unittests/Support/DwarfTest.cpp
+++ b/llvm/unittests/Support/DwarfTest.cpp
@@ -17,13 +17,13 @@ namespace {
TEST(DwarfTest, TagStringOnInvalid) {
// This is invalid, so it shouldn't be stringified.
- EXPECT_EQ(nullptr, TagString(DW_TAG_invalid));
+ EXPECT_EQ(StringRef(), 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));
+ EXPECT_EQ(StringRef(), TagString(DW_TAG_lo_user));
+ EXPECT_EQ(StringRef(), TagString(DW_TAG_hi_user));
+ EXPECT_EQ(StringRef(), TagString(DW_TAG_user_base));
}
TEST(DwarfTest, getTag) {
@@ -58,12 +58,12 @@ TEST(DwarfTest, getOperationEncoding) {
TEST(DwarfTest, LanguageStringOnInvalid) {
// This is invalid, so it shouldn't be stringified.
- EXPECT_EQ(nullptr, LanguageString(0));
+ EXPECT_EQ(StringRef(), LanguageString(0));
// These aren't really tags: they describe ranges within tags. They
// shouldn't be stringified either.
- EXPECT_EQ(nullptr, LanguageString(DW_LANG_lo_user));
- EXPECT_EQ(nullptr, LanguageString(DW_LANG_hi_user));
+ EXPECT_EQ(StringRef(), LanguageString(DW_LANG_lo_user));
+ EXPECT_EQ(StringRef(), LanguageString(DW_LANG_hi_user));
}
TEST(DwarfTest, getLanguage) {
@@ -85,12 +85,12 @@ TEST(DwarfTest, getLanguage) {
TEST(DwarfTest, AttributeEncodingStringOnInvalid) {
// This is invalid, so it shouldn't be stringified.
- EXPECT_EQ(nullptr, AttributeEncodingString(0));
+ EXPECT_EQ(StringRef(), AttributeEncodingString(0));
// These aren't really tags: they describe ranges within tags. They
// shouldn't be stringified either.
- EXPECT_EQ(nullptr, AttributeEncodingString(DW_ATE_lo_user));
- EXPECT_EQ(nullptr, AttributeEncodingString(DW_ATE_hi_user));
+ EXPECT_EQ(StringRef(), AttributeEncodingString(DW_ATE_lo_user));
+ EXPECT_EQ(StringRef(), AttributeEncodingString(DW_ATE_hi_user));
}
TEST(DwarfTest, getAttributeEncoding) {
@@ -122,8 +122,8 @@ TEST(DwarfTest, VirtualityString) {
VirtualityString(DW_VIRTUALITY_max));
// Invalid numbers shouldn't be stringified.
- EXPECT_EQ(nullptr, VirtualityString(DW_VIRTUALITY_max + 1));
- EXPECT_EQ(nullptr, VirtualityString(DW_VIRTUALITY_max + 77));
+ EXPECT_EQ(StringRef(), VirtualityString(DW_VIRTUALITY_max + 1));
+ EXPECT_EQ(StringRef(), VirtualityString(DW_VIRTUALITY_max + 77));
}
TEST(DwarfTest, getVirtuality) {
OpenPOWER on IntegriCloud