mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
The previous statement happened to work out of sheer luck. `MainModule` is initialized by the call to `getMainModule()`. The expression could be evaluated in any order, and in the Visual Studio case, was evaluated with the index *first*. At this point `MainModule` was uninitialized (fortunately, it was set to NULL). As a result, the `getName` call would fail. Ensure that the `MainModule` is initialized first by using a local variable.
37 KiB
37 KiB