diff --git a/lib/Interpreter/Compatibility.h b/lib/Interpreter/Compatibility.h index 3d0155225..539bda951 100644 --- a/lib/Interpreter/Compatibility.h +++ b/lib/Interpreter/Compatibility.h @@ -210,9 +210,7 @@ getSymbolAddress(clang::Interpreter& I, llvm::StringRef IRName) { inline llvm::Expected getSymbolAddress(clang::Interpreter& I, clang::GlobalDecl GD) { - const auto& DL = getExecutionEngine(I)->getDataLayout(); - char GlobalPrefix = DL.getGlobalPrefix(); - std::string MangledName = std::string(1, GlobalPrefix); + std::string MangledName; compat::maybeMangleDeclName(GD, MangledName); return getSymbolAddress(I, llvm::StringRef(MangledName)); }