File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -1391,9 +1391,9 @@ LLVMBool LLVMIsLiteralStruct(LLVMTypeRef StructTy);
1391
1391
*/
1392
1392
1393
1393
/**
1394
- * Obtain the type of elements within a sequential type.
1394
+ * Obtain the element type of an array or vector type.
1395
1395
*
1396
- * This works on array, vector, and pointer types .
1396
+ * This currently also works for pointer types, but this usage is deprecated .
1397
1397
*
1398
1398
* @see llvm::SequentialType::getElementType()
1399
1399
*/
Original file line number Diff line number Diff line change @@ -798,7 +798,7 @@ LLVMTypeRef LLVMScalableVectorType(LLVMTypeRef ElementType,
798
798
LLVMTypeRef LLVMGetElementType (LLVMTypeRef WrappedTy) {
799
799
auto *Ty = unwrap<Type>(WrappedTy);
800
800
if (auto *PTy = dyn_cast<PointerType>(Ty))
801
- return wrap (PTy->getPointerElementType ());
801
+ return wrap (PTy->getNonOpaquePointerElementType ());
802
802
if (auto *ATy = dyn_cast<ArrayType>(Ty))
803
803
return wrap (ATy->getElementType ());
804
804
return wrap (cast<VectorType>(Ty)->getElementType ());
You can’t perform that action at this time.
0 commit comments