clang  10.0.0svn
CodegenNameGenerator.cpp
Go to the documentation of this file.
1 //===- CodegenNameGenerator.cpp - Codegen name generation -----------------===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // Determines the name that the symbol will get for code generation.
10 //
11 //===----------------------------------------------------------------------===//
12 
14 #include "clang/AST/ASTContext.h"
15 
16 using namespace clang;
17 using namespace clang::index;
18 
20  : Impl(new ASTNameGenerator(Ctx)) {
21 }
22 
24 }
25 
26 bool CodegenNameGenerator::writeName(const Decl *D, raw_ostream &OS) {
27  return Impl->writeName(D, OS);
28 }
29 
30 std::string CodegenNameGenerator::getName(const Decl *D) {
31  return Impl->getName(D);
32 }
33 
34 std::vector<std::string> CodegenNameGenerator::getAllManglings(const Decl *D) {
35  return Impl->getAllManglings(D);
36 }
Defines the clang::ASTContext interface.
Decl - This represents one declaration (or definition), e.g.
Definition: DeclBase.h:88
Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...
Definition: ASTContext.h:154
std::vector< std::string > getAllManglings(const Decl *D)
This can return multiple mangled names when applicable, e.g.
bool writeName(const Decl *D, raw_ostream &OS)
std::string getName(const Decl *D)
Version of writeName function that returns a string.
Dataflow Directional Tag Classes.