<feed xmlns='http://www.w3.org/2005/Atom'>
<title>slang.git/tests/diagnostics/illegal-func-decl-module.slang, branch master</title>
<subtitle>Making it easier to work with shaders</subtitle>
<id>https://git.yummers.dev/slang.git/atom?h=master</id>
<link rel='self' href='https://git.yummers.dev/slang.git/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/'/>
<updated>2024-07-19T18:42:31+00:00</updated>
<entry>
<title>Fix the issue of name mangling (#4691)</title>
<updated>2024-07-19T18:42:31+00:00</updated>
<author>
<name>kaizhangNV</name>
<email>149626564+kaizhangNV@users.noreply.github.com</email>
</author>
<published>2024-07-19T18:42:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=adf758c8c4032afcd96d995840bd697d2adef34c'/>
<id>urn:sha1:adf758c8c4032afcd96d995840bd697d2adef34c</id>
<content type='text'>
* Fix the issue of name mangle

During our name mangling, we should add the direction of the parameter
in the name, otherwise it could have the name collision which will
result in invalid code generation:

e.g.

// in slang-module.slang
export func(float a) { ...}

// in test.slang
extern func(inout float a);

when we compile test.slang, slang will pass a pointer type to the
'func', however, in the slang-module.slang, `func` expects a value
instead of pointer. This will lead the wrong spirv code.

So we should add the parameter direction into the mangle name such
that above two symbols will have the different mangled names, and
we will catch this during IR-link stage.

* Change to use  to get param direction

* Address few comments</content>
</entry>
</feed>
