diff options
Diffstat (limited to 'clang/lib/AST/MicrosoftCXXABI.cpp')
-rw-r--r-- | clang/lib/AST/MicrosoftCXXABI.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/clang/lib/AST/MicrosoftCXXABI.cpp b/clang/lib/AST/MicrosoftCXXABI.cpp index c4259f43a71..4de93bb4bea 100644 --- a/clang/lib/AST/MicrosoftCXXABI.cpp +++ b/clang/lib/AST/MicrosoftCXXABI.cpp @@ -44,8 +44,10 @@ public: const ASTRecordLayout &Layout = Context.getASTRecordLayout(RD); // In the Microsoft ABI, classes can have one or two vtable pointers. - return Layout.getNonVirtualSize() == Context.Target.getPointerWidth(0) || - Layout.getNonVirtualSize() == Context.Target.getPointerWidth(0) * 2; + CharUnits PointerSize = + Context.toCharUnitsFromBits(Context.Target.getPointerWidth(0)); + return Layout.getNonVirtualSize() == PointerSize || + Layout.getNonVirtualSize() == PointerSize * 2; } }; } |