https://bugs.llvm.org/show_bug.cgi?id=49700
Bug ID: 49700
Summary: Function emitted only with -g, not emitted without
Product: clang
Version: trunk
Hardware: PC
OS: Windows NT
Status: NEW
Severity: enhancement
Priority: P
Component: -New Bugs
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected],
[email protected], [email protected]
Derived from bug 49691.
With this example b() is emitted with -g enabled and not emitted without.
$ clang++ --version
clang version 13.0.0 (75e8f225e9f2fd3758ed1c8e32bf2a70f584a8e5)
...
$ cat re.cpp
template <bool()> class a {};
static bool b() { return false;}
struct B {
B();
a<b> c;
};
B::B() {}
$ cat test.sh
#!/bin/bash -e
SOURCE=${1:-re.cpp}
CXX=~/git/llvm-project/stage1/bin/clang++
${CXX} -c ${SOURCE} -o dbg.o -g
objdump -t dbg.o | grep "\.text" > dbg.od
${CXX} -c ${SOURCE} -o rel.o
objdump -t rel.o | grep "\.text" > rel.od
! diff dbg.od rel.od
$ ./test.sh
2d1
< 0000000000000010 l F .text 000000000000000d _ZL1bv
--
You are receiving this mail because:
You are on the CC list for the bug._______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs