[Clang Interpreter] Initial patch for the constexpr interpreter
authorNandor Licker <n@ndor.email>
Sat, 31 Aug 2019 15:00:38 +0000 (15:00 +0000)
committerNandor Licker <n@ndor.email>
Sat, 31 Aug 2019 15:00:38 +0000 (15:00 +0000)
commitafcb3de117265a69d21e5673356e925a454d7d02
treee0d3edbedcef3c7e8f69f4a65724e72e7494c9b1
parent2d89007f61f609c037fefa33ae93f4193e7eed37
[Clang Interpreter] Initial patch for the constexpr interpreter

Summary:
This patch introduces the skeleton of the constexpr interpreter,
capable of evaluating a simple constexpr functions consisting of
if statements. The interpreter is described in more detail in the
RFC. Further patches will add more features.

Reviewers: Bigcheese, jfb, rsmith

Subscribers: bruno, uenoku, ldionne, Tyker, thegameg, tschuett, dexonsmith, mgorny, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D64146

llvm-svn: 370584
68 files changed:
clang/docs/ConstantInterpreter.rst [new file with mode: 0644]
clang/docs/index.rst
clang/include/clang/AST/ASTContext.h
clang/include/clang/AST/OptionalDiagnostic.h [new file with mode: 0644]
clang/include/clang/Basic/DiagnosticASTKinds.td
clang/include/clang/Basic/LangOptions.def
clang/include/clang/Driver/Options.td
clang/lib/AST/ASTContext.cpp
clang/lib/AST/CMakeLists.txt
clang/lib/AST/ExprConstant.cpp
clang/lib/AST/Interp/Block.cpp [new file with mode: 0644]
clang/lib/AST/Interp/Block.h [new file with mode: 0644]
clang/lib/AST/Interp/ByteCodeEmitter.cpp [new file with mode: 0644]
clang/lib/AST/Interp/ByteCodeEmitter.h [new file with mode: 0644]
clang/lib/AST/Interp/ByteCodeExprGen.cpp [new file with mode: 0644]
clang/lib/AST/Interp/ByteCodeExprGen.h [new file with mode: 0644]
clang/lib/AST/Interp/ByteCodeGenError.cpp [new file with mode: 0644]
clang/lib/AST/Interp/ByteCodeGenError.h [new file with mode: 0644]
clang/lib/AST/Interp/ByteCodeStmtGen.cpp [new file with mode: 0644]
clang/lib/AST/Interp/ByteCodeStmtGen.h [new file with mode: 0644]
clang/lib/AST/Interp/CMakeLists.txt [new file with mode: 0644]
clang/lib/AST/Interp/Context.cpp [new file with mode: 0644]
clang/lib/AST/Interp/Context.h [new file with mode: 0644]
clang/lib/AST/Interp/Descriptor.cpp [new file with mode: 0644]
clang/lib/AST/Interp/Descriptor.h [new file with mode: 0644]
clang/lib/AST/Interp/Disasm.cpp [new file with mode: 0644]
clang/lib/AST/Interp/EvalEmitter.cpp [new file with mode: 0644]
clang/lib/AST/Interp/EvalEmitter.h [new file with mode: 0644]
clang/lib/AST/Interp/Frame.cpp [new file with mode: 0644]
clang/lib/AST/Interp/Frame.h [new file with mode: 0644]
clang/lib/AST/Interp/Function.cpp [new file with mode: 0644]
clang/lib/AST/Interp/Function.h [new file with mode: 0644]
clang/lib/AST/Interp/Integral.h [new file with mode: 0644]
clang/lib/AST/Interp/Interp.cpp [new file with mode: 0644]
clang/lib/AST/Interp/Interp.h [new file with mode: 0644]
clang/lib/AST/Interp/InterpFrame.cpp [new file with mode: 0644]
clang/lib/AST/Interp/InterpFrame.h [new file with mode: 0644]
clang/lib/AST/Interp/InterpStack.cpp [new file with mode: 0644]
clang/lib/AST/Interp/InterpStack.h [new file with mode: 0644]
clang/lib/AST/Interp/InterpState.cpp [new file with mode: 0644]
clang/lib/AST/Interp/InterpState.h [new file with mode: 0644]
clang/lib/AST/Interp/Opcode.h [new file with mode: 0644]
clang/lib/AST/Interp/Opcodes.td [new file with mode: 0644]
clang/lib/AST/Interp/Pointer.cpp [new file with mode: 0644]
clang/lib/AST/Interp/Pointer.h [new file with mode: 0644]
clang/lib/AST/Interp/Program.cpp [new file with mode: 0644]
clang/lib/AST/Interp/Program.h [new file with mode: 0644]
clang/lib/AST/Interp/Record.cpp [new file with mode: 0644]
clang/lib/AST/Interp/Record.h [new file with mode: 0644]
clang/lib/AST/Interp/Source.cpp [new file with mode: 0644]
clang/lib/AST/Interp/Source.h [new file with mode: 0644]
clang/lib/AST/Interp/State.cpp [new file with mode: 0644]
clang/lib/AST/Interp/State.h [new file with mode: 0644]
clang/lib/AST/Interp/Type.cpp [new file with mode: 0644]
clang/lib/AST/Interp/Type.h [new file with mode: 0644]
clang/lib/Driver/ToolChains/Clang.cpp
clang/lib/Frontend/CompilerInvocation.cpp
clang/test/AST/Interp/cond.cpp [new file with mode: 0644]
clang/test/SemaCXX/constant-expression-cxx2a.cpp
clang/test/SemaCXX/constexpr-many-arguments.cpp
clang/test/SemaCXX/shift.cpp
clang/utils/TableGen/CMakeLists.txt
clang/utils/TableGen/ClangOpcodesEmitter.cpp [new file with mode: 0644]
clang/utils/TableGen/TableGen.cpp
clang/utils/TableGen/TableGenBackends.h
llvm/utils/gn/secondary/clang/lib/AST/BUILD.gn
llvm/utils/gn/secondary/clang/lib/AST/Interp/BUILD.gn [new file with mode: 0644]
llvm/utils/gn/secondary/clang/utils/TableGen/BUILD.gn