From 3d221f2fcea813daac37f5d204e11efde7878f70 Mon Sep 17 00:00:00 2001 From: Alexis Hunt Date: Sun, 29 Nov 2009 07:34:05 +0000 Subject: Add DeclarationName support for C++0x operator literals. They should now work as function names outside of templates - they'll probably cause some damage there as they're largely untested. llvm-svn: 90064 --- clang/lib/Frontend/PCHReader.cpp | 4 ++++ clang/lib/Frontend/PCHWriter.cpp | 4 ++++ 2 files changed, 8 insertions(+) (limited to 'clang/lib/Frontend') diff --git a/clang/lib/Frontend/PCHReader.cpp b/clang/lib/Frontend/PCHReader.cpp index ec9834894fb..cb96bcb48ae 100644 --- a/clang/lib/Frontend/PCHReader.cpp +++ b/clang/lib/Frontend/PCHReader.cpp @@ -2589,6 +2589,10 @@ PCHReader::ReadDeclarationName(const RecordData &Record, unsigned &Idx) { return Context->DeclarationNames.getCXXOperatorName( (OverloadedOperatorKind)Record[Idx++]); + case DeclarationName::CXXLiteralOperatorName: + return Context->DeclarationNames.getCXXLiteralOperatorName( + GetIdentifierInfo(Record, Idx)); + case DeclarationName::CXXUsingDirective: return DeclarationName::getUsingDirectiveName(); } diff --git a/clang/lib/Frontend/PCHWriter.cpp b/clang/lib/Frontend/PCHWriter.cpp index f919148a774..e79f9c9dac1 100644 --- a/clang/lib/Frontend/PCHWriter.cpp +++ b/clang/lib/Frontend/PCHWriter.cpp @@ -2284,6 +2284,10 @@ void PCHWriter::AddDeclarationName(DeclarationName Name, RecordData &Record) { Record.push_back(Name.getCXXOverloadedOperator()); break; + case DeclarationName::CXXLiteralOperatorName: + AddIdentifierRef(Name.getCXXLiteralIdentifier(), Record); + break; + case DeclarationName::CXXUsingDirective: // No extra data to emit break; -- cgit v1.2.3