Commit eee42229 authored by Lucian Grijincu's avatar Lucian Grijincu Committed by Facebook Github Bot

folly: symbolizer: test: re-enable test on clang as .debug_aranges is produced by the compiler

Summary:
- the test was disabled in {D2299981} (2015)
- philippv enabled `-gdwarf-aranges` in fbcode {D4013485} (2016)
- `-gdwarf-aranges` is available in clang since https://reviews.llvm.org/D1649 (2013)

Reviewed By: philippv

Differential Revision: D14398382

fbshipit-source-id: 7b6b4e7ebf86268d8bc34089b0e77dcaa5badf92
parent cbcab35f
......@@ -34,23 +34,13 @@ TEST(Symbolizer, Single) {
ASSERT_TRUE(symbolizer.symbolize(reinterpret_cast<uintptr_t>(foo), a));
EXPECT_EQ("folly::symbolizer::test::foo()", a.demangledName());
// The version of clang we use doesn't generate a `.debug_aranges` section,
// which the symbolizer needs to lookup the filename.
constexpr bool built_with_clang =
#ifdef __clang__
true;
#else
false;
#endif
if (!built_with_clang) {
auto path = a.location.file.toString();
folly::StringPiece basename(path);
auto pos = basename.rfind('/');
if (pos != folly::StringPiece::npos) {
basename.advance(pos + 1);
}
EXPECT_EQ("SymbolizerTest.cpp", basename.str());
auto path = a.location.file.toString();
folly::StringPiece basename(path);
auto pos = basename.rfind('/');
if (pos != folly::StringPiece::npos) {
basename.advance(pos + 1);
}
EXPECT_EQ("SymbolizerTest.cpp", basename.str());
}
FrameArray<100>* framesToFill{nullptr};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment