<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/clang/test/CodeGen/debug-info-enum.cpp, branch users/nico/python-2</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/'/>
<entry>
<title>DebugInfo: Use clang's preferred names for integer types</title>
<updated>2021-10-06T23:02:34+00:00</updated>
<author>
<name>David Blaikie</name>
<email>dblaikie@gmail.com</email>
</author>
<published>2021-09-24T23:13:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=f6a561c4d6754b13165a49990e8365d819f64c86'/>
<id>f6a561c4d6754b13165a49990e8365d819f64c86</id>
<content type='text'>
This reverts c7f16ab3e3f27d944db72908c9c1b1b7366f5515 / r109694 - which
suggested this was done to improve consistency with the gdb test suite.
Possible that at the time GCC did not canonicalize integer types, and so
matching types was important for cross-compiler validity, or that it was
only a case of over-constrained test cases that printed out/tested the
exact names of integer types.

In any case neither issue seems to exist today based on my limited
testing - both gdb and lldb canonicalize integer types (in a way that
happens to match Clang's preferred naming, incidentally) and so never
print the original text name produced in the DWARF by GCC or Clang.

This canonicalization appears to be in `integer_types_same_name_p` for
GDB and in `TypeSystemClang::GetBasicTypeEnumeration` for lldb.

(I tested this with one translation unit defining 3 variables - `long`,
`long (*)()`, and `int (*)()`, and another translation unit that had
main, and a function that took `long (*)()` as a parameter - then
compiled them with mismatched compilers (either GCC+Clang, or
Clang+(Clang with this patch applied)) and no matter the combination,
despite the debug info for one CU naming the type "long int" and the
other naming it "long", both debuggers printed out the name as "long"
and were able to correctly perform overload resolution and pass the
`long int (*)()` variable to the `long (*)()` function parameter)

Did find one hiccup, identified by the lldb test suite - that CodeView
was relying on these names to map them to builtin types in that format.
So added some handling for that in LLVM. (these could be split out into
separate patches, but seems small enough to not warrant it - will do
that if there ends up needing any reverti/revisiting)

Differential Revision: https://reviews.llvm.org/D110455
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts c7f16ab3e3f27d944db72908c9c1b1b7366f5515 / r109694 - which
suggested this was done to improve consistency with the gdb test suite.
Possible that at the time GCC did not canonicalize integer types, and so
matching types was important for cross-compiler validity, or that it was
only a case of over-constrained test cases that printed out/tested the
exact names of integer types.

In any case neither issue seems to exist today based on my limited
testing - both gdb and lldb canonicalize integer types (in a way that
happens to match Clang's preferred naming, incidentally) and so never
print the original text name produced in the DWARF by GCC or Clang.

This canonicalization appears to be in `integer_types_same_name_p` for
GDB and in `TypeSystemClang::GetBasicTypeEnumeration` for lldb.

(I tested this with one translation unit defining 3 variables - `long`,
`long (*)()`, and `int (*)()`, and another translation unit that had
main, and a function that took `long (*)()` as a parameter - then
compiled them with mismatched compilers (either GCC+Clang, or
Clang+(Clang with this patch applied)) and no matter the combination,
despite the debug info for one CU naming the type "long int" and the
other naming it "long", both debuggers printed out the name as "long"
and were able to correctly perform overload resolution and pass the
`long int (*)()` variable to the `long (*)()` function parameter)

Did find one hiccup, identified by the lldb test suite - that CodeView
was relying on these names to map them to builtin types in that format.
So added some handling for that in LLVM. (these could be split out into
separate patches, but seems small enough to not warrant it - will do
that if there ends up needing any reverti/revisiting)

Differential Revision: https://reviews.llvm.org/D110455
</pre>
</div>
</content>
</entry>
<entry>
<title>Rename DIFlagFixedEnum to DIFlagEnumClass. NFC</title>
<updated>2019-01-08T17:52:29+00:00</updated>
<author>
<name>Paul Robinson</name>
<email>paul.robinson@sony.com</email>
</author>
<published>2019-01-08T17:52:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=7402fd9a35bcfd534dbd339e0ccfcd0fa1642c9d'/>
<id>7402fd9a35bcfd534dbd339e0ccfcd0fa1642c9d</id>
<content type='text'>
llvm-svn: 350641
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
llvm-svn: 350641
</pre>
</div>
</content>
</entry>
<entry>
<title>Re-commit r324490: [DebugInfo] Improvements to representation of enumeration types (PR36168)</title>
<updated>2018-02-12T16:12:52+00:00</updated>
<author>
<name>Momchil Velikov</name>
<email>momchil.velikov@arm.com</email>
</author>
<published>2018-02-12T16:12:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=25f6be53260b80676990d9cb6de8333487f59983'/>
<id>25f6be53260b80676990d9cb6de8333487f59983</id>
<content type='text'>
Differential revision: https://reviews.llvm.org/D42736

llvm-svn: 324900
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Differential revision: https://reviews.llvm.org/D42736

llvm-svn: 324900
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert [DebugInfo] Improvements to representation of enumeration types (PR36168)"</title>
<updated>2018-02-07T19:57:04+00:00</updated>
<author>
<name>Momchil Velikov</name>
<email>momchil.velikov@arm.com</email>
</author>
<published>2018-02-07T19:57:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=cd0ac251240ba430459cc2bbdf989bdaa6af8cd9'/>
<id>cd0ac251240ba430459cc2bbdf989bdaa6af8cd9</id>
<content type='text'>
Revert due to breaking buildbots (LLDB tests)

llvm-svn: 324508
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Revert due to breaking buildbots (LLDB tests)

llvm-svn: 324508
</pre>
</div>
</content>
</entry>
<entry>
<title>[DebugInfo] Improvements to representation of enumeration types (PR36168)</title>
<updated>2018-02-07T16:52:02+00:00</updated>
<author>
<name>Momchil Velikov</name>
<email>momchil.velikov@arm.com</email>
</author>
<published>2018-02-07T16:52:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=d7e17c232fb7ee57e5fbbe073b351d65560823cc'/>
<id>d7e17c232fb7ee57e5fbbe073b351d65560823cc</id>
<content type='text'>
This patch:

* fixes an incorrect sign-extension of unsigned values, when emitting
  debug info metadata for enumerators
* the enumerators metadata is created with a flag, which determines
  interpretation of the value bits (signed or unsigned)
* the enumerations metadata contains the underlying integer type and a
  flag, indicating whether this is a C++ "fixed enum"

Differential Revision: https://reviews.llvm.org/D42736

llvm-svn: 324490
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch:

* fixes an incorrect sign-extension of unsigned values, when emitting
  debug info metadata for enumerators
* the enumerators metadata is created with a flag, which determines
  interpretation of the value bits (signed or unsigned)
* the enumerations metadata contains the underlying integer type and a
  flag, indicating whether this is a C++ "fixed enum"

Differential Revision: https://reviews.llvm.org/D42736

llvm-svn: 324490
</pre>
</div>
</content>
</entry>
</feed>
