@@ -481,24 +481,69 @@ class Type {
481
481
static Type *getFloatingPointTy (LLVMContext &C, const fltSemantics &S);
482
482
483
483
// ===--------------------------------------------------------------------===//
484
- // Convenience methods for getting pointer types with one of the above builtin
485
- // types as pointee.
484
+ // Convenience methods for getting pointer types.
486
485
//
487
- static PointerType *getHalfPtrTy (LLVMContext &C, unsigned AS = 0 );
488
- static PointerType *getBFloatPtrTy (LLVMContext &C, unsigned AS = 0 );
489
- static PointerType *getFloatPtrTy (LLVMContext &C, unsigned AS = 0 );
490
- static PointerType *getDoublePtrTy (LLVMContext &C, unsigned AS = 0 );
491
- static PointerType *getX86_FP80PtrTy (LLVMContext &C, unsigned AS = 0 );
492
- static PointerType *getFP128PtrTy (LLVMContext &C, unsigned AS = 0 );
493
- static PointerType *getPPC_FP128PtrTy (LLVMContext &C, unsigned AS = 0 );
494
- static PointerType *getX86_MMXPtrTy (LLVMContext &C, unsigned AS = 0 );
495
- static PointerType *getX86_AMXPtrTy (LLVMContext &C, unsigned AS = 0 );
496
- static PointerType *getIntNPtrTy (LLVMContext &C, unsigned N, unsigned AS = 0 );
497
- static PointerType *getInt1PtrTy (LLVMContext &C, unsigned AS = 0 );
486
+
487
+ // TODO: After opaque pointer transition these can be replaced by simply
488
+ // calling PointerType::get(C, AS).
498
489
static PointerType *getInt8PtrTy (LLVMContext &C, unsigned AS = 0 );
499
- static PointerType *getInt16PtrTy (LLVMContext &C, unsigned AS = 0 );
500
- static PointerType *getInt32PtrTy (LLVMContext &C, unsigned AS = 0 );
501
- static PointerType *getInt64PtrTy (LLVMContext &C, unsigned AS = 0 );
490
+ [[deprecated(" Pointers no longer have element types" )]]
491
+ inline PointerType *getHalfPtrTy (LLVMContext &C, unsigned AS = 0 ) {
492
+ return getInt8PtrTy (C, AS);
493
+ }
494
+ [[deprecated(" Pointers no longer have element types" )]]
495
+ inline PointerType *getBFloatPtrTy (LLVMContext &C, unsigned AS = 0 ) {
496
+ return getInt8PtrTy (C, AS);
497
+ }
498
+ [[deprecated(" Pointers no longer have element types" )]]
499
+ inline PointerType *getFloatPtrTy (LLVMContext &C, unsigned AS = 0 ) {
500
+ return getInt8PtrTy (C, AS);
501
+ }
502
+ [[deprecated(" Pointers no longer have element types" )]]
503
+ inline PointerType *getDoublePtrTy (LLVMContext &C, unsigned AS = 0 ) {
504
+ return getInt8PtrTy (C, AS);
505
+ }
506
+ [[deprecated(" Pointers no longer have element types" )]]
507
+ inline PointerType *getX86_FP80PtrTy (LLVMContext &C, unsigned AS = 0 ) {
508
+ return getInt8PtrTy (C, AS);
509
+ }
510
+ [[deprecated(" Pointers no longer have element types" )]]
511
+ inline PointerType *getFP128PtrTy (LLVMContext &C, unsigned AS = 0 ) {
512
+ return getInt8PtrTy (C, AS);
513
+ }
514
+ [[deprecated(" Pointers no longer have element types" )]]
515
+ inline PointerType *getPPC_FP128PtrTy (LLVMContext &C, unsigned AS = 0 ) {
516
+ return getInt8PtrTy (C, AS);
517
+ }
518
+ [[deprecated(" Pointers no longer have element types" )]]
519
+ inline PointerType *getX86_MMXPtrTy (LLVMContext &C, unsigned AS = 0 ) {
520
+ return getInt8PtrTy (C, AS);
521
+ }
522
+ [[deprecated(" Pointers no longer have element types" )]]
523
+ inline PointerType *getX86_AMXPtrTy (LLVMContext &C, unsigned AS = 0 ) {
524
+ return getInt8PtrTy (C, AS);
525
+ }
526
+ [[deprecated(" Pointers no longer have element types" )]]
527
+ inline PointerType *getIntNPtrTy (LLVMContext &C, unsigned N, unsigned AS = 0 ) {
528
+ return getInt8PtrTy (C, AS);
529
+ }
530
+ [[deprecated(" Pointers no longer have element types" )]]
531
+ inline PointerType *getInt1PtrTy (LLVMContext &C, unsigned AS = 0 ) {
532
+ return getInt8PtrTy (C, AS);
533
+ }
534
+ [[deprecated(" Pointers no longer have element types" )]]
535
+ inline PointerType *getInt16PtrTy (LLVMContext &C, unsigned AS = 0 ) {
536
+ return getInt8PtrTy (C, AS);
537
+ }
538
+ [[deprecated(" Pointers no longer have element types" )]]
539
+ inline PointerType *getInt32PtrTy (LLVMContext &C, unsigned AS = 0 ) {
540
+ return getInt8PtrTy (C, AS);
541
+ }
542
+ [[deprecated(" Pointers no longer have element types" )]]
543
+ inline PointerType *getInt64PtrTy (LLVMContext &C, unsigned AS = 0 ) {
544
+ return getInt8PtrTy (C, AS);
545
+ }
546
+
502
547
static Type *getWasm_ExternrefTy (LLVMContext &C);
503
548
static Type *getWasm_FuncrefTy (LLVMContext &C);
504
549
0 commit comments