2016-02-15 06:30:14 +08:00
|
|
|
//===- CodegenNameGenerator.cpp - Codegen name generation -----------------===//
|
|
|
|
//
|
2019-01-19 16:50:56 +08:00
|
|
|
// 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
|
2016-02-15 06:30:14 +08:00
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
//
|
|
|
|
// 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)
|
2019-06-20 04:51:35 +08:00
|
|
|
: Impl(new ASTNameGenerator(Ctx)) {
|
2016-02-15 06:30:14 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
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);
|
|
|
|
}
|