forked from Mirrors/opensbi
all: Annotate some tables to have clang-format leave them alone
One of the shortcomings of clang-format is that it doesn't allow for aligned define tables, which is used for a number of constants. Add annotation to disable the automatic formatting where needed. Signed-off-by: Olof Johansson <olof@lixom.net>
This commit is contained in:

committed by
Anup Patel

parent
97fb8c0e3b
commit
fbf986ac2a
@@ -10,6 +10,8 @@
|
||||
#ifndef __SBI_TRAP_H__
|
||||
#define __SBI_TRAP_H__
|
||||
|
||||
/* clang-format off */
|
||||
|
||||
/** Index of zero member in sbi_trap_regs */
|
||||
#define SBI_TRAP_REGS_zero 0
|
||||
/** Index of ra member in sbi_trap_regs */
|
||||
@@ -81,6 +83,8 @@
|
||||
/** Last member index in sbi_trap_regs */
|
||||
#define SBI_TRAP_REGS_last 34
|
||||
|
||||
/* clang-format on */
|
||||
|
||||
/** Get offset of member with name 'x' in sbi_trap_regs */
|
||||
#define SBI_TRAP_REGS_OFFSET(x) \
|
||||
((SBI_TRAP_REGS_##x) * __SIZEOF_POINTER__)
|
||||
|
Reference in New Issue
Block a user