[PATCH] D42242: Make libc++abi work with gcc's ARM unwind library

2018-10-10 Thread Benjamin Buch via Phabricator via cfe-commits
bebuch accepted this revision.
bebuch added a comment.
This revision is now accepted and ready to land.

Okay, sorry for the blockage!


https://reviews.llvm.org/D42242



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D42242: Make libc++abi work with gcc's ARM unwind library

2018-01-24 Thread Benjamin Buch via Phabricator via cfe-commits
bebuch requested changes to this revision.
bebuch added a comment.
This revision now requires changes to proceed.

I get some new errors:

  /home/pi/projects/llvm/llvm/projects/libcxxabi/src/cxa_personality.cpp: In 
function ‘void __cxxabiv1::scan_eh_tab(__cxxabiv1::{anonymous}::scan_results&, 
_Unwind_Action, bool, _Unwind_Control_Block*, _Unwind_Context*)’:
  
/home/pi/projects/llvm/llvm/projects/libcxxabi/src/cxa_personality.cpp:564:22: 
error: ‘_URC_FATAL_PHASE1_ERROR’ was not declared in this scope
   results.reason = _URC_FATAL_PHASE1_ERROR;
^
  
/home/pi/projects/llvm/llvm/projects/libcxxabi/src/cxa_personality.cpp:584:30: 
error: ‘_URC_FATAL_PHASE2_ERROR’ was not declared in this scope
   results.reason = _URC_FATAL_PHASE2_ERROR;
^
  /home/pi/projects/llvm/llvm/projects/libcxxabi/src/cxa_personality.cpp: In 
function ‘_Unwind_Reason_Code __cxxabiv1::__gxx_personality_v0(_Unwind_State, 
_Unwind_Control_Block*, _Unwind_Context*)’:
  
/home/pi/projects/llvm/llvm/projects/libcxxabi/src/cxa_personality.cpp:1074:16: 
error: ‘_URC_FATAL_PHASE1_ERROR’ was not declared in this scope
   return _URC_FATAL_PHASE1_ERROR;
  ^
  
/home/pi/projects/llvm/llvm/projects/libcxxabi/src/cxa_personality.cpp:1087:11: 
error: invalid conversion from ‘int’ to ‘_Unwind_State’ [-fpermissive]
   state &= ~_US_FORCE_UNWIND;
 ^
  
/home/pi/projects/llvm/llvm/projects/libcxxabi/src/cxa_personality.cpp:1090:12: 
warning: enumeration value ‘_US_ACTION_MASK’ not handled in switch [-Wswitch]
   switch (state) {
  ^
  
/home/pi/projects/llvm/llvm/projects/libcxxabi/src/cxa_personality.cpp:1090:12: 
warning: enumeration value ‘_US_FORCE_UNWIND’ not handled in switch [-Wswitch]
  
/home/pi/projects/llvm/llvm/projects/libcxxabi/src/cxa_personality.cpp:1090:12: 
warning: enumeration value ‘_US_END_OF_STACK’ not handled in switch [-Wswitch]
  
/home/pi/projects/llvm/llvm/projects/libcxxabi/src/cxa_personality.cpp:1167:12: 
error: ‘_URC_FATAL_PHASE1_ERROR’ was not declared in this scope
   return _URC_FATAL_PHASE1_ERROR;
  ^
  
/home/pi/projects/llvm/llvm/projects/libcxxabi/src/cxa_personality.cpp:1168:1: 
error: control reaches end of non-void function [-Werror=return-type]
   }
   ^

`_URC_FATAL_PHASE1_ERROR` and `_URC_FATAL_PHASE2_ERROR` should be `enum` values 
of `_Unwind_Reason_Code`, but this is defined in `unwind-arm-common.h` as:

  typedef enum
{
  _URC_OK = 0,   /* operation completed successfully */
  _URC_FOREIGN_EXCEPTION_CAUGHT = 1,
  _URC_END_OF_STACK = 5,
  _URC_HANDLER_FOUND = 6,
  _URC_INSTALL_CONTEXT = 7,
  _URC_CONTINUE_UNWIND = 8,
  _URC_FAILURE = 9   /* unspecified failure of some kind */
}
  _Unwind_Reason_Code;

In other unwind libraries these values are defined: 
https://github.com/llvm-mirror/libunwind/blob/master/include/unwind.h
In the arm version it isn't: 
https://github.com/gcc-mirror/gcc/blob/gcc-4_9-branch/gcc/ginclude/unwind-arm-common.h


https://reviews.llvm.org/D42242



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D42242: Make libc++abi work with gcc's ARM unwind library

2018-01-22 Thread Benjamin Buch via Phabricator via cfe-commits
bebuch added a comment.

Thanks for the amazing patch!

I get another error:

  /home/pi/projects/llvm/llvm/projects/libcxxabi/src/cxa_default_handlers.cpp: 
In function ‘void demangling_terminate_handler()’:
  
/home/pi/projects/llvm/llvm/projects/libcxxabi/src/cxa_default_handlers.cpp:41:58:
 error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   unwind_exception->exception_class == 
kOurDependentExceptionClass ?
^

The comparison is still between uint8_t[8] and uint64_t. Please add a fix for 
this, then I will test again. :-)

BTW: Is the memcpy a better choice than a reinterpret_cast?


https://reviews.llvm.org/D42242



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D38831: [libcxx] P0604, invoke_result and is_invocable

2017-12-12 Thread Benjamin Buch via Phabricator via cfe-commits
bebuch accepted this revision.
bebuch added a comment.

Please commit!


https://reviews.llvm.org/D38831



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D34096: [Sema][C++1z] Ensure structured binding's bindings in dependent foreach have non-null type

2017-06-16 Thread Benjamin Buch via Phabricator via cfe-commits
bebuch reopened this revision.
bebuch added a comment.
This revision is now accepted and ready to land.

I believe this patch is incomplete, I get a very odd warning:

  struct A{
  int x;
  };
  
  template < typename >
  struct B{
  A data_[1];
  
  void f(){
  for(auto [x]: data_){
  (void)x;
  }
  }
  };
  
  int main(){
B< int > v;
v.f();
  }



  $ clang++ -std=c++1z -Wall clang_fail.cpp 

   
  clang_fail.cpp:10:18: warning: unused variable '' [-Wunused-variable] 



  for(auto [x]: data_){ 



   ^



  clang_fail.cpp:18:4: note: in instantiation of member function 'B::f' 
requested here  

   
  v.f();



^   



  1 warning generated.

unused variable ''? An unnamed variable, that's odd ;-)

Nevertheless, thanks for what is already done! Great that I can use structured 
bindings without fear to crash now! :-)


Repository:
  rL LLVM

https://reviews.llvm.org/D34096



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits