[clang][modules] Don't prevent translation of FW_Private includes when explicitly...
[llvm-project.git] / clang / lib / AST / Interp / Frame.h
blob079e4259b0ae8a9e1126ffdbb5ea478e715d8e01
1 //===--- Frame.h - Call frame for the VM and AST Walker ---------*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // Defines the base class of interpreter and evaluator stack frames.
11 //===----------------------------------------------------------------------===//
13 #ifndef LLVM_CLANG_AST_INTERP_FRAME_H
14 #define LLVM_CLANG_AST_INTERP_FRAME_H
16 #include "clang/Basic/SourceLocation.h"
17 #include "llvm/Support/raw_ostream.h"
19 namespace clang {
20 class FunctionDecl;
22 namespace interp {
24 /// Base class for stack frames, shared between VM and walker.
25 class Frame {
26 public:
27 virtual ~Frame();
29 /// Generates a human-readable description of the call site.
30 virtual void describe(llvm::raw_ostream &OS) const = 0;
32 /// Returns a pointer to the caller frame.
33 virtual Frame *getCaller() const = 0;
35 /// Returns the location of the call site.
36 virtual SourceRange getCallRange() const = 0;
38 /// Returns the called function's declaration.
39 virtual const FunctionDecl *getCallee() const = 0;
42 } // namespace interp
43 } // namespace clang
45 #endif