From 7b15669aaa3599d987e7f07d715ada4316658398 Mon Sep 17 00:00:00 2001 From: Alexander Penev Date: Wed, 31 Jul 2024 06:49:00 +0000 Subject: [PATCH] Fix demangle build --- lib/Interpreter/CppInterOp.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/Interpreter/CppInterOp.cpp b/lib/Interpreter/CppInterOp.cpp index 6b835246..58278660 100644 --- a/lib/Interpreter/CppInterOp.cpp +++ b/lib/Interpreter/CppInterOp.cpp @@ -3372,8 +3372,8 @@ namespace Cpp { if (!is_demangle_active) { auto& I = getInterp(); llvm::orc::LLJIT& EE = *compat::getExecutionEngine(I); - auto t = EE.getTargetMachine().getTargetTriple(); - demangle = t.isOSDarwin() || t.isWindows(); + auto t = EE.getTargetTriple(); + demangle = t.isOSDarwin() || t.isOSWindows(); is_demangle_active = true; } @@ -3383,7 +3383,6 @@ namespace Cpp { // FIXME: get this information from the DataLayout via getGlobalPrefix()! if (demangle && nameForDlsym[0] == '_') nameForDlsym.erase(0, 1); - } return nameForDlsym; }