diff options
| author | gingerBill <bill@gingerbill.org> | 2018-10-17 21:16:01 +0100 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2018-10-17 21:16:01 +0100 |
| commit | b171cc41e6cc0271656593b547c3f8b27664d5bc (patch) | |
| tree | c34fc8d8555fbf6892ff6798bc7ed52208f6f3da /src/checker.cpp | |
| parent | efc3a9e69dd072b678a78535d7b5a5f71e474024 (diff) | |
__atomic_* "intrinsics" using LLVM instructions
Diffstat (limited to 'src/checker.cpp')
| -rw-r--r-- | src/checker.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/checker.cpp b/src/checker.cpp index 61910f959..14daeb7ed 100644 --- a/src/checker.cpp +++ b/src/checker.cpp @@ -494,13 +494,14 @@ void add_declaration_dependency(CheckerContext *c, Entity *e) { Entity *add_global_entity(Entity *entity) { String name = entity->token.string; + defer (entity->state = EntityState_Resolved); + if (gb_memchr(name.text, ' ', name.len)) { - return entity; // NOTE(bill): 'untyped thing' + return entity; // NOTE(bill): Usually an 'untyped thing' } if (scope_insert(builtin_scope, entity)) { compiler_error("double declaration"); } - entity->state = EntityState_Resolved; return entity; } |