clang
9.0.0
lib
Index
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
13
#include "
clang/Index/CodegenNameGenerator.h
"
14
#include "
clang/AST/ASTContext.h
"
15
16
using namespace
clang
;
17
using namespace
clang::index
;
18
19
CodegenNameGenerator::CodegenNameGenerator
(
ASTContext
&Ctx)
20
: Impl(new
ASTNameGenerator
(Ctx)) {
21
}
22
23
CodegenNameGenerator::~CodegenNameGenerator
() {
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
}
ASTContext.h
Defines the clang::ASTContext interface.
clang::index::CodegenNameGenerator::CodegenNameGenerator
CodegenNameGenerator(ASTContext &Ctx)
Definition:
CodegenNameGenerator.cpp:19
clang::Decl
Decl - This represents one declaration (or definition), e.g.
Definition:
DeclBase.h:88
clang::ASTContext
Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...
Definition:
ASTContext.h:154
clang::index::CodegenNameGenerator::getAllManglings
std::vector< std::string > getAllManglings(const Decl *D)
This can return multiple mangled names when applicable, e.g.
Definition:
CodegenNameGenerator.cpp:34
clang::index::CodegenNameGenerator::writeName
bool writeName(const Decl *D, raw_ostream &OS)
Definition:
CodegenNameGenerator.cpp:26
CodegenNameGenerator.h
clang::index
Definition:
CodegenNameGenerator.h:26
clang::index::CodegenNameGenerator::getName
std::string getName(const Decl *D)
Version of writeName function that returns a string.
Definition:
CodegenNameGenerator.cpp:30
clang::ASTNameGenerator
Definition:
Mangle.h:247
clang
Dataflow Directional Tag Classes.
Definition:
CFGReachabilityAnalysis.h:21
clang::index::CodegenNameGenerator::~CodegenNameGenerator
~CodegenNameGenerator()
Definition:
CodegenNameGenerator.cpp:23
Generated on Thu Sep 19 2019 15:18:35 for clang by
1.8.13