@@ -638,26 +638,15 @@ class DeclNameRef {
638
638
void *getOpaqueValue () const { return FullName.getOpaqueValue (); }
639
639
static DeclNameRef getFromOpaqueValue (void *p);
640
640
641
- // *** TRANSITIONAL CODE STARTS HERE ***
642
-
643
- // We want all DeclNameRef constructions to be explicit, but they need to be
644
- // threaded through large portions of the compiler, so that would be
645
- // difficult. Instead, we will make uses of DeclNameRef(...) implicit but
646
- // deprecated, and use DeclNameRef_(...) as a stand-in for intentional calls
647
- // to the constructors. The deprecations and DeclNameRef_ function will go
648
- // away before we merge any of this into master.
649
-
650
- [[deprecated]] DeclNameRef(DeclName FullName)
641
+ explicit DeclNameRef (DeclName FullName)
651
642
: FullName(FullName) { }
652
643
653
- [[deprecated]] DeclNameRef(DeclBaseName BaseName)
644
+ explicit DeclNameRef (DeclBaseName BaseName)
654
645
: FullName(BaseName) { }
655
646
656
- [[deprecated]] DeclNameRef(Identifier BaseName)
647
+ explicit DeclNameRef (Identifier BaseName)
657
648
: FullName(BaseName) { }
658
649
659
- // *** TRANSITIONAL CODE ENDS HERE ***
660
-
661
650
// / The name of the declaration being referenced.
662
651
DeclName getFullName () const {
663
652
return FullName;
@@ -775,38 +764,26 @@ class DeclNameRef {
775
764
"only for use within the debugger");
776
765
};
777
766
778
- // *** TRANSITIONAL CODE STARTS HERE ***
779
-
780
- template <typename T>
781
- static DeclNameRef DeclNameRef_ (T name) {
782
- #pragma clang diagnostic push
783
- #pragma clang diagnostic ignored "-Wdeprecated-declarations"
784
- return DeclNameRef (name);
785
- #pragma clang diagnostic pop
786
- }
787
-
788
- // *** TRANSITIONAL CODE ENDS HERE ***
789
-
790
767
inline DeclNameRef DeclNameRef::getFromOpaqueValue (void *p) {
791
- return DeclNameRef_ (DeclName::getFromOpaqueValue (p));
768
+ return DeclNameRef (DeclName::getFromOpaqueValue (p));
792
769
}
793
770
794
771
inline DeclNameRef DeclNameRef::withoutArgumentLabels () const {
795
- return DeclNameRef_ (getBaseName ());
772
+ return DeclNameRef (getBaseName ());
796
773
}
797
774
798
775
inline DeclNameRef DeclNameRef::withArgumentLabels (
799
776
ASTContext &C, ArrayRef<Identifier> argumentNames) const {
800
- return DeclNameRef_ (DeclName (C, getBaseName (), argumentNames));
777
+ return DeclNameRef (DeclName (C, getBaseName (), argumentNames));
801
778
}
802
779
803
780
804
781
inline DeclNameRef DeclNameRef::createSubscript () {
805
- return DeclNameRef_ (DeclBaseName::createSubscript ());
782
+ return DeclNameRef (DeclBaseName::createSubscript ());
806
783
}
807
784
808
785
inline DeclNameRef DeclNameRef::createConstructor () {
809
- return DeclNameRef_ (DeclBaseName::createConstructor ());
786
+ return DeclNameRef (DeclBaseName::createConstructor ());
810
787
}
811
788
812
789
void simple_display (llvm::raw_ostream &out, DeclNameRef name);
@@ -972,10 +949,10 @@ namespace llvm {
972
949
// DeclNameRefs hash just like DeclNames.
973
950
template <> struct DenseMapInfo <swift::DeclNameRef> {
974
951
static swift::DeclNameRef getEmptyKey () {
975
- return DeclNameRef_ (DenseMapInfo<swift::DeclName>::getEmptyKey ());
952
+ return swift::DeclNameRef (DenseMapInfo<swift::DeclName>::getEmptyKey ());
976
953
}
977
954
static swift::DeclNameRef getTombstoneKey () {
978
- return DeclNameRef_ (DenseMapInfo<swift::DeclName>::getTombstoneKey ());
955
+ return swift::DeclNameRef (DenseMapInfo<swift::DeclName>::getTombstoneKey ());
979
956
}
980
957
static unsigned getHashValue (swift::DeclNameRef Val) {
981
958
return DenseMapInfo<swift::DeclName>::getHashValue (Val.getFullName ());
0 commit comments