Skip to content

Commit

Permalink
Fix the node type for "file" nodes in object files (#1593)
Browse files Browse the repository at this point in the history
  • Loading branch information
Rangi42 authored Jan 3, 2025
1 parent d88feee commit 73ad431
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
3 changes: 0 additions & 3 deletions include/asm/fstack.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,6 @@ struct FileStackNode {
: type(type_), data(data_){};

std::string const &dump(uint32_t curLineNo) const;

// If true, entering this context generates a new unique ID.
bool generatesUniqueID() const { return type == NODE_REPT || type == NODE_MACRO; }
};

#define DEFAULT_MAX_DEPTH 64
Expand Down
2 changes: 1 addition & 1 deletion src/asm/fstack.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ static bool newFileContext(std::string const &filePath, bool updateStateNow) {
std::shared_ptr<MacroArgs> macroArgs = nullptr;

auto fileInfo =
std::make_shared<FileStackNode>(NODE_MACRO, filePath == "-" ? "<stdin>" : filePath);
std::make_shared<FileStackNode>(NODE_FILE, filePath == "-" ? "<stdin>" : filePath);
if (!contextStack.empty()) {
Context &oldContext = contextStack.top();
fileInfo->parent = oldContext.fileInfo;
Expand Down

0 comments on commit 73ad431

Please # to comment.