From 4f0415e338862ffec50c2d47eddea958255b504e Mon Sep 17 00:00:00 2001 From: jsmall-nvidia Date: Thu, 25 Oct 2018 11:24:16 -0400 Subject: Feature/premake linux (#689) * Premake work in progress for linux. * Added dump function. * Remove examples on linux Small warning fix. * * Don't build render-test on linux * Removed work around virtual destructor warning, and just used virtual dtor for simplicity * Git ignore obj directories * Fix premake working on windows. * * Fix sprintf_s functions * Make generates arg parsing more robust * Added FloatIntUnion to avoid type punning/strong aliasing issues, and repeated union definitions. * Work around problems building on linux with getClass claiming a strict aliasing issue. * Fix for targetBlock appearing potentiall used unintialized to gcc. * Linux slang link options -fPIC to make dll. * Add -fPIC to build options on linux. * Add -ldl for linux on slang. * Fixes to try and get premake working with .so on linux. * Make core compile with -fPIC * Try to fix linux linking with --no-as-needed before -ldl * Add rpath back. * Remove render-gl from linux build. * Re-add location for linux. * Don't include except on windows. * Remove unused line to fix warning on osx. * Remove ambiguity on OSX for operator <<. * Fixing ambiguity with operator overloading and Int types for OSX. * Fix ambiguity around UInt and operator * Fix ambiguity of UInt conversion for OSX. * Added UnambiguousInt and UnambiguousUInt to make it easier to work around OSX integer coercion for UInt/Int types. --- source/slang/emit.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'source/slang/emit.cpp') diff --git a/source/slang/emit.cpp b/source/slang/emit.cpp index c9e19dffc..9c7d61c51 100644 --- a/source/slang/emit.cpp +++ b/source/slang/emit.cpp @@ -2213,7 +2213,7 @@ struct EmitVisitor context->shared->uniqueNameCounters[key] = count+1; - sb.append(count); + sb.append(Int32(count)); return sb.ProduceString(); } @@ -2238,8 +2238,7 @@ struct EmitVisitor // for the instruction. StringBuilder sb; sb << "_S"; - sb << getID(inst); - + sb << Int32(getID(inst)); return sb.ProduceString(); } @@ -5000,7 +4999,7 @@ struct EmitVisitor String paramName; paramName.append("_"); - paramName.append(pp); + paramName.append(Int32(pp)); auto paramType = funcType->getParamType(pp); emitIRParamType(ctx, paramType, paramName); -- cgit v1.2.3