• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2020-2021 Huawei Device Co., Ltd.
3  *
4  * HDF is dual licensed: you can use it either under the terms of
5  * the GPL, or the BSD license, at your option.
6  * See the LICENSE file in the root of this repository for complete details.
7  */
8 
9 #ifndef HCS_COMPILER_H
10 #define HCS_COMPILER_H
11 
12 #include <stdint.h>
13 #include "hcs_types.h"
14 #include "hcs_log.h"
15 #include "hcs_parser.h"
16 #include "hcs_ast.h"
17 #include "hcs_mem.h"
18 
19 #define HBC_MAGIC_NUM 0xA00AA00A
20 #define HCS_COMPILER_VERSION_MAJOR 00
21 #define HCS_COMPILER_VERSION_MINOR 66
22 
23 typedef struct HbcHeader {
24     uint32_t magicNumber;
25     uint32_t versionMajor;
26     uint32_t versionMinor;
27     uint32_t checkSum;
28     int32_t totalSize;
29 } HbcHeader;
30 
31 /* Parse compiler options */
32 int32_t DoOption(int32_t argc, char *argv[]);
33 
34 int32_t HcsDoCompile(void);
35 
36 int32_t HcsDoOptimize(void);
37 
38 #endif // HCS_COMPILER_H
39