Giter VIP home page Giter VIP logo

Comments (12)

jicama avatar jicama commented on July 20, 2024

from cxx-abi.

rjmccall avatar rjmccall commented on July 20, 2024

The current vendor-extended type qualifier for address spaces makes the literal address space part of the <source-name>, e.g. U4AS16. I believe that predated proper support for parameterized qualifiers; if we were doing it now, it would probably be U2ASILi16EE, and that's probably the right pattern to use here.

from cxx-abi.

rjmccall avatar rjmccall commented on July 20, 2024

That is, this should just be "U2ASI" <expression> "E".

We should probably document the mangling of the address_space qualifier, since it doesn't follow the standard rule of using the qualifier's source spelling.

from cxx-abi.

agozillon avatar agozillon commented on July 20, 2024

If I am following this correctly then would the mangling function change to the following:

void CXXNameMangler::mangleType(const DependentExtAddressSpaceType *T) {
Out << "U2ASI";
mangleExpression(T->getAddrSpaceExpr());
Out << 'E';
}

from cxx-abi.

rjmccall avatar rjmccall commented on July 20, 2024

Yes, except you need to respect the correct ordering of qualifiers, and you may need to worry about qualifier nesting, i.e. whether you have Const(DependentExtAddressSpace(int)) vs. DependentExtAddressSpace(Const(int)). Please take further discussion of that back to the Clang development lists, however.

from cxx-abi.

rjmccall avatar rjmccall commented on July 20, 2024

@jicama How does GCC mangle address_space? I don't seem to have a copy of GCC for a port that supports a non-generic address space.

from cxx-abi.

jicama avatar jicama commented on July 20, 2024

from cxx-abi.

thiagomacieira avatar thiagomacieira commented on July 20, 2024

FWIW, that's https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69549.

from cxx-abi.

rjmccall avatar rjmccall commented on July 20, 2024

Okay. Do you have any objection to adopting our mangling if you ever decide to implement them? If not, I'll prepare a PR for that.

from cxx-abi.

jicama avatar jicama commented on July 20, 2024

from cxx-abi.

rjmccall avatar rjmccall commented on July 20, 2024

I've submitted a pull request (#29) documenting the address_space mangling.

from cxx-abi.

rjmccall avatar rjmccall commented on July 20, 2024

Merged that PR, which I believe finishes this issue.

from cxx-abi.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.