Wrong condition for MS ABI in RecordLayoutBuilder.cpp

Hi all!

Today I found that condition in RecordLayoutBuilder::Layout(line 1382) is wrong.
For example
class first {
   virtual void b() {}
   double b_field;

class third: virtual first {
   //virtual void a(){}
   double r;
In this case, condition "NonVirtualSize != NonVirtualSize.RoundUpToAlignment(Alignment)" will be wrong and we will enter in LayoutVirtualBases.
But we need MSLayoutVirtualBases.
This example very simple and LayoutVirtualBases works fine, but this mistake can provide some problems in the future.
I suggest revert this condition to old version with 2 "if".
if (isMicrosoftCXXABI())
   if (NonVirtualSize != NonVirtualSize.RoundUpToAlignment(Alignment))

I include patch that resolves this problem.

  - Dmitry.

RecordLayoutBuilder.cpp.patch (1.01 KB)