similar to: [LLVMdev] How to get the original function name in C++?

Displaying 20 results from an estimated 10000 matches similar to: "[LLVMdev] How to get the original function name in C++?"

2014 Dec 11
2
[LLVMdev] How to get the original function name in C++?
If you want to get the original name by a library function, as Jonathan mentioned, you can call __cxa_demangle in cxxabi.h. However, this API is only available in gcc. If you want something more portable, try glog or libibert, notice libibert is GPL licensed. On Thu, Dec 11, 2014 at 7:57 AM, Roel Jordans <r.jordans at tue.nl> wrote: > When a C++ compiler translates source code it will
2015 Mar 02
2
[LLVMdev] clang change function name
On Mon, Mar 02, 2015 at 12:12:34AM -0500, John Criswell wrote: > On 3/2/15 12:07 AM, Haopeng Liu wrote: > >Got it, thanks. But in my pass, I use function name to locate. Can I > >disable mangling in clang? > > No, but you can probably fine a library that can either mangle the original > name or demangle the name you're seeing in the LLVM bitcode. > > As an FYI,
2015 Mar 02
2
[LLVMdev] clang change function name
Got it, thanks. But in my pass, I use function name to locate. Can I disable mangling in clang? Best, Haopeng On 3/1/15 10:44 PM, John Criswell wrote: > On 3/1/15 11:38 PM, Haopeng Liu wrote: >> Hi, >> >> I compile a .cpp with cmd: >> clang++ -emit-llvm -c -g -O0 -w pbzip2.cpp -o pbzip2.bc -lbz2 >> llvm-dis pbzip2.bc >> >> One function in .cpp is
2014 Jun 11
3
[LLVMdev] How do clang & clang++ choose function names for LLVM IR?
Hello all, I'm getting started on a project using LLVM's opt tool to do static analysis, printing call graphs and such. When compiling C programs to IR (and eventually to call graphs), function names remain the same (main, function1, function2 etc.), but when compiling the same program as C++, the function names often have cruft added to them (_Z9function1v, _Z9function2v etc.) which
2010 Aug 27
5
[LLVMdev] How to demange C++ names
Hi Renato, > > Just wondering if LLVM has any command options or tool to allow for > > demangling C++ names from the LLVM bitcode? > > c++filt? Do you refer to any particular version of c++filt? I tried, but seemed not to work. For example, when I run a command as below: c++filt _ZNSt4listIiSaIiEEaSERKS1_ The output remains the same as the input symbol. By the way,
2010 Aug 27
3
[LLVMdev] How to demange C++ names
Hey all, Just wondering if LLVM has any command options or tool to allow for demangling C++ names from the LLVM bitcode? Thanks! Best, Xiaolong
2011 Feb 15
3
[LLVMdev] C++ Mangled Names
I have encountered a need for manually generating the mangled name of an arbitrary C++ function. The only way I currently know how to do this is to generate a dummy C++ source file, compile it, and look at the output. This approach is so ugly that I would like for it never to see the light of day. The c++filt tool generates demangled C++ names given the mangled ones, which is the opposite
2010 Aug 27
0
[LLVMdev] How to demange C++ names
On 27 August 2010 18:56, Xiaolong Tang <xiaolong.snake at gmail.com> wrote: > Just wondering if LLVM has any command options or tool to allow for > demangling C++ names from the LLVM bitcode? c++filt? --renato
2009 Sep 02
4
[LLVMdev] link-error: different visibilities
When I use llvm-2.5 to compile gnash which is a GNU flash movie player, some errors appeared as follow: llvm-ld: error: Cannot link in module '../libcore/.libs/libgnashcore.a(movie_root.o)': Linking globals named '_ZNKSt6vectorIN5gnash8geometry7Range2dIfEESaIS3_EE4sizeEv': symbols have different visibilities! Because the name is mangled, I can't find the exact position of
2010 Aug 27
0
[LLVMdev] How to demange C++ names
On Aug 27, 2010, at 11:43 AM, Xiaolong Tang wrote: > Hi Renato, > >>> Just wondering if LLVM has any command options or tool to allow for >>> demangling C++ names from the LLVM bitcode? >> >> c++filt? > > Do you refer to any particular version of c++filt? I tried, but seemed > not to work. For example, when I run a command as below: > >
2011 Jul 08
0
[LLVMdev] How to get line number of a function in a bitcode file?
Hi Chen, On Jul 8, 2011, at 11:56 AM, kobe James wrote: > Hi All, > > I hope to get some information about functions in a bitcode file. Say, if we have a function foo(), and the bitcode file is generated by a single source file, then I want to get the line number foo() locates in that source file. > If the bitcode file is linked by multiple bitcode files, is it possible to also get
2011 Feb 15
0
[LLVMdev] C++ Mangled Names
On Feb 15, 2011, at 3:10 AM, Patrick Simmons wrote: > I have encountered a need for manually generating the mangled name of an > arbitrary C++ function. The only way I currently know how to do this is > to generate a dummy C++ source file, compile it, and look at the > output. This approach is so ugly that I would like for it never to see > the light of day. The c++filt tool
2012 Mar 06
2
Calling FORTRAN function from R issue?
Hello, I am trying to call the BLAS Level1 function zdotc from R via a .C call like this: #include "R.h" #include "R_ext/BLAS.h" void testzdotc() { Rcomplex zx[3], zy[3], ret_val; zx[0].r = 1.0; zx[0].i = 0.0; zx[1].r = 2.0; zx[0].i = 0.0; zx[2].r = 3.0; zx[0].i = 0.0; zy[0].r = 1.0; zy[0].i = 0.0; zy[1].r = 2.0; zy[0].i = 0.0; zy[2].r = 3.0;
2010 Feb 04
2
[LLVMdev] Decoding munged function names
Hi folks, I'm currently extending my model checker to collect coverage information, and as part of this I'm finding a need to get a more friendly version of munged C++ identifiers than the name used by the linker. For example, though internally, something like '_Z7thread1Pv' is fine as an identifier, I'd like to be able to give the user something more readable. Since
2017 Jun 19
3
VC C++ demangler
A long time ago, when I devised the grammar and structure of the Microsoft C++ name mangling scheme (decorated names), the document describing the object model and the name decoration scheme were made publically available. Perhaps this is still available publically, or perhaps Microsoft might be willing to share an up to date definition of the name-decoration grammar, especially in light of the
2013 Sep 24
1
files on bricks but not on client
Hi all - We're running a 3-node distributed volume, using gluster 3.3.1. We're seeing a rare but repeated issue, where files are written to the volume, appears to be written OK, but are not accessible via NFS or the gluster client. These files appear when we inspect the bricks directly. For example, the path in question is
2012 Nov 06
10
[LLVMdev] Binutils and LLVM - gathering information
Binutils and LLVM As part of "owning our own toolchain", various people have expressed an interest and have been working on creating various tools that duplicate the functionality of tools available on other systems. As a start, I'd like to summarize the current status, and ask people for help updating the list. List taken from <http://www.gnu.org/software/binutils/>
2012 Nov 06
0
[LLVMdev] Binutils and LLVM - gathering information
On Tue, Nov 6, 2012 at 2:19 PM, Marshall Clow <mclow.lists at gmail.com> wrote: > Binutils and LLVM > > As part of "owning our own toolchain", various people have expressed an interest and have been working on creating various tools that duplicate the functionality of tools available on other systems. > > As a start, I'd like to summarize the current status, and
2013 May 11
3
[LLVMdev] LLVM ERROR: Cannot select
Duncan, here is part of the assembly around the problem area. I used gcc -S -flto to generate the .s file, llvm-as on the .s fiile will show error: invalid cast opcode for cast from 'i40' to 'float' %638 = trunc i40 %637 to float %633 = bitcast i8* %632 to float* %634 = bitcast float* %633 to i40* %635 = load i40* %634, align 1 %636 = shl i40 %635, 7 %637 = ashr i40
2009 Jun 17
8
[LLVMdev] Why are functions renamed for .cpp files with llvm-gcc?
Hello, I wonder why there is a difference in how llvm-gcc compiles .c and .cpp files. Example: ---bar.cpp---- int bar() { return 42; } -------------- $ llvm-gcc -emit-llvm -c bar.cpp Now running bar.o through llvm-dis gives: -------------------------------- define i32 @_Z3barv() nounwind { < clip > } -------------------------------- Above, function 'bar' has been renamed