class Interpreter
Declaration
class Interpreter { /* full declaration omitted */ };
Description
Provides top-level interfaces for incremental compilation and execution.
Declared at: clang/include/clang/Interpreter/Interpreter.h:48
Member Variables
- private std::unique_ptr<llvm::orc::ThreadSafeContext> TSCtx
- private std::unique_ptr<IncrementalParser> IncrParser
- private std::unique_ptr<IncrementalExecutor> IncrExecutor
Method Overview
- public llvm::Error Execute(clang::PartialTranslationUnit & T)
- private Interpreter(std::unique_ptr<CompilerInstance> CI, llvm::Error & Err)
- public llvm::Expected<PartialTranslationUnit &> Parse(llvm::StringRef Code)
- public llvm::Error ParseAndExecute(llvm::StringRef Code)
- public llvm::Error Undo(unsigned int N = 1)
- public static llvm::Expected<std::unique_ptr<Interpreter>> create(std::unique_ptr<CompilerInstance> CI)
- public const clang::CompilerInstance * getCompilerInstance() const
- public const llvm::orc::LLJIT * getExecutionEngine() const
- public llvm::Expected<llvm::JITTargetAddress> getSymbolAddress(clang::GlobalDecl GD) const
- public llvm::Expected<llvm::JITTargetAddress> getSymbolAddress(llvm::StringRef IRName) const
- public llvm::Expected<llvm::JITTargetAddress> getSymbolAddressFromLinkerName(llvm::StringRef LinkerName) const
- public ~Interpreter()
Methods
¶llvm::Error Execute(
clang::PartialTranslationUnit& T)
llvm::Error Execute(
clang::PartialTranslationUnit& T)
Declared at: clang/include/clang/Interpreter/Interpreter.h:62
Parameters
¶Interpreter(std::unique_ptr<CompilerInstance> CI,
llvm::Error& Err)
Interpreter(std::unique_ptr<CompilerInstance> CI,
llvm::Error& Err)
Declared at: clang/include/clang/Interpreter/Interpreter.h:53
Parameters
- std::unique_ptr<CompilerInstance> CI
- llvm::Error& Err
¶llvm::Expected<PartialTranslationUnit&> Parse(
llvm::StringRef Code)
llvm::Expected<PartialTranslationUnit&> Parse(
llvm::StringRef Code)
Declared at: clang/include/clang/Interpreter/Interpreter.h:61
Parameters
- llvm::StringRef Code
¶llvm::Error ParseAndExecute(llvm::StringRef Code)
llvm::Error ParseAndExecute(llvm::StringRef Code)
Declared at: clang/include/clang/Interpreter/Interpreter.h:63
Parameters
- llvm::StringRef Code
¶llvm::Error Undo(unsigned int N = 1)
llvm::Error Undo(unsigned int N = 1)
Description
Undo N previous incremental inputs.
Declared at: clang/include/clang/Interpreter/Interpreter.h:73
Parameters
- unsigned int N = 1
¶static llvm::Expected<
std::unique_ptr<Interpreter>>
create(std::unique_ptr<CompilerInstance> CI)
static llvm::Expected<
std::unique_ptr<Interpreter>>
create(std::unique_ptr<CompilerInstance> CI)
Declared at: clang/include/clang/Interpreter/Interpreter.h:58
Parameters
- std::unique_ptr<CompilerInstance> CI
¶const clang::CompilerInstance*
getCompilerInstance() const
const clang::CompilerInstance*
getCompilerInstance() const
Declared at: clang/include/clang/Interpreter/Interpreter.h:59
¶const llvm::orc::LLJIT* getExecutionEngine() const
const llvm::orc::LLJIT* getExecutionEngine() const
Declared at: clang/include/clang/Interpreter/Interpreter.h:60
¶llvm::Expected<llvm::JITTargetAddress>
getSymbolAddress(clang::GlobalDecl GD) const
llvm::Expected<llvm::JITTargetAddress>
getSymbolAddress(clang::GlobalDecl GD) const
Declared at: clang/include/clang/Interpreter/Interpreter.h:78
Parameters
Returns
the \c JITTargetAddress of a \c GlobalDecl. This interface uses the CodeGenModule's internal mangling cache to avoid recomputing the mangled name.
¶llvm::Expected<llvm::JITTargetAddress>
getSymbolAddress(llvm::StringRef IRName) const
llvm::Expected<llvm::JITTargetAddress>
getSymbolAddress(llvm::StringRef IRName) const
Declared at: clang/include/clang/Interpreter/Interpreter.h:82
Parameters
- llvm::StringRef IRName
Returns
the \c JITTargetAddress of a given name as written in the IR.
¶llvm::Expected<llvm::JITTargetAddress>
getSymbolAddressFromLinkerName(
llvm::StringRef LinkerName) const
llvm::Expected<llvm::JITTargetAddress>
getSymbolAddressFromLinkerName(
llvm::StringRef LinkerName) const
Declared at: clang/include/clang/Interpreter/Interpreter.h:87
Parameters
- llvm::StringRef LinkerName
Returns
the \c JITTargetAddress of a given name as written in the object file.
¶~Interpreter()
~Interpreter()
Declared at: clang/include/clang/Interpreter/Interpreter.h:56