CodegenNameGenerator.cpp 1.1 KB

123456789101112131415161718192021222324252627282930313233343536
  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. #include "clang/Index/CodegenNameGenerator.h"
  13. #include "clang/AST/ASTContext.h"
  14. using namespace clang;
  15. using namespace clang::index;
  16. CodegenNameGenerator::CodegenNameGenerator(ASTContext &Ctx)
  17. : Impl(new ASTNameGenerator(Ctx)) {
  18. }
  19. CodegenNameGenerator::~CodegenNameGenerator() {
  20. }
  21. bool CodegenNameGenerator::writeName(const Decl *D, raw_ostream &OS) {
  22. return Impl->writeName(D, OS);
  23. }
  24. std::string CodegenNameGenerator::getName(const Decl *D) {
  25. return Impl->getName(D);
  26. }
  27. std::vector<std::string> CodegenNameGenerator::getAllManglings(const Decl *D) {
  28. return Impl->getAllManglings(D);
  29. }