diff options
Diffstat (limited to 'backend/include/rcc/MIR/EmbeddedIR.h')
| -rw-r--r-- | backend/include/rcc/MIR/EmbeddedIR.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/backend/include/rcc/MIR/EmbeddedIR.h b/backend/include/rcc/MIR/EmbeddedIR.h index 99f1493..1c17938 100644 --- a/backend/include/rcc/MIR/EmbeddedIR.h +++ b/backend/include/rcc/MIR/EmbeddedIR.h @@ -3,6 +3,7 @@ #ifndef RCC_MIR_EMBEDDEDIR_H #define RCC_MIR_EMBEDDEDIR_H +#include "rcc/CodeGen/GlobalObject.h" #include "rcc/Support/TextDiagnostic.h" #include <cstddef> @@ -141,6 +142,8 @@ public: [[nodiscard]] const EmbeddedIRFunction *function(std::string_view Name) const noexcept; [[nodiscard]] const EmbeddedIRFunction *unnamedFunction(std::size_t Ordinal) const noexcept; [[nodiscard]] const EmbeddedIRReference *globalObject(std::string_view Name) const noexcept; + [[nodiscard]] std::optional<GlobalValueProperties> + globalObjectProperties(std::string_view Name) const noexcept; [[nodiscard]] const EmbeddedIRMetadataDefinition *metadata(std::string_view Name) const noexcept; [[nodiscard]] const EmbeddedIRTypeDefinition * typeDefinition(std::string_view Name) const noexcept; @@ -167,6 +170,8 @@ private: std::optional<TextRange> DataLayoutRange; std::vector<EmbeddedIRFunction> Functions; std::vector<EmbeddedIRReference> GlobalObjects; + std::unordered_map<std::string, GlobalValueProperties, StringHash, std::equal_to<> > + GlobalProperties; std::vector<EmbeddedIRMetadataDefinition> MetadataDefinitions; std::vector<EmbeddedIRTypeDefinition> TypeDefinitions; std::unordered_map<std::string, std::size_t, StringHash, std::equal_to<>> FunctionNameToIndex; |
