diff options
| author | jsmall-nvidia <jsmall@nvidia.com> | 2021-04-01 13:39:11 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-04-01 10:39:11 -0700 |
| commit | fa31d21ba92669a521a7768467246918e3947e02 (patch) | |
| tree | af98a593e24bc6309ac4d11a59562be4b22c93d7 /source/core/slang-char-util.cpp | |
| parent | 3f1632a1450a5879f337b4bd178e48880cd583f8 (diff) | |
Added compiler-core project (#1775)
* #include an absolute path didn't work - because paths were taken to always be relative.
* Split out compiler-core initially with just slang-source-loc.cpp
* More lexer, name, token to compiler-core.
* Split Lexer and Core diagnostics.
* Move slang-file-system to core.
* Add slang-file-system to core.
* More DownstreamCompiler into compiler-core
* Fix typo.
* Add compiler-core to bootstrap proj.
* Small fixes to premake
* For linux try with compiler-core
* Remove compiler-core from examples.
* Added NameConventionUtil to compiler-core
* Add global function to CharUtil to *hopefully* avoid linking issue.
* Hack to make linkage of CharUtil work on linux.
Diffstat (limited to 'source/core/slang-char-util.cpp')
| -rw-r--r-- | source/core/slang-char-util.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/source/core/slang-char-util.cpp b/source/core/slang-char-util.cpp index 298f9b75f..ea9e6dbf2 100644 --- a/source/core/slang-char-util.cpp +++ b/source/core/slang-char-util.cpp @@ -2,10 +2,8 @@ namespace Slang { -static const CharUtil::CharFlagMap _calcCharFlagsMap() +/* static */CharUtil::CharFlagMap CharUtil::makeCharFlagMap() { - typedef CharUtil::Flag Flag; - CharUtil::CharFlagMap map; memset(&map, 0, sizeof(map)); @@ -48,6 +46,11 @@ static const CharUtil::CharFlagMap _calcCharFlagsMap() return map; } -/* static */const CharUtil::CharFlagMap CharUtil::g_charFlagMap = _calcCharFlagsMap(); +/* static */int CharUtil::_ensureLink() +{ + return makeCharFlagMap().flags[0]; +} + +/* static */const CharUtil::CharFlagMap CharUtil::g_charFlagMap = makeCharFlagMap(); } // namespace Slang |
