Build everything as C++ (#1176)

This commit is contained in:
Rangi
2023-11-07 15:45:56 -05:00
committed by GitHub
parent 78d83be2b2
commit 1e70e703a7
84 changed files with 667 additions and 663 deletions

35
include/link/patch.hpp Normal file
View File

@@ -0,0 +1,35 @@
/* SPDX-License-Identifier: MIT */
// Applying patches to SECTIONs
#ifndef RGBDS_LINK_PATCH_H
#define RGBDS_LINK_PATCH_H
#include <stdbool.h>
#include <stdint.h>
#include "link/section.hpp"
#include "linkdefs.hpp"
struct Assertion {
struct Patch patch;
// enum AssertionType type; The `patch`'s field is instead re-used
char *message;
// This would be redundant with `.section->fileSymbols`... but `section` is sometimes NULL!
struct Symbol **fileSymbols;
struct Assertion *next;
};
/*
* Checks all assertions
* @return true if assertion failed
*/
void patch_CheckAssertions(struct Assertion *assertion);
/*
* Applies all SECTIONs' patches to them
*/
void patch_ApplyPatches(void);
#endif // RGBDS_LINK_PATCH_H