Commit 05b326d1 authored by dbarbera's avatar dbarbera
Browse files

Added rule for testing the llvm backend

parent 16032860
......@@ -19,9 +19,19 @@ test-ada:
gnatlink -o testcase test.o myfunction.ali -lgnat
./testcase | diff expected -
test-llvm:
../../../opengeode.py myfunction.pr system_structure.pr --check --llvm
asn1.exe -c dataview-uniq.asn -equal
llc myfunction.ll
clang -c myfunction.s
clang -c dataview-uniq.c
clang -c test_llvm.c
clang myfunction.o dataview-uniq.o test_llvm.o -o testcase
./testcase | diff expected -
coverage:
coverage run -p ../../../opengeode.py myfunction.pr system_structure.pr --toAda
clean:
rm -rf *.adb *.ads *.pyc runSpark.sh spark.idx *.o *.ali gnat.cfg examiner bin *.wrn *.gpr datav*.? ber.c xer.c asn1crt.? acn.c real.c
rm -rf *.adb *.ads *.pyc runSpark.sh spark.idx *.o *.ali gnat.cfg examiner \
bin *.wrn *.gpr datav*.? ber.c xer.c asn1crt.? acn.c real.c *.ll *.s testcase
#include <stdio.h>
#include "dataview-uniq.h"
extern void basic_startup();
extern void myfunction_start_something(asn1SccT_Int32 *);
void myfunction_RI_result_data(long long *val)
{
printf("[C] result_data: %lld\n", *val);
}
int main()
{
asn1SccT_Int32 test = 5;
printf("[C Code] Running test\n");
basic_startup();
myfunction_start_something(&test);
return 0;
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment