From b522d1fe24424eac01f13a99b359c0e87738c77e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20M=20G=C3=B3mez?= Date: Sun, 3 Mar 2024 16:37:29 +0000 Subject: [PATCH] Dont mangle when targeting cpp (#23335) Unfortunately we cant trick the debugger when targeting C++ so this one also needs to wait for our own debugger adapter. (cherry picked from commit 90fe1b340f93622f5f101ee93306b386a30eb206) --- compiler/ccgtypes.nim | 2 +- tests/codegen/titaniummangle.nim | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/compiler/ccgtypes.nim b/compiler/ccgtypes.nim index 1b8cec4140..4dc0e3ab71 100644 --- a/compiler/ccgtypes.nim +++ b/compiler/ccgtypes.nim @@ -70,7 +70,7 @@ proc mangleProc(m: BModule; s: PSym; makeUnique: bool): string = proc fillBackendName(m: BModule; s: PSym) = if s.loc.r == "": var result: Rope - if s.kind in routineKinds and optCDebug in m.g.config.globalOptions and + if not m.compileToCpp and s.kind in routineKinds and optCDebug in m.g.config.globalOptions and m.g.config.symbolFiles == disabledSf: result = mangleProc(m, s, false).rope else: diff --git a/tests/codegen/titaniummangle.nim b/tests/codegen/titaniummangle.nim index cb282fbf6c..e04c3dc7ff 100644 --- a/tests/codegen/titaniummangle.nim +++ b/tests/codegen/titaniummangle.nim @@ -1,5 +1,5 @@ discard """ - targets: "c cpp" + targets: "c" matrix: "--debugger:native" ccodecheck: "'_ZN14titaniummangle8testFuncE'" ccodecheck: "'_ZN14titaniummangle8testFuncE6stringN14titaniummangle3FooE'"