Use std::vector for fstack REPT nodes

This commit is contained in:
Rangi42
2024-02-24 10:59:22 -05:00
committed by Sylvie
parent 53343d2fa6
commit b207bff157
3 changed files with 14 additions and 17 deletions

View File

@@ -6,13 +6,14 @@
#include <stdint.h>
#include <stdio.h>
#include <vector>
#include "helpers.hpp"
#include "linkdefs.hpp"
// Variables related to CLI options
extern bool isDmgMode;
extern char *linkerScriptName;
extern char *linkerScriptName;
extern char const *mapFileName;
extern bool noSymInMap;
extern char const *symFileName;
@@ -27,12 +28,6 @@ extern bool beVerbose;
extern bool isWRA0Mode;
extern bool disablePadding;
// Only used in an anonymous union by `struct FileStackNode`
struct reptNodeData {
uint32_t depth;
uint32_t *iters;
};
struct FileStackNode {
struct FileStackNode *parent;
// Line at which the parent context was exited; meaningless for the root level
@@ -41,7 +36,7 @@ struct FileStackNode {
enum FileStackNodeType type;
union {
char *name; // NODE_FILE, NODE_MACRO
struct reptNodeData rept; // NODE_REPT
std::vector<uint32_t> *iters; // NODE_REPT
};
};