C++: Add guards for relevant headers

Signed-off-by: Anatol Belski <ab@php.net>
This commit is contained in:
Anatol Belski 2023-03-27 00:29:58 +02:00
parent 2392f546bf
commit 091a24d53f
2 changed files with 16 additions and 0 deletions

8
ir.h
View File

@ -8,6 +8,10 @@
#ifndef IR_H
#define IR_H
#ifdef __cplusplus
extern "C" {
#endif
#include <inttypes.h>
#include <stdint.h>
#include <stdbool.h>
@ -756,4 +760,8 @@ int ir_mem_protect(void *ptr, size_t size);
int ir_mem_unprotect(void *ptr, size_t size);
int ir_mem_flush(void *ptr, size_t size);
#ifdef __cplusplus
} /* extern "C" */
#endif
#endif /* IR_H */

View File

@ -8,6 +8,10 @@
#ifndef IR_BUILDER_H
#define IR_BUILDER_H
#ifdef __cplusplus
extern "C" {
#endif
/* _ir_CTX may be redefined by the user */
#define _ir_CTX ctx
@ -589,4 +593,8 @@ ir_ref _ir_SNAPSHOT(ir_ctx *ctx, ir_ref n);
void _ir_SNAPSHOT_SET_OP(ir_ctx *ctx, ir_ref snapshot, ir_ref pos, ir_ref val);
ir_ref _ir_EXITCALL(ir_ctx *ctx, ir_ref func);
#ifdef __cplusplus
} /* extern "C" */
#endif
#endif /* IR_BUILDER_H */