Proteus
Programmable JIT compilation and optimization for C/C++ using LLVM
Loading...
Searching...
No Matches
Debug.h
Go to the documentation of this file.
1#ifndef PROTEUS_DEBUG_H
2#define PROTEUS_DEBUG_H
3
5
6#include <llvm/IR/Value.h>
7#include <llvm/Support/raw_ostream.h>
8
9#define PROTEUS_DBG(x) \
10 do \
11 if (Config::get().ProteusDebugOutput) { \
12 x; \
13 } \
14 while (0);
15
16namespace proteus {
17
18using namespace llvm;
19
20inline std::string toString(Value &V) {
21 std::string Str;
22 raw_string_ostream OS{Str};
23 V.print(OS);
24 return Str;
25}
26
27} // namespace proteus
28
29#endif
Definition CompiledLibrary.h:7
Definition MemoryCache.h:27
std::string toString(CodegenOption Option)
Definition Config.h:28