mirror of
https://github.com/Gericom/teak-llvm.git
synced 2025-06-24 22:08:57 -04:00

It seems when I restructured the test folders the functionalities/breakpoint was deleted. This just reverts this change and re-adds the tests. llvm-svn: 371512
30 lines
428 B
C
30 lines
428 B
C
#ifdef _MSC_VER
|
|
#include <intrin.h>
|
|
#define BREAKPOINT_INTRINSIC() __debugbreak()
|
|
#else
|
|
#define BREAKPOINT_INTRINSIC() __asm__ __volatile__ ("int3")
|
|
#endif
|
|
|
|
int
|
|
bar(int const *foo)
|
|
{
|
|
int count = 0, i = 0;
|
|
for (; i < 10; ++i)
|
|
{
|
|
count += 1;
|
|
BREAKPOINT_INTRINSIC();
|
|
count += 1;
|
|
}
|
|
return *foo;
|
|
}
|
|
|
|
int
|
|
main(int argc, char **argv)
|
|
{
|
|
int foo = 42;
|
|
bar(&foo);
|
|
return 0;
|
|
}
|
|
|
|
|