From 4fb0805c6525b13e50067b9ddfe8677a0b7b2d7c Mon Sep 17 00:00:00 2001 From: Vassil Vassilev Date: Mon, 30 Aug 2021 16:31:54 +0000 Subject: [clang-repl] Allow Interpreter::getSymbolAddress to take a mangled name. --- clang/lib/CodeGen/ModuleBuilder.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'clang/lib/CodeGen/ModuleBuilder.cpp') diff --git a/clang/lib/CodeGen/ModuleBuilder.cpp b/clang/lib/CodeGen/ModuleBuilder.cpp index b63f756..f6642a7 100644 --- a/clang/lib/CodeGen/ModuleBuilder.cpp +++ b/clang/lib/CodeGen/ModuleBuilder.cpp @@ -122,6 +122,10 @@ namespace { return D; } + llvm::StringRef GetMangledName(GlobalDecl GD) { + return Builder->getMangledName(GD); + } + llvm::Constant *GetAddrOfGlobal(GlobalDecl global, bool isForDefinition) { return Builder->GetAddrOfGlobal(global, ForDefinition_t(isForDefinition)); } @@ -325,6 +329,10 @@ const Decl *CodeGenerator::GetDeclForMangledName(llvm::StringRef name) { return static_cast(this)->GetDeclForMangledName(name); } +llvm::StringRef CodeGenerator::GetMangledName(GlobalDecl GD) { + return static_cast(this)->GetMangledName(GD); +} + llvm::Constant *CodeGenerator::GetAddrOfGlobal(GlobalDecl global, bool isForDefinition) { return static_cast(this) -- cgit v1.1