Closed cbakgly closed 10 years ago
Description: When generating abc code of libc++, llc prompts error at below line for thread.cpp: %7 = tail call i32 @cxaatexit(void (i8)_ bitcast (void (%"class.std::1::thread_specificptr")_ @_ZNSt3121thread_specific_ptrINS_15__threadstructEED1Ev to void (i8)_), i8* bitcast (%"class.std::1::__thread_specific_ptr"* @_ZZNSt3119thread_local_dataEvE3__p to i8*), i8 0) nounwind
By comparing to the prototype: int __cxa_atexit( void (f)(void ), void p, void d)
It seems the generated code wrongly passes the 3rd argument where it should be a i8*. Meanwhile the gen'ed bitcode targeting x86 is correct.
I haven't found the root cause yet. Looking forward to your solution and contribution. :D
Steps: 1 get the latest codebase 2 make all (two extra libs will fail now.) 3 make libcxx 4 make libcxx.abc
e6b4dfe3594d843266994fda5183fae6dc3332bb
Description: When generating abc code of libc++, llc prompts error at below line for thread.cpp: %7 = tail call i32 @cxaatexit(void (i8)_ bitcast (void (%"class.std::1::thread_specificptr")_ @_ZNSt3121thread_specific_ptrINS_15__threadstructEED1Ev to void (i8)_), i8* bitcast (%"class.std::1::__thread_specific_ptr"* @_ZZNSt3119thread_local_dataEvE3__p to i8*), i8 0) nounwind
By comparing to the prototype: int __cxa_atexit( void (f)(void ), void p, void d)
It seems the generated code wrongly passes the 3rd argument where it should be a i8*. Meanwhile the gen'ed bitcode targeting x86 is correct.
I haven't found the root cause yet. Looking forward to your solution and contribution. :D
Steps: 1 get the latest codebase 2 make all (two extra libs will fail now.) 3 make libcxx 4 make libcxx.abc