summaryrefslogtreecommitdiff
path: root/src/voidc.cc
blob: 811018442f63257110812ae4422067e4bfae69c1 (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 <cstring>

#include "common.cc"
#include "memory.cc"

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);

  slice_deallocate(heap_allocator(), &source);
}