Implement the printf function, used by assert
authorChris Lattner <sabre@nondot.org>
Mon, 20 May 2002 19:11:23 +0000 (19:11 +0000)
committerChris Lattner <sabre@nondot.org>
Mon, 20 May 2002 19:11:23 +0000 (19:11 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2666 91177308-0d34-0410-b5e6-96231b3b80d8

runtime/GCCLibraries/libgcc/eprintf.c [new file with mode: 0644]

diff --git a/runtime/GCCLibraries/libgcc/eprintf.c b/runtime/GCCLibraries/libgcc/eprintf.c
new file mode 100644 (file)
index 0000000..d4229fa
--- /dev/null
@@ -0,0 +1,13 @@
+#include <stdio.h>
+void abort(void);
+
+/* This is used by the `assert' macro.  */
+void
+__eprintf (const char *string, const char *expression,
+           unsigned int line, const char *filename)
+{
+  fprintf (stderr, string, expression, line, filename);
+  fflush (stderr);
+  abort ();
+}
+