[llvm-bugs] [Bug 28149] New: Debug information for type is lost with LTO at -O0
via llvm-bugs
llvm-bugs at lists.llvm.org
Wed Jun 15 15:12:35 PDT 2016
https://llvm.org/bugs/show_bug.cgi?id=28149
Bug ID: 28149
Summary: Debug information for type is lost with LTO at -O0
Product: libraries
Version: trunk
Hardware: PC
OS: Windows NT
Status: NEW
Severity: normal
Priority: P
Component: Common Code Generator Code
Assignee: unassignedbugs at nondot.org
Reporter: Wolfgang_Pieb at playstation.sony.com
CC: llvm-bugs at lists.llvm.org
Classification: Unclassified
// After r267296 the following simple example fails to retain debug
// information for the type 'MyStruct' in the final executable when
// built with LTO. Building with -O2 behaves as expected.
// To build (on native Linux):
// clang -std=c++11 -O0 -g -flto -c test.cpp
// clang -flto -o test test.o
// 'llvm-dwarfdump test' shows no information for 'MyStruct'
__attribute__((noinline)) void use(int, int) { }
struct MyStruct {
int w;
int x;
int y;
int z;
int foo();
int bar();
};
int MyStruct::foo() {
return 3;
}
int main() {
MyStruct str{1, 2, 3, 4};
use(str.x, str.y);
return 0;
}
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20160615/1cfb523e/attachment.html>
More information about the llvm-bugs
mailing list