This is an archive of the discontinued LLVM Phabricator instance.

[ConstExprPreter] Implemented function calls and if statements
Needs ReviewPublic

Authored by nand on Nov 11 2019, 4:47 AM.

Details

Summary

Added support for compiling functions, function calls and if statements,
enabling minimal useful expressions such as the ones in cond.cpp.

Also removed instructions which were accidentally comitted in the previous patch.

The patch also reorganises some files - interpreter is not in InterpLoop.cpp,
while the opcodes are defined in Interp.h or in the Opcodes folder.

Diff Detail

clang/lib/AST/Interp/Interp.h