Fix a crashing issue for non-end-to-end compilation (#1532)
Fix a crashing issue for non-end-to-end compilation (#1532)

The refactorings that added support for multiple entry points in an output file seemingly introduced a regression such that we crash on compilation that is not "end-to-end." Unfortunately, all of our testing only covers end-to-end compilation, and many users only use that mode.

I've added a fix for the issue I ran into, but I haven't addressed the testing gap in this change. Without adding testing for non-end-to-end compilation, I expect further regressions to slip in over time.

Co-authored-by: Yong He <87660905d704a3fee057aaed04fb3d17ce0b45d2@outlook.com>
shader-slang/slang,csyonghe/slang,csyonghe/slang,csyonghe/slang,shader-slang/slang,shader-slang/slang