From 79b571e86767d830af8dd5243b95fd8854a670c6 Mon Sep 17 00:00:00 2001 From: Dmitry Selyutin Date: Sun, 23 Jan 2022 10:33:27 +0000 Subject: [PATCH] sv_binutils: output header guard --- src/openpower/sv/sv_binutils.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/openpower/sv/sv_binutils.py b/src/openpower/sv/sv_binutils.py index 0b733ca0..389e0e3c 100644 --- a/src/openpower/sv/sv_binutils.py +++ b/src/openpower/sv/sv_binutils.py @@ -246,6 +246,11 @@ class Codegen(_enum.Enum): yield "#include " yield "" + yield "#ifdef __cplusplus" + yield "extern \"C\" {" + yield "#endif" + yield "" + yield from Opcode.c_decl() yield "" @@ -265,6 +270,11 @@ class Codegen(_enum.Enum): yield "extern const unsigned int svp64_num_entries;" yield "" + yield "#ifdef __cplusplus" + yield "}" + yield "#endif" + yield "" + yield f"#endif /* {self.name} */" yield "" -- 2.30.2