clang
9.0.0
include
clang
Index
CodegenNameGenerator.h
Go to the documentation of this file.
1
//===- CodegenNameGenerator.h - 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
#ifndef LLVM_CLANG_INDEX_CODEGENNAMEGENERATOR_H
14
#define LLVM_CLANG_INDEX_CODEGENNAMEGENERATOR_H
15
16
#include "
clang/AST/Mangle.h
"
17
#include "
clang/Basic/LLVM.h
"
18
#include <memory>
19
#include <string>
20
#include <vector>
21
22
namespace
clang
{
23
class
ASTContext;
24
class
Decl
;
25
26
namespace
index {
27
28
class
CodegenNameGenerator
{
29
public
:
30
explicit
CodegenNameGenerator
(
ASTContext
&Ctx);
31
~CodegenNameGenerator
();
32
33
/// \returns true on failure to produce a name for the given decl, false on
34
/// success.
35
bool
writeName
(
const
Decl
*D, raw_ostream &OS);
36
37
/// Version of \c writeName function that returns a string.
38
std::string
getName
(
const
Decl
*D);
39
40
/// This can return multiple mangled names when applicable, e.g. for C++
41
/// constructors/destructors.
42
std::vector<std::string>
getAllManglings
(
const
Decl
*D);
43
44
private
:
45
struct
Implementation;
46
std::unique_ptr<ASTNameGenerator> Impl;
47
};
48
49
}
// namespace index
50
}
// namespace clang
51
52
#endif // LLVM_CLANG_INDEX_CODEGENNAMEGENERATOR_H
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::CodeGen::AlignmentSource::Decl
The l-value was an access to a declared entity or something equivalently strong, like the address of ...
clang::ASTContext
Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...
Definition:
ASTContext.h:154
LLVM.h
Forward-declares and imports various common LLVM datatypes that clang wants to use unqualified...
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
Mangle.h
clang::index::CodegenNameGenerator
Definition:
CodegenNameGenerator.h:28
clang::index::CodegenNameGenerator::getName
std::string getName(const Decl *D)
Version of writeName function that returns a string.
Definition:
CodegenNameGenerator.cpp:30
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:16 for clang by
1.8.13