forked from OSchip/llvm-project
[MS ABI] Replace dead code with an assertion
As per C++ [dcl.ref]p1, cv-qualified references are not valid. As such, change the mangler to assert that this event does not happen. llvm-svn: 256662
This commit is contained in:
parent
474b323a03
commit
e3d7191a74
|
@ -2215,7 +2215,8 @@ void MicrosoftCXXNameMangler::mangleType(const ObjCObjectPointerType *T,
|
|||
void MicrosoftCXXNameMangler::mangleType(const LValueReferenceType *T,
|
||||
Qualifiers Quals, SourceRange Range) {
|
||||
QualType PointeeType = T->getPointeeType();
|
||||
Out << (Quals.hasVolatile() ? 'B' : 'A');
|
||||
assert(!Quals.hasConst() && !Quals.hasVolatile() && "unexpected qualifier!");
|
||||
Out << 'A';
|
||||
manglePointerExtQualifiers(Quals, PointeeType);
|
||||
mangleType(PointeeType, Range);
|
||||
}
|
||||
|
@ -2226,7 +2227,8 @@ void MicrosoftCXXNameMangler::mangleType(const LValueReferenceType *T,
|
|||
void MicrosoftCXXNameMangler::mangleType(const RValueReferenceType *T,
|
||||
Qualifiers Quals, SourceRange Range) {
|
||||
QualType PointeeType = T->getPointeeType();
|
||||
Out << (Quals.hasVolatile() ? "$$R" : "$$Q");
|
||||
assert(!Quals.hasConst() && !Quals.hasVolatile() && "unexpected qualifier!");
|
||||
Out << "$$Q";
|
||||
manglePointerExtQualifiers(Quals, PointeeType);
|
||||
mangleType(PointeeType, Range);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue