aboutsummaryrefslogtreecommitdiff
path: root/llvm/unittests/DebugInfo/DWARF/DWARFDebugLineTest.cpp
diff options
context:
space:
mode:
authorSterling Augustine <saugustine@google.com>2020-03-18 15:49:49 -0700
committerSterling Augustine <saugustine@google.com>2020-03-19 16:56:43 -0700
commit98ff6eb679cd5a2556d990d3d629e6c03c1da6a0 (patch)
treec6a0f4b2f792a2f560cc9bc8c8b23cf6d1ed1ec7 /llvm/unittests/DebugInfo/DWARF/DWARFDebugLineTest.cpp
parentc999084619a61daffac39f0ec9ea3c801e5a8823 (diff)
downloadllvm-98ff6eb679cd5a2556d990d3d629e6c03c1da6a0.zip
llvm-98ff6eb679cd5a2556d990d3d629e6c03c1da6a0.tar.gz
llvm-98ff6eb679cd5a2556d990d3d629e6c03c1da6a0.tar.bz2
Cleanup the plumbing for DILineInfoSpecifier. [NFC]
Summary: 1. FileLineInfoSpecifier::Default isn't the default for anything. Rename to RawValue, which accurately reflects its role. 2. Most functions that take a part of a FileLineInfoSpecifier end up constructing a full one later or plumb two values through. Make them all just take a complete FileLineInfoSpecifier. 3. Printing basenames only was handled differently from all other variants, make it parallel to all the other variants. Reviewers: jhenderson Subscribers: hiraditya, MaskRay, rupprecht, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D76394
Diffstat (limited to 'llvm/unittests/DebugInfo/DWARF/DWARFDebugLineTest.cpp')
-rw-r--r--llvm/unittests/DebugInfo/DWARF/DWARFDebugLineTest.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/llvm/unittests/DebugInfo/DWARF/DWARFDebugLineTest.cpp b/llvm/unittests/DebugInfo/DWARF/DWARFDebugLineTest.cpp
index 2ffad82..cf2fb53 100644
--- a/llvm/unittests/DebugInfo/DWARF/DWARFDebugLineTest.cpp
+++ b/llvm/unittests/DebugInfo/DWARF/DWARFDebugLineTest.cpp
@@ -1324,7 +1324,12 @@ TEST_F(DebugLineBasicFixture, PrintPathsProperly) {
EXPECT_TRUE((*ExpectedLineTable)
->Prologue.getFileNameByIndex(
1, CompDir,
- DILineInfoSpecifier::FileLineInfoKind::Default, Result));
+ DILineInfoSpecifier::FileLineInfoKind::RawValue, Result));
+ EXPECT_TRUE((*ExpectedLineTable)
+ ->Prologue.getFileNameByIndex(
+ 1, CompDir,
+ DILineInfoSpecifier::FileLineInfoKind::BaseNameOnly,
+ Result));
EXPECT_STREQ(Result.c_str(), "b file");
EXPECT_TRUE((*ExpectedLineTable)
->Prologue.getFileNameByIndex(