Skip to content

Commit

Permalink
Revert [Clang Interpreter] Initial patch for the constexpr interpreter
Browse files Browse the repository at this point in the history
This reverts r370476 (git commit a559095)

llvm-svn: 370481
  • Loading branch information
nandor committed Aug 30, 2019
1 parent 3fac668 commit 5c8b94a
Show file tree
Hide file tree
Showing 64 changed files with 384 additions and 8,945 deletions.
194 changes: 0 additions & 194 deletions clang/docs/ConstantInterpreter.rst

This file was deleted.

10 changes: 0 additions & 10 deletions clang/include/clang/AST/ASTContext.h
Original file line number Diff line number Diff line change
Expand Up @@ -139,12 +139,6 @@ class FullComment;

} // namespace comments

namespace interp {

class Context;

} // namespace interp

struct TypeInfo {
uint64_t Width = 0;
unsigned Align = 0;
Expand Down Expand Up @@ -570,7 +564,6 @@ class ASTContext : public RefCountedBase<ASTContext> {
const TargetInfo *Target = nullptr;
const TargetInfo *AuxTarget = nullptr;
clang::PrintingPolicy PrintingPolicy;
std::unique_ptr<interp::Context> InterpContext;

public:
IdentifierTable &Idents;
Expand All @@ -580,9 +573,6 @@ class ASTContext : public RefCountedBase<ASTContext> {
IntrusiveRefCntPtr<ExternalASTSource> ExternalSource;
ASTMutationListener *Listener = nullptr;

/// Returns the clang bytecode interpreter context.
interp::Context &getInterpContext();

/// Container for either a single DynTypedNode or for an ArrayRef to
/// DynTypedNode. For use with ParentMap.
class DynTypedNodeList {
Expand Down
2 changes: 0 additions & 2 deletions clang/include/clang/Basic/DiagnosticASTKinds.td
Original file line number Diff line number Diff line change
Expand Up @@ -228,8 +228,6 @@ def note_constexpr_bit_cast_invalid_subtype : Note<
def note_constexpr_bit_cast_indet_dest : Note<
"indeterminate value can only initialize an object of type 'unsigned char'"
"%select{, 'char',|}1 or 'std::byte'; %0 is invalid">;
def err_experimental_clang_interp_failed : Error<
"the experimental clang interpreter failed to evaluate an expression">;

def warn_integer_constant_overflow : Warning<
"overflow in expression; result is %0 with type %1">,
Expand Down
4 changes: 0 additions & 4 deletions clang/include/clang/Basic/LangOptions.def
Original file line number Diff line number Diff line change
Expand Up @@ -288,10 +288,6 @@ BENIGN_LANGOPT(ConstexprCallDepth, 32, 512,
"maximum constexpr call depth")
BENIGN_LANGOPT(ConstexprStepLimit, 32, 1048576,
"maximum constexpr evaluation steps")
BENIGN_LANGOPT(EnableNewConstInterp, 1, 0,
"enable the experimental new constant interpreter")
BENIGN_LANGOPT(ForceNewConstInterp, 1, 0,
"force the use of the experimental new constant interpreter")
BENIGN_LANGOPT(BracketDepth, 32, 256,
"maximum bracket nesting depth")
BENIGN_LANGOPT(NumLargeByValueCopy, 32, 0,
Expand Down
78 changes: 0 additions & 78 deletions clang/include/clang/Basic/OptionalDiagnostic.h

This file was deleted.

4 changes: 0 additions & 4 deletions clang/include/clang/Driver/Options.td
Original file line number Diff line number Diff line change
Expand Up @@ -838,10 +838,6 @@ def fconstant_cfstrings : Flag<["-"], "fconstant-cfstrings">, Group<f_Group>;
def fconstant_string_class_EQ : Joined<["-"], "fconstant-string-class=">, Group<f_Group>;
def fconstexpr_depth_EQ : Joined<["-"], "fconstexpr-depth=">, Group<f_Group>;
def fconstexpr_steps_EQ : Joined<["-"], "fconstexpr-steps=">, Group<f_Group>;
def fexperimental_new_constant_interpreter : Flag<["-"], "fexperimental-new-constant-interpreter">, Group<f_Group>,
HelpText<"Enable the experimental new constant interpreter">, Flags<[CC1Option]>;
def fforce_experimental_new_constant_interpreter : Flag<["-"], "fforce-experimental-new-constant-interpreter">, Group<f_Group>,
HelpText<"Force the use of the experimental new constant interpreter, failing on missing features">, Flags<[CC1Option]>;
def fconstexpr_backtrace_limit_EQ : Joined<["-"], "fconstexpr-backtrace-limit=">,
Group<f_Group>;
def fno_crash_diagnostics : Flag<["-"], "fno-crash-diagnostics">, Group<f_clang_Group>, Flags<[NoArgumentUnused, CoreOption]>,
Expand Down
8 changes: 0 additions & 8 deletions clang/lib/AST/ASTContext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@

#include "clang/AST/ASTContext.h"
#include "CXXABI.h"
#include "Interp/Context.h"
#include "clang/AST/APValue.h"
#include "clang/AST/ASTMutationListener.h"
#include "clang/AST/ASTTypeTraits.h"
Expand Down Expand Up @@ -784,13 +783,6 @@ CXXABI *ASTContext::createCXXABI(const TargetInfo &T) {
llvm_unreachable("Invalid CXXABI type!");
}

interp::Context &ASTContext::getInterpContext() {
if (!InterpContext) {
InterpContext.reset(new interp::Context(*this));
}
return *InterpContext.get();
}

static const LangASMap *getAddressSpaceMap(const TargetInfo &T,
const LangOptions &LOpts) {
if (LOpts.FakeAddressSpaceMap) {
Expand Down
3 changes: 0 additions & 3 deletions clang/lib/AST/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ set(LLVM_LINK_COMPONENTS
Support
)

add_subdirectory(Interp)

add_clang_library(clangAST
APValue.cpp
ASTConsumer.cpp
Expand Down Expand Up @@ -83,6 +81,5 @@ add_clang_library(clangAST

LINK_LIBS
clangBasic
clangInterp
clangLex
)
Loading

0 comments on commit 5c8b94a

Please sign in to comment.