summaryrefslogtreecommitdiffhomepage
path: root/tools/cppdrv.cc
blob: 7adfd0be0812925e68c1e984b99178e4222ed99a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
/* -------------------------------------------

  Copyright (C) 2024-2025 Amlal EL Mahrous, all rights reserved

------------------------------------------- */

/// @file cxxdrv.cc
/// @brief NE frontend preprocessor.

#include <LibCompiler/Defines.h>
#include <LibCompiler/ErrorID.h>
#include <LibCompiler/Version.h>
#include <cstring>
#include <iostream>
#include <vector>

LC_IMPORT_C int CPlusPlusPreprocessorMain(int argc, char const* argv[]);

int main(int argc, char const* argv[]) {
  if (auto code = CPlusPlusPreprocessorMain(2, argv); code > 0) {
    std::printf("cppdrv: preprocessor exited with code %i.\n", code);

    return LIBCOMPILER_EXEC_ERROR;
  }

  return LIBCOMPILER_SUCCESS;
}