File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -4,8 +4,6 @@ project(hlvm-runtime)
44
55set (CMAKE_BUILD_TYPE Release)
66set (CMAKE_CXX_STANDARD 14)
7- set (SOURCE_FILES helpers.cpp)
8-
9- #add_executable(runtime main.cpp)
7+ set (SOURCE_FILES helpers.cpp helpers.h helpers.h)
108
119add_library (hlvm-runtime STATIC ${SOURCE_FILES} )
Original file line number Diff line number Diff line change 22#include < sstream>
33#include < iostream>
44
5+ #include " helpers.h"
6+
57__attribute__ ((visibility (" default" ))) const char* number2string(double number) {
6- std::stringstream s ;
8+ char * result = new char [ 100 ] ;
79
8- s << number;
10+ sprintf (result, " %f " , number) ;
911
10- return s. str (). c_str () ;
12+ return result ;
1113}
Original file line number Diff line number Diff line change 1+
2+ #ifndef HLVM_RUNTIME_HELPERS_H
3+ #define HLVM_RUNTIME_HELPERS_H
4+
5+ __attribute__ ((visibility ("default" ))) const char * number2string (double number );
6+
7+ #endif //HLVM_RUNTIME_HELPERS_H
You can’t perform that action at this time.
0 commit comments