<HTML><HEAD><TITLE>Samsung Enterprise Portal mySingle</TITLE>
<META content="text/html; charset=windows-1252" http-equiv=Content-Type>
<STYLE id=mysingle_style type=text/css>P {
        MARGIN-TOP: 5px; FONT-FAMILY: Arial, arial; MARGIN-BOTTOM: 5px; FONT-SIZE: 9pt
}
TD {
        MARGIN-TOP: 5px; FONT-FAMILY: Arial, arial; MARGIN-BOTTOM: 5px; FONT-SIZE: 9pt
}
LI {
        MARGIN-TOP: 5px; FONT-FAMILY: Arial, arial; MARGIN-BOTTOM: 5px; FONT-SIZE: 9pt
}
BODY {
        LINE-HEIGHT: 1.4; MARGIN: 10px; FONT-FAMILY: Arial, arial; FONT-SIZE: 9pt
}
</STYLE>

<META name=GENERATOR content=ActiveSquare></HEAD>
<BODY>
<P>Hi All,<BR><BR>I was looking in to PR14569 [<A href="http://llvm.org/bugs/show_bug.cgi?id=14569">http://llvm.org/bugs/show_bug.cgi?id=14569</A>] and here are my findings.<BR><BR>GDB uses following attributes while printing function names, in order.<BR>     1. Linkage Name, if available, gdb demangles it and use it to print function name.<BR>     2. Name, if available, gdb uses it as it is without demangling it.<BR>     3. GDB tries to generage name of the function with other information available.<BR><BR>In case of clang, for compiler generated functions, [where HasDecl() is false], only Name attribute is being set in debug info.<BR><BR>So to fix bug on clang, we can do following.<BR><BR>1. Do not set both name and linkage_name attributes of just set linkage_name attribute. This makes testcase [gdb.cp/virtfunc.cpp] to pass but causes failures in 2 CodeGenCXX tests [debug-info-global-ctor-dtor.cpp and debug-info-thunk.cpp] which expect name attribute with mangled name of the function. I am also not sure, if other tools also depends on name attributes with mangled anme for compiler generated function.<BR><BR>2. Set both name and linkage_name attributes. This makes testcase [gdb.cp/virtfunc.cpp] to pass and does not have any side effect on existing clang/ llvm tests. But this will increase debug info size. I suggest to enable this fix if Full Debug Info option is enabled.<BR><BR>I have attached patch using second approach. Please let me know if this is fine.<BR><BR>Regards<BR>Dinesh Dwivedi<BR><BR><BR></P></BODY></HTML><img src='http://ext.samsung.net/mailcheck/SeenTimeChecker?do=7f7f42b98def448ef8326422210fb96a283c9beac69b30e36046a0d51bd790586a34984216ac66b0a34d950c0c4aaac5e1f93dc7001c940a07805447a154a46fcf878f9a26ce15a0' border=0 width=0 height=0 style='display:none'>