Skip to content
Snippets Groups Projects
Commit 7ee085fb authored by Vassil Vassilev's avatar Vassil Vassilev
Browse files

Reuse not reimplement util function.

git-svn-id: http://root.cern.ch/svn/root/trunk@49348 27541ba8-7e3a-0410-8455-c3a389f83636
parent ec05654e
No related branches found
No related tags found
No related merge requests found
......@@ -388,8 +388,8 @@ namespace cling {
Inits.push_back(BuildDynamicExprInfo(E));
// Build Arg1 DeclContext* DC
QualType DCTy = m_Context->getTypeDeclType(m_DeclContextDecl);
Inits.push_back(ConstructCStyleCasePtrExpr(DCTy,
(uint64_t)m_CurDeclContext)
Inits.push_back(utils::Synthesize::CStyleCastPtrExpr(m_Sema, DCTy,
(uint64_t)m_CurDeclContext)
);
// Build Arg2 llvm::StringRef
// Get the type of the type without specifiers
......@@ -570,7 +570,8 @@ namespace cling {
// Build Arg1
QualType DCTy = m_Context->getTypeDeclType(m_DeclContextDecl);
Expr* Arg1 = ConstructCStyleCasePtrExpr(DCTy, (uint64_t)m_CurDeclContext);
Expr* Arg1 = utils::Synthesize::CStyleCastPtrExpr(m_Sema, DCTy,
(uint64_t)m_CurDeclContext);
CallArgs.push_back(Arg1);
// Build the call
......@@ -679,11 +680,6 @@ namespace cling {
return Result;
}
Expr* EvaluateTSynthesizer::ConstructCStyleCasePtrExpr(QualType Ty,
uint64_t Ptr) {
return utils::Synthesize::CStyleCastPtrExpr(m_Sema, Ty, Ptr);
}
Expr* EvaluateTSynthesizer::ConstructConstCharPtrExpr(const char* Val) {
const QualType CChar = m_Context->CharTy.withConst();
llvm::StringRef Value(Val);
......
......@@ -244,11 +244,6 @@ namespace cling {
clang::Expr* BuildDynamicExprInfo(clang::Expr* SubTree,
bool ValuePrinterReq = false);
///\brief Creates cstyle casts a pointer expression to a given qualified
/// type.
///
clang::Expr* ConstructCStyleCasePtrExpr(clang::QualType Ty, uint64_t Ptr);
///\brief Creates const char* expression from given value.
clang::Expr* ConstructConstCharPtrExpr(const char* Val);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment