Skip to content

Commit 093ebe2

Browse files
committed
Feature(runtime): Ininitial, number2string
1 parent f6638d6 commit 093ebe2

2 files changed

Lines changed: 22 additions & 0 deletions

File tree

runtime/CMakeLists.txt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
cmake_minimum_required(VERSION 3.12)
2+
3+
project(hlvm-runtime)
4+
5+
set(CMAKE_BUILD_TYPE Release)
6+
set(CMAKE_CXX_STANDARD 14)
7+
set(SOURCE_FILES helpers.cpp)
8+
9+
#add_executable(runtime main.cpp)
10+
11+
add_library(hlvm-runtime STATIC ${SOURCE_FILES})

runtime/helpers.cpp

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#include <string>
2+
#include <sstream>
3+
#include <iostream>
4+
5+
__attribute__ ((visibility ("default"))) const char* number2string(double number) {
6+
std::stringstream s;
7+
8+
s << number;
9+
10+
return s.str().c_str();
11+
}

0 commit comments

Comments
 (0)