You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[lldb] Fix that C++ base name is only calculated when Swift plugin is enabled
In 41c6ab2 I put the C++ GetBasename() call
in Module::LookupInfo behind the LLDB_ENABLE_SWIFT as it appeard to be
introduced by a downstream Swift change. However our downstream change
actually changed
```
basename = cpp_method.GetBasename();
```
into
```
if (swift)
/*swift stuff*/
else if (c++)
basename = cpp_method.GetBasename();
```
By putting both if and the else behind LLDB_ENABLE_SWIFT this actually broke
LLDB's ability to set C++ breakpoints by function name when LLDB_ENABLE_SWIFT
wasn't set (which in turn broke the TestCPPBreakpointLocations test).
This patch moves `#ifdef LLDB_ENABLE_SWIFT` only around the Swift-specific
part and leaves the basename calculation enabled independently of Swift.
I also removed the unnecessary `else` as we can't have a method that has
both a language value of Swift and C++, so those branches are anyway mutually
exlusive and comparing the `language` enum value is cheap.
0 commit comments