diff options
author | Jim Ingham <jingham@apple.com> | 2018-07-05 23:11:27 +0000 |
---|---|---|
committer | Jim Ingham <jingham@apple.com> | 2018-07-05 23:11:27 +0000 |
commit | 955535133976fb05add764479f192f1a4a9502af (patch) | |
tree | 158721b023bd027ff06be68b2c3d7cbc6e2fcafd /lldb/packages/Python/lldbsuite/test/functionalities/data-formatter | |
parent | b2043ac72a1f1623fad47806f3e7881b7e70dcb4 (diff) | |
download | bcm5719-llvm-955535133976fb05add764479f192f1a4a9502af.tar.gz bcm5719-llvm-955535133976fb05add764479f192f1a4a9502af.zip |
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...
<rdar://problem/41867390>
llvm-svn: 336397
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/functionalities/data-formatter')
-rw-r--r-- | lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/vector/main.cpp | 17 |
1 files changed, 8 insertions, 9 deletions
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 a9aeacf90e4..32dc104784b 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 <stdio.h> #include <string> -#ifdef _LIBCPP_INLINE_VISIBILITY -#undef _LIBCPP_INLINE_VISIBILITY -#endif -#define _LIBCPP_INLINE_VISIBILITY #include <vector> typedef std::vector<int> int_vect; typedef std::vector<std::string> 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 } |