aboutsummaryrefslogtreecommitdiff
path: root/llvm/unittests/ProfileData/MemProfTest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/unittests/ProfileData/MemProfTest.cpp')
-rw-r--r--llvm/unittests/ProfileData/MemProfTest.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/llvm/unittests/ProfileData/MemProfTest.cpp b/llvm/unittests/ProfileData/MemProfTest.cpp
index 48d6ee7..4808481 100644
--- a/llvm/unittests/ProfileData/MemProfTest.cpp
+++ b/llvm/unittests/ProfileData/MemProfTest.cpp
@@ -104,6 +104,11 @@ MATCHER_P4(FrameContains, FunctionName, LineOffset, Column, Inline, "") {
*result_listener << "Hash mismatch";
return false;
}
+ if (F.SymbolName.hasValue() && F.SymbolName.getValue() != FunctionName) {
+ *result_listener << "SymbolName mismatch\nWant: " << FunctionName
+ << "\nGot: " << F.SymbolName.getValue();
+ return false;
+ }
if (F.LineOffset == LineOffset && F.Column == Column &&
F.IsInlineFrame == Inline) {
return true;
@@ -154,7 +159,8 @@ TEST(MemProf, FillsValue) {
auto Seg = makeSegments();
- RawMemProfReader Reader(std::move(Symbolizer), Seg, Prof, CSM);
+ RawMemProfReader Reader(std::move(Symbolizer), Seg, Prof, CSM,
+ /*KeepName=*/true);
llvm::DenseMap<llvm::GlobalValue::GUID, MemProfRecord> Records;
for (const auto &Pair : Reader) {