Lines Matching defs:Interpreter
1 //===------ Interpreter.cpp - Incremental Compilation and Execution -------===//
37 #include "clang/Interpreter/Interpreter.h"
38 #include "clang/Interpreter/Value.h"
243 Interpreter::Interpreter(std::unique_ptr<CompilerInstance> CI,
272 Interpreter::~Interpreter() {
307 llvm::Expected<std::unique_ptr<Interpreter>>
308 Interpreter::create(std::unique_ptr<CompilerInstance> CI) {
311 std::unique_ptr<Interpreter>(new Interpreter(std::move(CI), Err));
326 llvm::Expected<std::unique_ptr<Interpreter>>
327 Interpreter::createWithCUDA(std::unique_ptr<CompilerInstance> CI,
338 auto Interp = Interpreter::create(std::move(CI));
354 const CompilerInstance *Interpreter::getCompilerInstance() const {
358 CompilerInstance *Interpreter::getCompilerInstance() {
362 llvm::Expected<llvm::orc::LLJIT &> Interpreter::getExecutionEngine() {
371 ASTContext &Interpreter::getASTContext() {
375 const ASTContext &Interpreter::getASTContext() const {
379 void Interpreter::markUserCodeStart() {
384 size_t Interpreter::getEffectivePTUSize() const {
391 Interpreter::Parse(llvm::StringRef Code) {
417 llvm::Error Interpreter::CreateExecutor() {
450 void Interpreter::ResetExecutor() { IncrExecutor.reset(); }
452 llvm::Error Interpreter::Execute(PartialTranslationUnit &T) {
469 llvm::Error Interpreter::ParseAndExecute(llvm::StringRef Code, Value *V) {
489 Interpreter::getSymbolAddress(GlobalDecl GD) const {
499 Interpreter::getSymbolAddress(llvm::StringRef IRName) const {
509 Interpreter::getSymbolAddressFromLinkerName(llvm::StringRef Name) const {
518 llvm::Error Interpreter::Undo(unsigned N) {
537 llvm::Error Interpreter::LoadDynamicLibrary(const char *name) {
554 Interpreter::CompileDtorCall(CXXRecordDecl *CXXRD) {
581 createInProcessRuntimeInterfaceBuilder(Interpreter &Interp, ASTContext &Ctx,
584 std::unique_ptr<RuntimeInterfaceBuilder> Interpreter::FindRuntimeInterface() {
625 : public TypeVisitor<InterfaceKindVisitor, Interpreter::InterfaceKind> {
637 Interpreter::InterfaceKind VisitRecordType(const RecordType *Ty) {
638 return Interpreter::InterfaceKind::WithAlloc;
641 Interpreter::InterfaceKind
643 return Interpreter::InterfaceKind::WithAlloc;
646 Interpreter::InterfaceKind
648 return Interpreter::InterfaceKind::CopyArray;
651 Interpreter::InterfaceKind
654 return Interpreter::InterfaceKind::NoAlloc;
657 Interpreter::InterfaceKind VisitPointerType(const PointerType *Ty) {
659 return Interpreter::InterfaceKind::NoAlloc;
662 Interpreter::InterfaceKind VisitReferenceType(const ReferenceType *Ty) {
666 return Interpreter::InterfaceKind::NoAlloc;
669 Interpreter::InterfaceKind VisitBuiltinType(const BuiltinType *Ty) {
680 return Interpreter::InterfaceKind::NoAlloc;
683 Interpreter::InterfaceKind VisitEnumType(const EnumType *Ty) {
685 return Interpreter::InterfaceKind::NoAlloc;
711 Interpreter &Interp;
716 InProcessRuntimeInterfaceBuilder(Interpreter &Interp, ASTContext &C, Sema &S)
735 // The Interpreter* parameter and the out parameter `OutVal`.
755 Interpreter::InterfaceKind Kind = Visitor.Visit(&*DesugaredTy);
757 case Interpreter::InterfaceKind::WithAlloc:
758 case Interpreter::InterfaceKind::CopyArray: {
763 .getValuePrintingInfo()[Interpreter::InterfaceKind::WithAlloc],
779 if (Kind == Interpreter::InterfaceKind::CopyArray) {
788 .getValuePrintingInfo()[Interpreter::InterfaceKind::CopyArray],
793 B->Interp.getValuePrintingInfo()[Interpreter::InterfaceKind::NewTag]};
808 case Interpreter::InterfaceKind::NoAlloc: {
811 B->Interp.getValuePrintingInfo()[Interpreter::InterfaceKind::NoAlloc],
815 llvm_unreachable("Unhandled Interpreter::InterfaceKind");
822 createInProcessRuntimeInterfaceBuilder(Interpreter &Interp, ASTContext &Ctx,
841 Expr *Interpreter::SynthesizeExpr(Expr *E) {
874 VRef = Value(static_cast<Interpreter *>(This), OpaqueType);
881 Interpreter *I = static_cast<Interpreter *>(This);