1 // Test program to verify whether the Valgrind header files compile fine 2 // with a C++ compiler. 3 4 5 #include <stdio.h> 6 #include <stdlib.h> 7 #include "pub_tool_basics.h" 8 #include "pub_tool_libcassert.h" 9 #include "pub_tool_libcbase.h" 10 #include "pub_tool_mallocfree.h" 11 #include "pub_tool_libcprint.h" 12 #include "pub_tool_libcfile.h" 13 #include "pub_tool_libcproc.h" 14 #include "pub_tool_vki.h" 15 #include "pub_tool_threadstate.h" 16 #include "pub_tool_errormgr.h" 17 #include "pub_tool_options.h" 18 #include "pub_tool_machine.h" 19 #include "pub_tool_debuginfo.h" 20 #include "pub_tool_seqmatch.h" 21 #include "pub_tool_tooliface.h" 22 #include "pub_tool_options.h" 23 24 #if defined(VGO_darwin) 25 int CheckSys() 26 { 27 return SysRes_MACH; 28 } 29 #endif 30 31 void CheckAssert(int x) 32 { 33 tl_assert(x); 34 tl_assert2(x, "fail"); 35 } 36 37 int main(int argc, char** argv) 38 { 39 fprintf(stderr, "Compilation succeeded.\n"); 40 return 0; 41 } 42 43 void VG_(assert_fail)(Bool isCore, const Char* expr, const Char* file, 44 Int line, const Char* fn, const HChar* format, ... ) 45 { 46 abort(); 47 } 48