Quuxplusone / LLVMBugzillaTest

0 stars 0 forks source link

The order of function differs with or w/o -g #48660

Open Quuxplusone opened 3 years ago

Quuxplusone commented 3 years ago
Bugzilla Link PR49691
Status NEW
Importance P enhancement
Reported by Zhiwei Chen (condy0919@gmail.com)
Reported on 2021-03-23 01:05:34 -0700
Last modified on 2021-03-23 10:47:13 -0700
Version trunk
Hardware PC All
CC condy0919@gmail.com, dblaikie@gmail.com, htmldeveloper@gmail.com, llvm-bugs@lists.llvm.org, neeilans@live.com, paul_robinson@playstation.sony.com, richard-llvm@metafoo.co.uk
Fixed by commit(s)
Attachments re.cpp (951 bytes, text/plain)
Blocks PR37728
Blocked by
See also
Created attachment 24685
re.cpp

How to produce:

$ clang++ -S -emit-llvm re.cpp -o dbg.ll -g
$ clang++ -S -emit-llvm re.cpp -o rel.ll

Then diff the content of dbgl.ll and rel.ll

Found that the ctor of Re3 (_ZN6extend3re33Re3C2Ev) precedes before the another
funciton in rel.ll file, but the order changes in dbg.ll
Quuxplusone commented 3 years ago

Attached re.cpp (951 bytes, text/plain): re.cpp