libtriple: add lt_debug() for controllable debug output

This commit is contained in:
Stefan Seyfried
2010-08-08 14:00:09 +02:00
parent 061225db9b
commit b5503037f0
3 changed files with 23 additions and 0 deletions

18
libtriple/lt_debug.cpp Normal file
View File

@@ -0,0 +1,18 @@
/* libtriple debug functions */
#include <stdarg.h>
#include <stdio.h>
int cnxt_debug = 0;
void lt_debug(const char *fmt, ...)
{
if (! cnxt_debug)
return;
va_list args;
va_start(args, fmt);
vfprintf(stderr, fmt, args);
va_end(args);
}