diff options
Diffstat (limited to 'clang/lib/AST')
-rw-r--r-- | clang/lib/AST/ItaniumMangle.cpp | 3 | ||||
-rw-r--r-- | clang/lib/AST/MicrosoftMangle.cpp | 9 | ||||
-rw-r--r-- | clang/lib/AST/StmtProfile.cpp | 4 |
3 files changed, 16 insertions, 0 deletions
diff --git a/clang/lib/AST/ItaniumMangle.cpp b/clang/lib/AST/ItaniumMangle.cpp index 58e2bc8a39b..f95dc8458e8 100644 --- a/clang/lib/AST/ItaniumMangle.cpp +++ b/clang/lib/AST/ItaniumMangle.cpp @@ -2195,6 +2195,9 @@ CXXNameMangler::mangleOperatorName(OverloadedOperatorKind OO, unsigned Arity) { // Proposal on cxx-abi-dev, 2015-10-21. // ::= aw # co_await case OO_Coawait: Out << "aw"; break; + // Proposed in cxx-abi github issue 43. + // ::= ss # <=> + case OO_Spaceship: Out << "ss"; break; case OO_None: case NUM_OVERLOADED_OPERATORS: diff --git a/clang/lib/AST/MicrosoftMangle.cpp b/clang/lib/AST/MicrosoftMangle.cpp index c8048544ab8..0c55c1a9228 100644 --- a/clang/lib/AST/MicrosoftMangle.cpp +++ b/clang/lib/AST/MicrosoftMangle.cpp @@ -1192,6 +1192,15 @@ void MicrosoftCXXNameMangler::mangleOperatorName(OverloadedOperatorKind OO, // <operator-name> ::= ?__L # co_await case OO_Coawait: Out << "?__L"; break; + case OO_Spaceship: { + // FIXME: Once MS picks a mangling, use it. + DiagnosticsEngine &Diags = Context.getDiags(); + unsigned DiagID = Diags.getCustomDiagID(DiagnosticsEngine::Error, + "cannot mangle this three-way comparison operator yet"); + Diags.Report(Loc, DiagID); + break; + } + case OO_Conditional: { DiagnosticsEngine &Diags = Context.getDiags(); unsigned DiagID = Diags.getCustomDiagID(DiagnosticsEngine::Error, diff --git a/clang/lib/AST/StmtProfile.cpp b/clang/lib/AST/StmtProfile.cpp index 6cc77f682ee..00ef0da18bb 100644 --- a/clang/lib/AST/StmtProfile.cpp +++ b/clang/lib/AST/StmtProfile.cpp @@ -1384,6 +1384,10 @@ static Stmt::StmtClass DecodeOperatorCall(const CXXOperatorCallExpr *S, case OO_GreaterEqual: BinaryOp = BO_GE; return Stmt::BinaryOperatorClass; + + case OO_Spaceship: + // FIXME: Update this once we support <=> expressions. + llvm_unreachable("<=> expressions not supported yet"); case OO_AmpAmp: BinaryOp = BO_LAnd; |