diff --git a/interpreter/cling/lib/Interpreter/DynamicLookup.cpp b/interpreter/cling/lib/Interpreter/DynamicLookup.cpp index 6917a4b1078194d37397087f24bdec0483f0e677..a6d03f7bafcd8878f28cd55e2772c4bd2ae7c095 100644 --- a/interpreter/cling/lib/Interpreter/DynamicLookup.cpp +++ b/interpreter/cling/lib/Interpreter/DynamicLookup.cpp @@ -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); diff --git a/interpreter/cling/lib/Interpreter/DynamicLookup.h b/interpreter/cling/lib/Interpreter/DynamicLookup.h index 510f5e833812bc80c13743eb6633b8a83626f8f5..8a2c4a806b2df22b9d375b228b1ccb502010a74f 100644 --- a/interpreter/cling/lib/Interpreter/DynamicLookup.h +++ b/interpreter/cling/lib/Interpreter/DynamicLookup.h @@ -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);