@@ -693,65 +693,73 @@ class DeclNameRef {
693693 void *getOpaqueValue () const { return FullName.getOpaqueValue (); }
694694 static DeclNameRef getFromOpaqueValue (void *p);
695695
696+ explicit DeclNameRef (ASTContext &C, Identifier moduleSelector,
697+ DeclName fullName)
698+ : FullName(fullName) { }
699+
700+ explicit DeclNameRef (ASTContext &C, Identifier moduleSelector,
701+ DeclBaseName baseName, ArrayRef<Identifier> argLabels)
702+ : FullName(C, baseName, argLabels) { }
703+
696704 explicit DeclNameRef (DeclName FullName)
697705 : FullName(FullName) { }
698706
699- explicit DeclNameRef (DeclBaseName BaseName)
700- : FullName(BaseName) { }
707+ bool hasModuleSelector () const {
708+ return false ;
709+ }
701710
702- explicit DeclNameRef (Identifier BaseName)
703- : FullName(BaseName) { }
711+ Identifier getModuleSelector () const {
712+ return Identifier ();
713+ }
704714
705715 // / The name of the declaration being referenced.
706716 DeclName getFullName () const {
707717 return FullName;
708718 }
709719
710- DeclName &getFullName () {
711- return FullName;
712- }
713-
714720 // / The base name of the declaration being referenced.
715721 DeclBaseName getBaseName () const {
716- return FullName .getBaseName ();
722+ return getFullName () .getBaseName ();
717723 }
718724
719725 Identifier getBaseIdentifier () const {
720- return FullName .getBaseIdentifier ();
726+ return getFullName () .getBaseIdentifier ();
721727 }
722728
723729 ArrayRef<Identifier> getArgumentNames () const {
724- return FullName .getArgumentNames ();
730+ return getFullName () .getArgumentNames ();
725731 }
726732
727733 bool isSimpleName () const {
728- return FullName .isSimpleName ();
734+ return getFullName () .isSimpleName ();
729735 }
730736
731737 bool isSimpleName (DeclBaseName name) const {
732- return FullName .isSimpleName (name);
738+ return getFullName () .isSimpleName (name);
733739 }
734740
735741 bool isSimpleName (StringRef name) const {
736- return FullName .isSimpleName (name);
742+ return getFullName () .isSimpleName (name);
737743 }
738744
739745 bool isSpecial () const {
740- return FullName .isSpecial ();
746+ return getFullName () .isSpecial ();
741747 }
742748
743749 bool isOperator () const {
744- return FullName .isOperator ();
750+ return getFullName () .isOperator ();
745751 }
746752
747- bool mustAlwaysBeEscaped () const { return FullName.mustAlwaysBeEscaped (); }
753+ bool mustAlwaysBeEscaped () const {
754+ return getFullName ().mustAlwaysBeEscaped ();
755+ }
748756
749757 bool isCompoundName () const {
750- return FullName .isCompoundName ();
758+ return getFullName () .isCompoundName ();
751759 }
752760
753761 explicit operator bool () const {
754- return (bool )FullName ;
762+ return (bool )getFullName () ;
755763 }
756764
757765 // / Compare two declaration names, producing -1 if \c *this comes before
@@ -825,12 +833,12 @@ inline DeclNameRef DeclNameRef::getFromOpaqueValue(void *p) {
825833}
826834
827835inline DeclNameRef DeclNameRef::withoutArgumentLabels (ASTContext &C) const {
828- return DeclNameRef (getBaseName ());
836+ return DeclNameRef (C, getModuleSelector (), getBaseName ());
829837}
830838
831839inline DeclNameRef DeclNameRef::withArgumentLabels (
832840 ASTContext &C, ArrayRef<Identifier> argumentNames) const {
833- return DeclNameRef (DeclName ( C, getBaseName (), argumentNames) );
841+ return DeclNameRef (C, getModuleSelector (), getBaseName (), argumentNames);
834842}
835843
836844inline DeclNameRef DeclNameRef::createSubscript () {
0 commit comments