From: Jim Ingham Date: Thu, 5 Jul 2018 23:11:27 +0000 (+0000) Subject: Don't muck with _LIBCPP_INLINE_VISIBILITY just to get predictable line table entries. X-Git-Tag: llvmorg-7.0.0-rc1~2113 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=955535133976fb05add764479f192f1a4a9502af;p=platform%2Fupstream%2Fllvm.git Don't muck with _LIBCPP_INLINE_VISIBILITY just to get predictable line table entries. This test was trying to stop at a variety of std::vector calls. It looks like the test was failing because various inlined std functions left no line table entries for the line that invoked the inlined function. The author worked around that by undefining _LIBCPP_INLINE_VISIBILITY. That's an internal libcxx macro, we really shouldn't be playing around with it. Better to just force ourselves to stop where we want using some other non-inlineable statement. printf seems a good candidate... llvm-svn: 336397 --- diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/vector/main.cpp b/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/vector/main.cpp index a9aeacf..32dc104 100644 --- a/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/vector/main.cpp +++ b/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/vector/main.cpp @@ -1,8 +1,5 @@ +#include #include -#ifdef _LIBCPP_INLINE_VISIBILITY -#undef _LIBCPP_INLINE_VISIBILITY -#endif -#define _LIBCPP_INLINE_VISIBILITY #include typedef std::vector int_vect; typedef std::vector string_vect; @@ -18,7 +15,8 @@ int main() (numbers.push_back(123456)); (numbers.push_back(1234567)); - numbers.clear(); // break here + printf("break here"); + numbers.clear(); (numbers.push_back(7)); // break here @@ -26,10 +24,11 @@ int main() (strings.push_back(std::string("goofy"))); (strings.push_back(std::string("is"))); (strings.push_back(std::string("smart"))); - - (strings.push_back(std::string("!!!"))); // break here - - strings.clear(); // break here + printf("break here"); + (strings.push_back(std::string("!!!"))); + + printf("break here"); + strings.clear(); return 0; // break here }