diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2019-06-14 20:01:51 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2019-06-14 20:01:51 +0000 |
commit | 7fa2b74e988e8da6a1d0c27d4c6567f26aec03e6 (patch) | |
tree | 9032dde826e1c97f94f43e4a6c351de2736b1185 /clang/lib/AST/DeclarationName.cpp | |
parent | 3f39123d15ba5e145ce81c63ea7e03c72c3b4f8f (diff) | |
download | bcm5719-llvm-7fa2b74e988e8da6a1d0c27d4c6567f26aec03e6.tar.gz bcm5719-llvm-7fa2b74e988e8da6a1d0c27d4c6567f26aec03e6.zip |
Use getOperatorSpelling to get the spelling of an overloaded operator
rather than duplicating operator name tables in multiple places.
llvm-svn: 363446
Diffstat (limited to 'clang/lib/AST/DeclarationName.cpp')
-rw-r--r-- | clang/lib/AST/DeclarationName.cpp | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/clang/lib/AST/DeclarationName.cpp b/clang/lib/AST/DeclarationName.cpp index 273a1fec094..fe69c71aa3d 100644 --- a/clang/lib/AST/DeclarationName.cpp +++ b/clang/lib/AST/DeclarationName.cpp @@ -161,13 +161,7 @@ void DeclarationName::print(raw_ostream &OS, const PrintingPolicy &Policy) { return; case DeclarationName::CXXOperatorName: { - static const char *const OperatorNames[NUM_OVERLOADED_OPERATORS] = { - nullptr, -#define OVERLOADED_OPERATOR(Name, Spelling, Token, Unary, Binary, MemberOnly) \ - Spelling, -#include "clang/Basic/OperatorKinds.def" - }; - const char *OpName = OperatorNames[getCXXOverloadedOperator()]; + const char *OpName = getOperatorSpelling(getCXXOverloadedOperator()); assert(OpName && "not an overloaded operator"); OS << "operator"; |