From b5ca6352416995b5edd358623a6ae5db38d5e634 Mon Sep 17 00:00:00 2001 From: jsmall-nvidia Date: Thu, 25 Apr 2019 15:00:36 -0400 Subject: Feature/uint int definition (#954) * * Moved CPU determination macros to slang.h * Determine SlangUInt/SlangInt from the pointer width (determined from CPU macros) * Removed the UnambiguousInt and UnambigousUInt types - as a previous fragile work around * Removed UInt/Int definition from smart-pointer.h as now in common.h * * Remove ambiguity for PrettyWriter and ints * Improve comment around SlangInt/UInt * More fixes around ambiguity with PrettyWriter and integral types. * Disable VK on OSX. * Force CI to rebuild as spurious error. --- source/slang/ir.cpp | 3 +-- source/slang/mangle.cpp | 4 +--- source/slang/reflection.h | 8 -------- source/slang/type-layout.h | 3 --- 4 files changed, 2 insertions(+), 16 deletions(-) (limited to 'source/slang') diff --git a/source/slang/ir.cpp b/source/slang/ir.cpp index 3f6f8e0a3..43ec09abb 100644 --- a/source/slang/ir.cpp +++ b/source/slang/ir.cpp @@ -3,7 +3,6 @@ #include "ir-insts.h" #include "../core/basic.h" -#include "../core/slang-cpu-defines.h" #include "mangle.h" @@ -3008,7 +3007,7 @@ namespace Slang IRDumpContext* context, UInt val) { - context->builder->append(UnambigousUInt(val)); + context->builder->append(val); } */ diff --git a/source/slang/mangle.cpp b/source/slang/mangle.cpp index a61e4e666..61fa709b1 100644 --- a/source/slang/mangle.cpp +++ b/source/slang/mangle.cpp @@ -3,8 +3,6 @@ #include "name.h" #include "syntax.h" -#include "../core/slang-cpu-defines.h" - namespace Slang { struct ManglingContext @@ -23,7 +21,7 @@ namespace Slang ManglingContext* context, UInt value) { - context->sb.append(UnambigousUInt(value)); + context->sb.append(value); } void emit( diff --git a/source/slang/reflection.h b/source/slang/reflection.h index 6c0b39564..09f02d8dd 100644 --- a/source/slang/reflection.h +++ b/source/slang/reflection.h @@ -8,14 +8,6 @@ namespace Slang { -// TODO(tfoley): Need to move these somewhere universal - -typedef intptr_t Int; -typedef int64_t Int64; - -typedef uintptr_t UInt; -typedef uint64_t UInt64; - class ProgramLayout; class TypeLayout; diff --git a/source/slang/type-layout.h b/source/slang/type-layout.h index 5ac9229b4..f0c09f371 100644 --- a/source/slang/type-layout.h +++ b/source/slang/type-layout.h @@ -10,9 +10,6 @@ namespace Slang { -typedef intptr_t Int; -typedef uintptr_t UInt; - // Forward declarations enum class BaseType; -- cgit v1.2.3