[clang] e8448a5 - [NFC] Directly get GV type
Arthur Eubanks via cfe-commits
cfe-commits at lists.llvm.org
Fri May 14 14:27:19 PDT 2021
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);
More information about the cfe-commits
mailing list