Author: Arthur Eubanks
Date: 2021-05-14T14:27:07-07:00
New Revision: e8448a598560a7a8546ddb74ec5979974b47ed41

URL: 
https://github.com/llvm/llvm-project/commit/e8448a598560a7a8546ddb74ec5979974b47ed41
DIFF: 
https://github.com/llvm/llvm-project/commit/e8448a598560a7a8546ddb74ec5979974b47ed41.diff

LOG: [NFC] Directly get GV type

Added: 
    

Modified: 
    clang/lib/CodeGen/MicrosoftCXXABI.cpp

Removed: 
    


################################################################################
diff  --git a/clang/lib/CodeGen/MicrosoftCXXABI.cpp 
b/clang/lib/CodeGen/MicrosoftCXXABI.cpp
index f831cc1ee21b7..c45bd362bbd98 100644
--- a/clang/lib/CodeGen/MicrosoftCXXABI.cpp
+++ b/clang/lib/CodeGen/MicrosoftCXXABI.cpp
@@ -2167,8 +2167,7 @@ void MicrosoftCXXABI::emitVBTableDefinition(const 
VPtrInfo &VBT,
   }
 
   assert(Offsets.size() ==
-         cast<llvm::ArrayType>(cast<llvm::PointerType>(GV->getType())
-                               ->getElementType())->getNumElements());
+         cast<llvm::ArrayType>(GV->getValueType())->getNumElements());
   llvm::ArrayType *VBTableType =
     llvm::ArrayType::get(CGM.IntTy, Offsets.size());
   llvm::Constant *Init = llvm::ConstantArray::get(VBTableType, Offsets);


        
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to