Home
Reading
Searching
Subscribe
Sponsors
Statistics
Posting
Contact
Spam
Lists
Links
About
Hosting
Filtering
Features Download
Marketing
Archives
FAQ
Blog
 
Gmane
From: Shankar Easwaran <shankare <at> codeaurora.org>
Subject: [lld] adding demangler for symbol resolution
Newsgroups: gmane.comp.compilers.llvm.devel
Date: Wednesday 2nd April 2014 04:19:15 UTC (over 3 years ago)
Hi Nick, Bigcheese,

When lld is used to link C++ code, it would be required to demangle 
symbol names by default/user driven option.

The Gnu linker has the following options :-

--demangle=[style]
--no-demangle

I found that clang/llvm-symbolizer use __cxx_demangle function.

I would think that lld also need to call the same function, and I think 
the way we want to demangle is to have the function in LinkingContext as 
various flavors may choose to use different API's to demangle symbol names.

The API's that would be in LinkingContext would be :-

         * virtual bool canDemangle()  = 0; // Does the flavor provide a 
way to demangle symbol names ?
         * virtual std::string demangle(StringRef symbolName) = 0; // 
demangle the symbol name

Thoughts / Suggestions ?

Thanks

Shankar Easwaran

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted
by the Linux Foundation
 
CD: 2ms