view gen/logger.h @ 1143:b28a57f4b530

Fix to synchronized function storage class when getting the classinfo via dotExp.
author Christian Kamm <kamm incasoftware de>
date Wed, 25 Mar 2009 08:13:01 +0100
parents e7f0c2b48047
children 79758fd2f48a
line wrap: on
line source

#ifndef _llvmd_gen_logger_h_
#define _llvmd_gen_logger_h_

#include "llvm/Support/Streams.h"

struct Loc;

namespace Logger
{
    void indent();
    void undent();
    llvm::OStream cout();
    void println(const char* fmt, ...);
    void print(const char* fmt, ...);
    void enable();
    void disable();
    bool enabled();

    void attention(Loc loc, const char* fmt, ...);

    struct LoggerScope
    {
        LoggerScope()
        {
            Logger::indent();
        }
        ~LoggerScope()
        {
            Logger::undent();
        }
    };
}

#define LOG_SCOPE    Logger::LoggerScope _logscope;

#endif