[all-commits] [llvm/llvm-project] ffb3fd: Partially revert '[MachO] Update embedded part of ...

Raphael Isemann via All-commits all-commits at lists.llvm.org
Fri Nov 20 04:32:08 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: ffb3fd8f1846de97d10cfca249567eb282cec980
      https://github.com/llvm/llvm-project/commit/ffb3fd8f1846de97d10cfca249567eb282cec980
  Author: Raphael Isemann <teemperor at gmail.com>
  Date:   2020-11-20 (Fri, 20 Nov 2020)

  Changed paths:
    M lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp

  Log Message:
  -----------
  Partially revert '[MachO] Update embedded part of ObjectFileMachO for Mangled API change'

Commit f3aa9e36d91b7b0f4f24f7a3b13cf80c11356e5e fixed the embedded OS
build by removing all passed args for `GetName`/`GetDemangledName`. The motivation
for this was that these arguments were apparently removed in
commit 22b044877d239c40c9a932d1ea47d489c507000f. However, only `GetName`'s language
argument was removed but the mangling preference argument was *not* removed
(and unfortunately had a default argument). So when that commit removed all
the args it didn't just fix the build but it also changed all the mangling
preferences to 'demangled' for all `GetName` calls.

Also some `GetName` calls were outside the TARGET_OS_EMBEDDED ifdef, so
this change ended up breaking the following tests on macOS:

  lldb-api :: lang/objc/objc-static-method-stripped/TestObjCStaticMethodStripped.py
  lldb-api :: lang/objc/objc-super/TestObjCSuper.py

>From what I can see f3aa9e36d91b7 removed 12 ePreferMangled args and this patch
re-adds 12 args with roughly the same line numbers, so this *should* restore the
old behaviour and also keep the embedded build working. On the other hand,
ObjectFileMachO::ParseSymtab is a very successful attempt at writing
the longest possible function within LLVM, so this fix is partly based
on the engineering principle known as "hoping for the best".




More information about the All-commits mailing list