Add printing utility functions to the cling::Value.

This commit is contained in:
Vassil Vassilev 2014-05-12 15:43:43 +02:00 committed by sftnight
parent db0c7200db
commit cb29e6e529
2 changed files with 15 additions and 0 deletions

View File

@ -10,6 +10,10 @@
#ifndef CLING_VALUE_H
#define CLING_VALUE_H
namespace llvm {
class raw_ostream;
}
namespace clang {
class ASTContext;
class QualType;
@ -154,6 +158,9 @@ namespace cling {
/// Values referencing an object are treated as pointers to the object.
template <typename T>
T simplisticCastAs() const;
void print(llvm::raw_ostream& Out) const;
void dump() const;
};
template <typename T>

View File

@ -245,4 +245,12 @@ void* Value::GetDtorWrapperPtr(const clang::RecordDecl* RD,
return interp.compileFunction(funcname, code, true /*ifUniq*/,
false /*withAccessControl*/);
}
void Value::print(llvm::raw_ostream& Out) const {
}
void Value::dump() const {
print(llvm::errs());
}
} // namespace cling