Files
clang-p2996/clang/lib/Index/CodegenNameGenerator.cpp
Puyan Lotfi 3ff8c3b73f [clang][AST] ASTNameGenerator: A refactoring of CodegenNameGeneratorImpl (NFC).
This is a NFC refactor move of CodegenNameGeneratorImpl from clang::Index to
clang:AST (and rename to ASTNameGenerator). The purpose is to make the
highlevel mangling code more reusable inside of clang (say in places like clang
FrontendAction). This does not affect anything in CodegenNameGenerator, except
that CodegenNameGenerator will now use ASTNameGenerator (in AST).

Differential Revision: https://reviews.llvm.org/D63535

llvm-svn: 363878
2019-06-19 20:51:35 +00:00

37 lines
1.1 KiB
C++

//===- CodegenNameGenerator.cpp - Codegen name generation -----------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
//
// Determines the name that the symbol will get for code generation.
//
//===----------------------------------------------------------------------===//
#include "clang/Index/CodegenNameGenerator.h"
#include "clang/AST/ASTContext.h"
using namespace clang;
using namespace clang::index;
CodegenNameGenerator::CodegenNameGenerator(ASTContext &Ctx)
: Impl(new ASTNameGenerator(Ctx)) {
}
CodegenNameGenerator::~CodegenNameGenerator() {
}
bool CodegenNameGenerator::writeName(const Decl *D, raw_ostream &OS) {
return Impl->writeName(D, OS);
}
std::string CodegenNameGenerator::getName(const Decl *D) {
return Impl->getName(D);
}
std::vector<std::string> CodegenNameGenerator::getAllManglings(const Decl *D) {
return Impl->getAllManglings(D);
}