@@ -1865,11 +1865,6 @@ class DISubprogram : public DILocalScope {
1865
1865
// / Only used by clients of CloneFunction, and only right after the cloning.
1866
1866
void replaceLinkageName (MDString *LN) { replaceOperandWith (3 , LN); }
1867
1867
1868
- DICompileUnit *getUnit () const {
1869
- return cast_or_null<DICompileUnit>(getRawUnit ());
1870
- }
1871
- void replaceUnit (DICompileUnit *CU) { replaceOperandWith (4 , CU); }
1872
-
1873
1868
DISubroutineType *getType () const {
1874
1869
return cast_or_null<DISubroutineType>(getRawType ());
1875
1870
}
@@ -1878,9 +1873,13 @@ class DISubprogram : public DILocalScope {
1878
1873
}
1879
1874
void replaceType (DISubroutineType *Ty) {
1880
1875
assert (isDistinct () && " Only distinct nodes can mutate" );
1881
- replaceOperandWith (5 , Ty);
1876
+ replaceOperandWith (4 , Ty);
1882
1877
}
1883
1878
1879
+ DICompileUnit *getUnit () const {
1880
+ return cast_or_null<DICompileUnit>(getRawUnit ());
1881
+ }
1882
+ void replaceUnit (DICompileUnit *CU) { replaceOperandWith (5 , CU); }
1884
1883
DITemplateParameterArray getTemplateParams () const {
1885
1884
return cast_or_null<MDTuple>(getRawTemplateParams ());
1886
1885
}
@@ -1904,8 +1903,8 @@ class DISubprogram : public DILocalScope {
1904
1903
Metadata *getRawScope () const { return getOperand (1 ); }
1905
1904
MDString *getRawName () const { return getOperandAs<MDString>(2 ); }
1906
1905
MDString *getRawLinkageName () const { return getOperandAs<MDString>(3 ); }
1907
- Metadata *getRawUnit () const { return getOperand (4 ); }
1908
- Metadata *getRawType () const { return getOperand (5 ); }
1906
+ Metadata *getRawType () const { return getOperand (4 ); }
1907
+ Metadata *getRawUnit () const { return getOperand (5 ); }
1909
1908
Metadata *getRawDeclaration () const { return getOperand (6 ); }
1910
1909
Metadata *getRawRetainedNodes () const { return getOperand (7 ); }
1911
1910
Metadata *getRawContainingType () const {
0 commit comments