[llvm-bugs] [Bug 39630] llvm-undname sometimes drops a "const"

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Nov 12 03:12:31 PST 2018


Nico Weber <nicolasweber at gmx.de> changed:

           What    |Removed                     |Added
             Status|NEW                         |RESOLVED
         Resolution|---                         |WONTFIX

--- Comment #2 from Nico Weber <nicolasweber at gmx.de> ---
I'm willing to believe it's an undname bug :-) The wine implementation of
_unDName has it too fwiw.

I tried finding the test case you mention but failed.

...aha, but here's a from-source repro that shows you're right:

$ cat test.cc
struct S {};

struct T {
  static const S* s_;

  const S* s();
  void set(const S* s);

const S* T::s() { return s_; }
void T::set(const S* s) { s_ = s; }

$ third_party/llvm-build/Release+Asserts/bin/clang-cl /c test.cc /Fa -Xclang
-emit-llvm 2&>1 > /dev/null ; cat test.asm | grep s_
@"?s_ at T@@2PEBUS@@EB" = external dso_local global %struct.S*, align 8
  %0 = load %struct.S*, %struct.S** @"?s_ at T@@2PEBUS@@EB", align 8
  store %struct.S* %0, %struct.S** @"?s_ at T@@2PEBUS@@EB", align 8

$ demumble '?s_ at T@@2PEBUS@@EB'  # currently uses wine _unDName()
public: static struct S const * __ptr64 const __ptr64 T::s_

$ bin/llvm-undname '?s_ at T@@2PEBUS@@EB'
?s_ at T@@2PEBUS@@EB
public: static struct S const *T::s_

You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20181112/c7d16991/attachment.html>

More information about the llvm-bugs mailing list