Files
clang-p2996/lldb/test/API/lang/c/fpeval/main.c
Pavel Kosov f63e2cfb7f [LLDB] Add basic floating point ops to IR interpreter
Patch adds support for fadd, fsub, fdiv, fmul and fcmp to IR interpreter.

~~~

OS Laboratory. Huawei RRI. Saint-Petersburg

Reviewed By: clayborg

Differential Revision: https://reviews.llvm.org/D126359
2022-08-10 16:34:52 +03:00

17 lines
326 B
C

double eval(double a, double b, int op) {
switch (op) {
case 0: return a+b;
case 1: return a-b;
case 2: return a/b;
case 3: return a*b;
default: return 0;
}
}
int main (int argc, char const *argv[])
{
double a = 42.0, b = 2.0;
float f = 42.0, q = 2.0;
return 0; //// Set break point at this line.
}