-
Notifications
You must be signed in to change notification settings - Fork 14.7k
Open
Labels
clang:codegenIR generation bugs: mangling, exceptions, etc.IR generation bugs: mangling, exceptions, etc.debuginfo
Description
test_dwarf.h
#include <stdio.h>
namespace myns
{
struct myclass
{
int b;
myclass() : b(100)
{
class ctornested
{
public:
void foobar()
{
printf("assert %s\n", a);
}
char *a;
} wat;
wat.foobar();
putc(b, stderr);
}
};
} // namespace myns
__attribute__((__visibility__("default"))) extern void fglobal();
test_dwarf.cpp
#include "test_dwarf.h"
void fglobal()
{
myns::myclass{};
}
clang --version
clang version 19.1.7 (RESF 19.1.7-2.module+el8.10.0+1965+112b558b)
Target: aarch64-redhat-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
Configuration file: /etc/clang/aarch64-redhat-linux-gnu-clang.cfg
Compile the program with clang++ -g -O3 -std=c++17 -shared -fPIC -fvisibility=hidden -o libtest_dwarf.so *.cpp
llvm-dwarfdump libtest_dwarf.so rel.txt
Class ctornested
is now nested in a "subprogram" with no other info, where the myns
namespace owns nothing about it, nor myclass
. The local class doesn't have to be in a constructor; it happens to non-special member functions as well.
Metadata
Metadata
Assignees
Labels
clang:codegenIR generation bugs: mangling, exceptions, etc.IR generation bugs: mangling, exceptions, etc.debuginfo