diff options
Diffstat (limited to 'source/20-codegen-compiler/CodegenDecl.cpp')
-rw-r--r-- | source/20-codegen-compiler/CodegenDecl.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/source/20-codegen-compiler/CodegenDecl.cpp b/source/20-codegen-compiler/CodegenDecl.cpp index 7cf21ce..9e88cfb 100644 --- a/source/20-codegen-compiler/CodegenDecl.cpp +++ b/source/20-codegen-compiler/CodegenDecl.cpp @@ -1,7 +1,23 @@ #include "CodegenDecl.hpp" +#include "CodegenUtils.hpp" + #include <Utils.hpp> +const std::string& DeclStruct::GetMangledName() const { + if (mangledName.empty()) { + mangledName = Utils::MakeMangledName(name, container); + } + return mangledName; +} + +const std::string& DeclEnum::GetMangledName() const { + if (mangledName.empty()) { + mangledName = Utils::MakeMangledName(name, container); + } + return mangledName; +} + static EnumValuePattern NextPattern(EnumValuePattern val) { return (EnumValuePattern)(val + 1); } |