<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/56234>56234</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            Adding hot-patch compiler flag when compiling UE5 from source fails on multiple files.
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          Hisamera
      </td>
    </tr>
</table>

<pre>
    Hello

I would like to get this out first
I read contributing guideline, but because of Epic EULA I cannot just plop here it's entire source code, some assignee or contributor to LLVM can quite easliy become an Epic's developer here on Github and get the source code for self.

tl;dr UE5 with hotpatch flag fails to compile, please help or advise. For more information see attached files.

With very little changes (and if you disable few warnings, with none) you can compile UE5 source with Clang on Windows, to which I'm quite amazed, because when I tried it before (long time ago) it produced so many errors (because Epic used it's... "flavour" of C++ which was non-standard), that I quickly gave up.

Problem start's when you add to a "/hotpatch" flag to a clang-cl compiler in VCToolChain.cs file (I attached a dif of my source to a Epics commit d11782b9046e9d0b130309591e4efc57f4b8b037 (HEAD -> release, tag: 5.0.2-release, origin/release, origin/HEAD); Merge: 46544fa5e0aa 471880283c09; Author: UnrealBot <unrealbot@noreply.users.github.com>;Date:   Thu May 26 15:05:56 2022 +0000; 5.0.2 release), after this dozens of files throw errors, but with literally thousands compiling just okay I think there may be some bug in frontend. I looked into source files that throw function compilation problems, but I am unable to find a pattern and fix it.

We can go by for now with re-launching editor every time our code changes, as LLVM toolset, and LLVM-compatible programs save us much more time, and we have do-it-in-Blueprints-first approach that we don't need it as much, but it certainly comes in handy.

We very much would like to see it's working as it allows to be OS-agnostic, as Clang is on Windows, natively on Linux, and Apple has it's own "custom" version of Clang. 

I'm providing all .sh files, as you can see on them, whenever it is a unity or not build doesn't matter, and frontend exits on the same functions. Git diff of changes that I've performed, and both unity and non-unity compilation log, so you can precisely see how it compiled (or to be exact failed to compile). 

If you are short on hands, I could maybe chip in something (This would be my first time dabbling in compiler code, So I just assume that even if I started doing something, someone more in-the-know would finish it faster than me) but to do it, I'd need to get some jumpstart, and by this I mean some links to documentation of how to read those errors, and what to keep in mind while doing this, but If I have to read C++ official documentation things could go rough, as I've never read it
[Clang-issue.zip](https://github.com/llvm/llvm-project/files/8987316/Clang-issue.zip)
.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyVV9ty2zgM_RrnhWONfJEvD35I0mSbmXZ2Z7aXZ0qkJNYUqSWpuO7X7wEk5dLZl-1kEpmigYMD4AAtvbqePmpr_SL_sMhvx99P4uIHq4Q1Zy2SF41OIrUmCj8kUZsQ03wvaKlE5V0KphyScY1oBqO0NU4v1vcCZ6LUlRyiFr4WD72pxMPXT7fiSVTSOZ_EjyEm0Vvfi1YHLUxarPdRaJcMPkU_hErDvmJr0XdayBhN4zTshVfHeAbMT5--fSa74p_BJC20jNZcyT9_z7F7Nq_0s4ZLHUan3ok_TGqHEpfUFOw756KGg6htnb1lKdnF5k4F8fWhEBd8X7Q-9TJVraitbEQtjY0EC-57YzmC3gKUhlfbE36pnk3UmXjEc-cpfAdPnUwGkCJilCnJqtUKpFsd33n_Th6fdbgiSylZAG2la3QUi_WBwjC1uPpBKBNlibe1voiLDA4pioSEATtPaTryReJtQsoRTeHzvXsL00TTd-OUv7ABBHZpDYJ9AqXdRLns5C-tOPNT1i-tdsg20oQoDFVDTYECpPWwmQylpvGEAm_74NVQ4Wb0opPuKnQIPnBMs0GuITyoqVayLMPrNSh_BmI8UaHdL9Z3-JkQXmSkUJcxgRgZgO_IEbQyARqQV2d7FY181mLo35H8V_AgrxP4Zhgrk-MhvqRSxIEk54v145x7AsDp53cVEbes7MxsQIbFt_sv3tv7VhqXVZFTSwE-vWZbIm01xdFd5zywOYo9kq0OXKnVan9Yl8d8u9NHlZerTb7Jj8Vxpbe6rop9vS0PZb7Zk-2PD7cfxHKxeUDDcgly_LJZbG5FkeXZevnm3AfTGIeY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