Remove remaining traces of llvm::Type from cling::Value.

This commit is contained in:
Axel Naumann 2014-02-18 23:16:41 +01:00 committed by sftnight
parent ca4fd9eb3a
commit 71cadd6ad2
3 changed files with 4 additions and 27 deletions

View File

@ -14,7 +14,6 @@
#include <assert.h>
namespace llvm {
class Type;
struct GenericValue;
}
namespace clang {
@ -45,9 +44,6 @@ namespace cling {
/// dependencies.
void* /*clang::QualType*/ m_ClangType;
/// \brief the value's type according to clang
const llvm::Type* m_LLVMType;
enum EStorageType {
kSignedIntegerOrEnumerationType,
kUnsignedIntegerOrEnumerationType,
@ -67,10 +63,7 @@ namespace cling {
Value();
Value(const Value& other);
/// \brief Construct a valid Value.
Value(const llvm::GenericValue& v, clang::QualType t);
Value(const llvm::GenericValue& v, clang::QualType clangTy,
const llvm::Type* llvmTy);
Value(const llvm::GenericValue& v, clang::QualType clangTy);
Value& operator =(const Value& other);
@ -79,8 +72,6 @@ namespace cling {
void setGV(const llvm::GenericValue& GV);
clang::QualType getClangType() const;
const llvm::Type* getLLVMType() const { return m_LLVMType; }
void setLLVMType(const llvm::Type* Ty) { m_LLVMType = Ty; }
/// \brief Determine whether the Value has been set.
//

View File

@ -666,8 +666,6 @@ namespace cling {
ExecutionContext::ExecutionResult ExeRes =
m_ExecutionContext->executeFunction(mangledNameIfNeeded.c_str(),
FD->getReturnType(), res);
if (res && res->isValid())
res->get().setLLVMType(getLLVMType(res->get().getClangType()));
return ConvertExecutionResult(ExeRes);
}

View File

@ -17,8 +17,7 @@
namespace cling {
Value::Value():
m_ClangType(),
m_LLVMType()
m_ClangType()
{
assert(sizeof(llvm::GenericValue) <= sizeof(m_GV)
&& "GlobalValue buffer too small");
@ -26,8 +25,7 @@ Value::Value():
}
Value::Value(const Value& other):
m_ClangType(other.m_ClangType),
m_LLVMType(other.m_LLVMType)
m_ClangType(other.m_ClangType)
{
assert(sizeof(llvm::GenericValue) <= sizeof(m_GV)
&& "GlobalValue buffer too small");
@ -35,16 +33,7 @@ Value::Value(const Value& other):
}
Value::Value(const llvm::GenericValue& v, clang::QualType t)
: m_ClangType(t.getAsOpaquePtr()), m_LLVMType(0)
{
assert(sizeof(llvm::GenericValue) <= sizeof(m_GV)
&& "GlobalValue buffer too small");
new (m_GV) llvm::GenericValue(v);
}
Value::Value(const llvm::GenericValue& v, clang::QualType clangTy,
const llvm::Type* llvmTy)
: m_ClangType(clangTy.getAsOpaquePtr()), m_LLVMType(llvmTy)
: m_ClangType(t.getAsOpaquePtr())
{
assert(sizeof(llvm::GenericValue) <= sizeof(m_GV)
&& "GlobalValue buffer too small");
@ -53,7 +42,6 @@ Value::Value(const llvm::GenericValue& v, clang::QualType clangTy,
Value& Value::operator =(const Value& other) {
m_ClangType = other.m_ClangType;
m_LLVMType = other.m_LLVMType;
setGV(other.getGV());
return *this;
}