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/InitializeParseContext.h"
15 #include "compiler/ParseHelper.h"
17 static const int kTraceBufferLen = 1024;
21 void Trace(const char *format, ...) {
24 TParseContext* parseContext = GetGlobalParseContext();
26 char buf[kTraceBufferLen];
28 va_start(args, format);
29 vsnprintf(buf, kTraceBufferLen, format, args);
32 parseContext->trace(buf);
36 #endif // TRACE_ENABLED