diff options
author | Michael Forney <mforney@mforney.org> | 2021-07-02 01:05:15 -0700 |
---|---|---|
committer | Michael Forney <mforney@mforney.org> | 2021-07-02 01:05:15 -0700 |
commit | 003f6a14b05bb16fa6f950dc193a8cbd62e0836d (patch) | |
tree | 0a5d7aded9ad0a26ea839d57d8c9b83971e469f5 /qbe.c | |
parent | eb8232463e3b1b758ff9f8a1cfb89bca2f655db4 (diff) |
qbe: Mark static const data as such
Diffstat (limited to 'qbe.c')
-rw-r--r-- | qbe.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -935,14 +935,14 @@ funcexpr(struct func *f, struct expr *e) static void zero(struct func *func, struct value *addr, int align, uint64_t offset, uint64_t end) { - enum instkind store[] = { + static const enum instkind store[] = { [1] = ISTOREB, [2] = ISTOREH, [4] = ISTOREW, [8] = ISTOREL, }; - struct value *tmp; static struct value z = {.kind = VALUE_INTCONST}; + struct value *tmp; int a = 1; while (offset < end) { @@ -1034,7 +1034,7 @@ funcswitch(struct func *f, struct value *v, struct switchcases *c, struct block static void emitvalue(struct value *v) { - static char sigil[] = { + static const char sigil[] = { [VALUE_TEMP] = '%', [VALUE_GLOBAL] = '$', [VALUE_TYPE] = ':', |