Commit 49ebcb22 authored by Daniel Liew's avatar Daniel Liew
Browse files

Added KLEE_DEBUG() macro. It's main purpose is to only print out

comments when -debug-only=klee is passed AND we have a debug build.
parent b20d70d6
//===-- Constraints.h -------------------------------------------*- C++ -*-===//
//
// The KLEE Symbolic Virtual Machine
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
#ifndef KLEE_DEBUG_H
#define KLEE_DEBUG_H
#include "llvm/Support/Debug.h"
/* This Handy macro uses LLVM's debug infrastructure.
* If we do a debug build then commands (X) in
*
* KLEE_DEBUG(X)
*
* will be executed if the -debug-only=klee
* flag is passed. Otherwise they will not be executed.
*
* If we do a Release build then KLEE_DEBUG() is a no-op.
*
* Example:
* KLEE_DEBUG( dbgs() << "This is a test.\n" );
*
*/
#ifndef NDEBUG
#define KLEE_DEBUG(X) DEBUG_WITH_TYPE("klee", X)
#else
#define KLEE_DEBUG(X) do { } while(0)
#endif
#endif
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment