clang  10.0.0svn
Namespaces | Typedefs | Functions
Interp.h File Reference
#include <limits>
#include <vector>
#include "Function.h"
#include "InterpFrame.h"
#include "InterpStack.h"
#include "InterpState.h"
#include "Opcode.h"
#include "PrimType.h"
#include "Program.h"
#include "State.h"
#include "clang/AST/ASTContext.h"
#include "clang/AST/ASTDiagnostic.h"
#include "clang/AST/CXXInheritance.h"
#include "clang/AST/Expr.h"
#include "llvm/ADT/APFloat.h"
#include "llvm/ADT/APSInt.h"
#include "llvm/Support/Endian.h"
Include dependency graph for Interp.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 clang
 Dataflow Directional Tag Classes.
 
 clang::interp
 

Typedefs

using clang::interp::CompareFn = llvm::function_ref< bool(ComparisonCategoryResult)>
 

Functions

template<typename T >
bool clang::interp::ReturnValue (const T &V, APValue &R)
 Convers a value to an APValue. More...
 
bool clang::interp::CheckExtern (InterpState &S, CodePtr OpPC, const Pointer &Ptr)
 Checks if the variable has externally defined storage. More...
 
bool clang::interp::CheckArray (InterpState &S, CodePtr OpPC, const Pointer &Ptr)
 Checks if the array is offsetable. More...
 
bool clang::interp::CheckLive (InterpState &S, CodePtr OpPC, const Pointer &Ptr, AccessKinds AK)
 Checks if a pointer is live and accesible. More...
 
bool clang::interp::CheckNull (InterpState &S, CodePtr OpPC, const Pointer &Ptr, CheckSubobjectKind CSK)
 Checks if a pointer is null. More...
 
bool clang::interp::CheckRange (InterpState &S, CodePtr OpPC, const Pointer &Ptr, AccessKinds AK)
 Checks if a pointer is in range. More...
 
bool clang::interp::CheckRange (InterpState &S, CodePtr OpPC, const Pointer &Ptr, CheckSubobjectKind CSK)
 Checks if a field from which a pointer is going to be derived is valid. More...
 
bool clang::interp::CheckConst (InterpState &S, CodePtr OpPC, const Pointer &Ptr)
 Checks if a pointer points to const storage. More...
 
bool clang::interp::CheckMutable (InterpState &S, CodePtr OpPC, const Pointer &Ptr)
 Checks if a pointer points to a mutable field. More...
 
bool clang::interp::CheckLoad (InterpState &S, CodePtr OpPC, const Pointer &Ptr)
 Checks if a value can be loaded from a block. More...
 
bool clang::interp::CheckStore (InterpState &S, CodePtr OpPC, const Pointer &Ptr)
 Checks if a value can be stored in a block. More...
 
bool clang::interp::CheckInvoke (InterpState &S, CodePtr OpPC, const Pointer &Ptr)
 Checks if a method can be invoked on an object. More...
 
bool clang::interp::CheckInit (InterpState &S, CodePtr OpPC, const Pointer &Ptr)
 Checks if a value can be initialized. More...
 
bool clang::interp::CheckCallable (InterpState &S, CodePtr OpPC, Function *F)
 Checks if a method can be called. More...
 
bool clang::interp::CheckThis (InterpState &S, CodePtr OpPC, const Pointer &This)
 Checks the 'this' pointer. More...
 
bool clang::interp::CheckPure (InterpState &S, CodePtr OpPC, const CXXMethodDecl *MD)
 Checks if a method is pure virtual. More...
 
template<typename T >
bool clang::interp::IsTrue (const T &V)
 
template<typename T , bool(*)(T, T, unsigned, T *) OpFW, template< typename U > class OpAP>
bool clang::interp::AddSubMulHelper (InterpState &S, CodePtr OpPC, unsigned Bits, const T &LHS, const T &RHS)
 
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool clang::interp::Add (InterpState &S, CodePtr OpPC)
 
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool clang::interp::Sub (InterpState &S, CodePtr OpPC)
 
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool clang::interp::Mul (InterpState &S, CodePtr OpPC)
 
template<typename T >
bool clang::interp::CmpHelper (InterpState &S, CodePtr OpPC, CompareFn Fn)
 
template<typename T >
bool clang::interp::CmpHelperEQ (InterpState &S, CodePtr OpPC, CompareFn Fn)
 
template<>
bool clang::interp::CmpHelper< Pointer > (InterpState &S, CodePtr OpPC, CompareFn Fn)
 
template<>
bool clang::interp::CmpHelperEQ< Pointer > (InterpState &S, CodePtr OpPC, CompareFn Fn)
 
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool clang::interp::EQ (InterpState &S, CodePtr OpPC)
 
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool clang::interp::NE (InterpState &S, CodePtr OpPC)
 
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool clang::interp::LT (InterpState &S, CodePtr OpPC)
 
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool clang::interp::LE (InterpState &S, CodePtr OpPC)
 
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool clang::interp::GT (InterpState &S, CodePtr OpPC)
 
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool clang::interp::GE (InterpState &S, CodePtr OpPC)
 
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool clang::interp::InRange (InterpState &S, CodePtr OpPC)
 
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool clang::interp::Dup (InterpState &S, CodePtr OpPC)
 
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool clang::interp::Pop (InterpState &S, CodePtr OpPC)
 
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool clang::interp::Const (InterpState &S, CodePtr OpPC, const T &Arg)
 
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool clang::interp::GetLocal (InterpState &S, CodePtr OpPC, uint32_t I)
 
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool clang::interp::SetLocal (InterpState &S, CodePtr OpPC, uint32_t I)
 
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool clang::interp::GetParam (InterpState &S, CodePtr OpPC, uint32_t I)
 
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool clang::interp::SetParam (InterpState &S, CodePtr OpPC, uint32_t I)
 
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool clang::interp::GetField (InterpState &S, CodePtr OpPC, uint32_t I)
 
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool clang::interp::SetField (InterpState &S, CodePtr OpPC, uint32_t I)
 
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool clang::interp::GetFieldPop (InterpState &S, CodePtr OpPC, uint32_t I)
 
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool clang::interp::GetThisField (InterpState &S, CodePtr OpPC, uint32_t I)
 
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool clang::interp::SetThisField (InterpState &S, CodePtr OpPC, uint32_t I)
 
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool clang::interp::GetGlobal (InterpState &S, CodePtr OpPC, uint32_t I)
 
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool clang::interp::SetGlobal (InterpState &S, CodePtr OpPC, uint32_t I)
 
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool clang::interp::InitGlobal (InterpState &S, CodePtr OpPC, uint32_t I)
 
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool clang::interp::InitThisField (InterpState &S, CodePtr OpPC, uint32_t I)
 
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool clang::interp::InitThisBitField (InterpState &S, CodePtr OpPC, const Record::Field *F)
 
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool clang::interp::InitThisFieldActive (InterpState &S, CodePtr OpPC, uint32_t I)
 
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool clang::interp::InitField (InterpState &S, CodePtr OpPC, uint32_t I)
 
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool clang::interp::InitBitField (InterpState &S, CodePtr OpPC, const Record::Field *F)
 
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool clang::interp::InitFieldActive (InterpState &S, CodePtr OpPC, uint32_t I)
 
bool clang::interp::GetPtrLocal (InterpState &S, CodePtr OpPC, uint32_t I)
 
bool clang::interp::GetPtrParam (InterpState &S, CodePtr OpPC, uint32_t I)
 
bool clang::interp::GetPtrGlobal (InterpState &S, CodePtr OpPC, uint32_t I)
 
bool clang::interp::GetPtrField (InterpState &S, CodePtr OpPC, uint32_t Off)
 
bool clang::interp::GetPtrThisField (InterpState &S, CodePtr OpPC, uint32_t Off)
 
bool clang::interp::GetPtrActiveField (InterpState &S, CodePtr OpPC, uint32_t Off)
 
bool clang::interp::GetPtrActiveThisField (InterpState &S, CodePtr OpPC, uint32_t Off)
 
bool clang::interp::GetPtrBase (InterpState &S, CodePtr OpPC, uint32_t Off)
 
bool clang::interp::GetPtrThisBase (InterpState &S, CodePtr OpPC, uint32_t Off)
 
bool clang::interp::VirtBaseHelper (InterpState &S, CodePtr OpPC, const RecordDecl *Decl, const Pointer &Ptr)
 
bool clang::interp::GetPtrVirtBase (InterpState &S, CodePtr OpPC, const RecordDecl *D)
 
bool clang::interp::GetPtrThisVirtBase (InterpState &S, CodePtr OpPC, const RecordDecl *D)
 
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool clang::interp::Load (InterpState &S, CodePtr OpPC)
 
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool clang::interp::LoadPop (InterpState &S, CodePtr OpPC)
 
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool clang::interp::Store (InterpState &S, CodePtr OpPC)
 
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool clang::interp::StorePop (InterpState &S, CodePtr OpPC)
 
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool clang::interp::StoreBitField (InterpState &S, CodePtr OpPC)
 
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool clang::interp::StoreBitFieldPop (InterpState &S, CodePtr OpPC)
 
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool clang::interp::InitPop (InterpState &S, CodePtr OpPC)
 
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool clang::interp::InitElem (InterpState &S, CodePtr OpPC, uint32_t Idx)
 
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool clang::interp::InitElemPop (InterpState &S, CodePtr OpPC, uint32_t Idx)
 
template<class T , bool Add>
bool clang::interp::OffsetHelper (InterpState &S, CodePtr OpPC)
 
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool clang::interp::AddOffset (InterpState &S, CodePtr OpPC)
 
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool clang::interp::SubOffset (InterpState &S, CodePtr OpPC)
 
bool clang::interp::Destroy (InterpState &S, CodePtr OpPC, uint32_t I)
 
template<PrimType TIn, PrimType TOut>
bool clang::interp::Cast (InterpState &S, CodePtr OpPC)
 
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool clang::interp::Zero (InterpState &S, CodePtr OpPC)
 
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool clang::interp::Null (InterpState &S, CodePtr OpPC)
 
bool clang::interp::This (InterpState &S, CodePtr OpPC)
 
template<PrimType TR, PrimType TL, class T = typename PrimConv<TR>::T>
unsigned clang::interp::Trunc (InterpState &S, CodePtr OpPC, unsigned Bits, const T &V)
 
template<PrimType TL, PrimType TR, typename T = typename PrimConv<TL>::T>
bool clang::interp::ShiftRight (InterpState &S, CodePtr OpPC, const T &V, unsigned RHS)
 
template<PrimType TL, PrimType TR, typename T = typename PrimConv<TL>::T>
bool clang::interp::ShiftLeft (InterpState &S, CodePtr OpPC, const T &V, unsigned RHS)
 
template<PrimType TL, PrimType TR>
bool clang::interp::Shr (InterpState &S, CodePtr OpPC)
 
template<PrimType TL, PrimType TR>
bool clang::interp::Shl (InterpState &S, CodePtr OpPC)
 
bool clang::interp::NoRet (InterpState &S, CodePtr OpPC)
 
bool clang::interp::NarrowPtr (InterpState &S, CodePtr OpPC)
 
bool clang::interp::ExpandPtr (InterpState &S, CodePtr OpPC)
 
bool clang::interp::Interpret (InterpState &S, APValue &Result)
 Interpreter entry point. More...