2 // Copyright (c) 2002-2010 The ANGLE Project Authors. All rights reserved.
3 // Use of this source code is governed by a BSD-style license that can be
4 // found in the LICENSE file.
7 // debug.cpp: Debugging utilities.
9 #include "compiler/debug.h"
14 #include "compiler/ParseHelper.h"
16 static const int kTraceBufferLen = 1024;
20 void Trace(const char *format, ...) {
23 TParseContext* parseContext = GetGlobalParseContext();
25 char buf[kTraceBufferLen];
27 va_start(args, format);
28 vsnprintf(buf, kTraceBufferLen, format, args);
31 parseContext->infoSink.debug << buf;
35 #endif // TRACE_ENABLED