summaryrefslogtreecommitdiff
path: root/src/voidc.cc
blob: 2dd91f92ba46101cec3bccb6670ef26857760865 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#include "memory.cc"
#include "common.cc"
#include <cstring>

static const char* SOURCE = R"(
#include <stdlib.h>

int main() {
  return EXIT_FAILURE;
}

)";
static const String SOURCE_STRING = { (u8*)SOURCE, strlen(SOURCE) };

int main() {
  String source;
  slice_copy(heap_allocator(), &SOURCE_STRING, &source);

  slice_write(&source, stdout);
  fflush(stdout);
  
  slice_deallocate(heap_allocator(), &source);
}