mirror of
https://github.com/Gericom/teak-llvm.git
synced 2025-06-25 06:18:56 -04:00

- fix buildbot breakage after r257186 - move declaration outside of for loop llvm-svn: 257228
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;
|
|
}
|
|
|
|
|