Jim Ingham 8a5d7a2784 Fix a little thinko in generating ___lldb_unnamed_symbol symbols
when we have only an in-memory copy of the binary.

Also added a test for the generation of these symbols in the 
in-memory and regular cases.

<rdar://problem/43160401>

llvm-svn: 339833
2018-08-15 23:10:32 +00:00

27 lines
383 B
C++

#include <stdio.h>
#include <fcntl.h>
#include <chrono>
#include <thread>
extern void dont_strip_me()
{
printf("I wasn't stripped\n");
}
static void *a_function()
{
while (1)
{
std::this_thread::sleep_for(std::chrono::microseconds(100));
dont_strip_me();
}
return 0;
}
int main(int argc, char const *argv[])
{
a_function();
return 0;
}