[PATCH] D28212: typeinfo: provide a partial implementation for Win32

2017-01-02 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd marked an inline comment as done. compnerd added inline comments. Comment at: src/typeinfo.cpp:28-32 + static constexpr const size_t fnv_offset_basis = 14695981039346656037; + static constexpr const size_t fnv_prime = 10995116282110; +#else + static constexpr const si

[PATCH] D28212: typeinfo: provide a partial implementation for Win32

2017-01-02 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd updated this revision to Diff 82815. compnerd added a comment. Add suffixes Repository: rL LLVM https://reviews.llvm.org/D28212 Files: include/typeinfo src/typeinfo.cpp Index: src/typeinfo.cpp === --- src/typeinfo.

[PATCH] D28211: typeinfo: provide a destructor for type_info

2017-01-02 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd abandoned this revision. compnerd added a comment. Thanks! Repository: rL LLVM https://reviews.llvm.org/D28211 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D28210: system_error: inline error_category ctor on Win32

2017-01-02 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd abandoned this revision. compnerd added a comment. WFM, that seems like a nicer option. Repository: rL LLVM https://reviews.llvm.org/D28210 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/lis

[PATCH] D28220: provide Win32 native threading

2017-01-02 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd added a comment. @majnemer Im using the Fls* APIs since they provide the thread termination callback, which Tls* doesn't. Good point about the SRW. Those are newer, but, we can always provide a fallback later. Repository: rL LLVM https://reviews.llvm.org/D28220 ___

[PATCH] D28220: provide Win32 native threading

2017-01-02 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd marked 3 inline comments as done. compnerd added a comment. The SRW initializers avoid the initializer changes, so its one less set of changes that is necessary. Comment at: include/__threading_support:33 #include <__external_threading> +#elif defined(_WIN32) && defi

[PATCH] D28220: provide Win32 native threading

2017-01-02 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd updated this revision to Diff 82826. compnerd added a comment. Use SRW locks, rebase for avoid redeclaration of interfaces, remove static initialization check removals. Repository: rL LLVM https://reviews.llvm.org/D28220 Files: include/__config include/__threading_support Inde

[PATCH] D28220: provide Win32 native threading

2017-01-02 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd added inline comments. Comment at: include/__threading_support:300-305 +int __libcpp_recursive_mutex_init(__libcpp_mutex_t *__m) +{ + InitializeSRWLock(__m); + return 0; +} + majnemer wrote: > I don't think you can use slim rw locks for recursive locks

[PATCH] D28220: provide Win32 native threading

2017-01-02 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd updated this revision to Diff 82834. compnerd added a comment. switch between a CRITICAL_SECTION and SRWLOCK Repository: rL LLVM https://reviews.llvm.org/D28220 Files: include/__config include/__threading_support Index: include/__threading_support ==

[PATCH] D28223: clean up use of _WIN32

2017-01-02 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd created this revision. compnerd added reviewers: EricWF, mclow.lists, smeenai. compnerd added a subscriber: cfe-commits. compnerd set the repository for this revision to rL LLVM. Replace the use of `_WIN32` in libc++. Replace most use with a C runtime check `_LIBCPP_MSVCRT` or the new `

[PATCH] D28220: provide Win32 native threading

2017-01-02 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd updated this revision to Diff 82843. compnerd added a comment. update for separation of mutex and recursive_mutex. Repository: rL LLVM https://reviews.llvm.org/D28220 Files: include/__config include/__threading_support Index: include/__threading_support

[PATCH] D28226: threading_support: introduce __libcpp_recursive_mutex_t

2017-01-02 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd created this revision. compnerd added reviewers: EricWF, mclow.lists. compnerd added subscribers: majnemer, smeenai, kastiglione, cfe-commits. compnerd set the repository for this revision to rL LLVM. Introduce the new `__libcpp_recursive_mutex_t` which differentiates between a recursive

[PATCH] D28226: threading_support: introduce __libcpp_recursive_mutex_t

2017-01-02 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd updated this revision to Diff 82845. compnerd added a comment. add more context Repository: rL LLVM https://reviews.llvm.org/D28226 Files: include/__threading_support include/mutex Index: include/mutex === --- incl

[PATCH] D28220: provide Win32 native threading

2017-01-02 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd updated this revision to Diff 82846. compnerd added a comment. add more context Repository: rL LLVM https://reviews.llvm.org/D28220 Files: include/__config include/__threading_support Index: include/__threading_support ===

[PATCH] D28220: provide Win32 native threading

2017-01-02 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd added inline comments. Comment at: include/__threading_support:46 +inline _LIBCPP_INLINE_VISIBILITY +int __libcpp_recursive_mutex_init(__libcpp_mutex_t *__m); + EricWF wrote: > The forward declarations of the `__libcpp_` threading wrapper should be > sh

[PATCH] D28223: clean up use of _WIN32

2017-01-03 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd added inline comments. Comment at: include/__config:158 +#if defined(_WIN32) +# define _LIBCPP_WIN32 1 # define _LIBCPP_LITTLE_ENDIAN 1 EricWF wrote: > smeenai wrote: > > Perhaps `_LIBCPP_WIN32API` instead, to be clear that this is specific to

[PATCH] D28223: clean up use of _WIN32

2017-01-03 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd added a comment. I figured that using the explicit encoding is nicer since it means that its more documenting. I dont have a problem with `_LIBCPP_SHORT_WCHAR` as that maps quite well to `-fshort-wchar`. Repository: rL LLVM https://reviews.llvm.org/D28223 __

[PATCH] D28223: clean up use of _WIN32

2017-01-03 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd updated this revision to Diff 82912. compnerd added a comment. Update for `_LIBCPP_WIN32API` and addition of `_LIBCPP_OBJECT_FORMAT_COFF`, `_LIBCPP_OBJECT_FORMAT_ELF`, `_LIBCPP_OBJECT_FORMAT_MACHO` Repository: rL LLVM https://reviews.llvm.org/D28223 Files: include/__config incl

[PATCH] D28229: [libcxx] Fix testing of the externally-threaded library build after r290850

2017-01-03 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd added a comment. I dont think that making Win32 threading an external one makes much sense unless we also do the same for pthreads. Its just as valid a threading model as pthreads, so why give preferential treatment to that? (Sure, there are more buildbots using it, but thats not a s

[PATCH] D28226: threading_support: introduce __libcpp_recursive_mutex_t

2017-01-03 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd added a comment. The dynamic behavior only is used for Windows, not pthreads. So, we dont see it here, but it becomes apparent in the windows support. I was trying to minimize the changes to libc++ itself to avoid having it to consider the recursive vs non-recursive cases. If the li

[PATCH] D28212: typeinfo: provide a partial implementation for Win32

2017-01-03 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd commandeered this revision. compnerd edited reviewers, added: EricWF; removed: compnerd. compnerd added a comment. Ill use this version for the commit, but Id like to get an okay on it before I do that :-). https://reviews.llvm.org/D28212

[PATCH] D28223: clean up use of _WIN32

2017-01-03 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd updated this revision to Diff 82927. compnerd added a comment. Switch to `_LIBCPP_SHORT_WCHAR`. Repository: rL LLVM https://reviews.llvm.org/D28223 Files: include/__config include/__locale include/support/win32/support.h include/type_traits src/chrono.cpp src/include/con

[PATCH] D28223: clean up use of _WIN32

2017-01-03 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd added a comment. I think that it will suffice for now. We can change the flag to be more granular in the future. I think that this is going well beyond the original intent of cleaning up the usage of the `_WIN32` macros at this point. Repository: rL LLVM https://reviews.llvm.org/

[PATCH] D28223: clean up use of _WIN32

2017-01-03 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd updated this revision to Diff 82944. compnerd added a comment. fix `__LP64__` usage as pointed out by @smeenai Repository: rL LLVM https://reviews.llvm.org/D28223 Files: include/__config include/__locale include/support/win32/support.h include/type_traits src/chrono.cpp

[PATCH] D28223: clean up use of _WIN32

2017-01-03 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd closed this revision. compnerd added a comment. SVN r290910. I like your idea for an additional BITSCAN macro. I think that Id rather do that in a follow up. Repository: rL LLVM https://reviews.llvm.org/D28223 ___ cfe-commits mailing

[PATCH] D28220: provide Win32 native threading

2017-01-03 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd updated this revision to Diff 82954. compnerd added a comment. Remove incorrect use of `VC_EXTRALEAN`. Fix signature for `__libcpp_set_thread_specific`. Provide CC adjustment thunks for the thread creation. Add an assertion for sleep timeout truncation. Implement exec-once interfac

[PATCH] D28226: threading_support: introduce __libcpp_recursive_mutex_t

2017-01-03 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd marked 3 inline comments as done. compnerd added inline comments. Comment at: include/__threading_support:91 + { +return reinterpret_cast<__libcpp_mutex_t*>(__value); + } EricWF wrote: > Wouldn't a `static_cast` be valid here? Yeah. =

[PATCH] D28226: threading_support: introduce __libcpp_recursive_mutex_t

2017-01-03 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd updated this revision to Diff 82983. compnerd marked 3 inline comments as done. compnerd added a comment. Use l-values, static_cast. Repository: rL LLVM https://reviews.llvm.org/D28226 Files: include/__threading_support include/mutex Index: include/mutex ===

[PATCH] D28212: typeinfo: provide a partial implementation for Win32

2017-01-04 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd added inline comments. Comment at: include/typeinfo:75 +#elif defined(_WIN32) +#define _LIBCPP_HAS_WINDOWS_TYPEINFO +#else rnk wrote: > Is _WIN32 the right condition? It seems like this is intended to match the MS > ABI RTTI structure, not the Itanium o

[PATCH] D28226: threading_support: introduce __libcpp_recursive_mutex_t

2017-01-04 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd added a comment. Im not tied to this approach. I really want to get @mclow.lists or @EricWF to weigh in as to which approach they prefer (new interfaces or the wrapper, or even a new approach). Repository: rL LLVM https://reviews.llvm.org/D28226

[PATCH] D28316: [libc++] Cleanup and document <__threading_support>

2017-01-04 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd accepted this revision. compnerd added a comment. This revision is now accepted and ready to land. This seems much better organized I think, and easier to follow. Thanks for the docs on the various options! https://reviews.llvm.org/D28316 ___

[PATCH] D28226: threading_support: introduce __libcpp_recursive_mutex_t

2017-01-04 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd abandoned this revision. compnerd added a comment. Superceded by https://reviews.llvm.org/D28338 Repository: rL LLVM https://reviews.llvm.org/D28226 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/ma

[PATCH] D28220: provide Win32 native threading

2017-01-04 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd updated the summary for this revision. compnerd updated this revision to Diff 83174. Repository: rL LLVM https://reviews.llvm.org/D28220 Files: include/__config include/__threading_support Index: include/__threading_support

[PATCH] D28220: provide Win32 native threading

2017-01-04 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd marked 6 inline comments as done. compnerd added inline comments. Comment at: include/__threading_support:527 +static inline _LIBCPP_ALWAYS_INLINE unsigned int WINAPI +__libcpp_thread_trampoline(void *__data) +{ rnk wrote: > halyavin wrote: > > Trampolin

[PATCH] D28220: provide Win32 native threading

2017-01-04 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd updated this revision to Diff 83178. compnerd added a comment. Address a number of review comments. Repository: rL LLVM https://reviews.llvm.org/D28220 Files: include/__config include/__threading_support Index: include/__threading_support ===

[PATCH] D28220: provide Win32 native threading

2017-01-04 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd marked an inline comment as done. compnerd added inline comments. Comment at: include/__threading_support:458 + __libcpp_mutex_reference&& __m, + timespec* __ts) +{ halyavin wrote: > In posix, p

[PATCH] D28220: provide Win32 native threading

2017-01-04 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd updated this revision to Diff 83182. compnerd marked an inline comment as done. compnerd added a comment. Fix `__libcpp_condvar_timedwait` parameter usage (absolute vs relative time) Repository: rL LLVM https://reviews.llvm.org/D28220 Files: include/__config include/__threading_

[PATCH] D28338: thread_support: split out {,non-}recursive mutex

2017-01-05 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd closed this revision. compnerd added a comment. SVN r291145 Repository: rL LLVM https://reviews.llvm.org/D28338 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D28220: provide Win32 native threading

2017-01-05 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd marked an inline comment as done. compnerd added inline comments. Comment at: include/__threading_support:474 + system_clock::time_point(duration_cast(duration)); + auto timeout_ms = duration_cast(abstime - system_clock::now()); + halyavin wrote:

[PATCH] D28383: build: add a heuristic to determine the C++ ABI

2017-01-05 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd created this revision. compnerd added reviewers: EricWF, mclow.lists, smeenai, kastiglione. compnerd added subscribers: cfe-commits, rnk. compnerd set the repository for this revision to rL LLVM. Herald added a subscriber: mgorny. We need to have a more principled method to detect the C++

[PATCH] D28212: typeinfo: provide a partial implementation for Win32

2017-01-05 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd set the repository for this revision to rL LLVM. compnerd updated this revision to Diff 83326. Repository: rL LLVM https://reviews.llvm.org/D28212 Files: include/typeinfo src/typeinfo.cpp Index: src/typeinfo.cpp ===

[PATCH] D28383: build: add a heuristic to determine the C++ ABI

2017-01-05 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd added a comment. @rnk happy to add such a macro. Would `__cpp_abi_itanium` and `__cpp_abi_microsoft` be palatable? This actually does get encoded into `__config` albeit in a round-about way. The `__config_site` gets concatenated with `__config` into `__generated_config` which is ins

[PATCH] D28220: provide Win32 native threading

2017-01-06 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd updated this revision to Diff 83430. compnerd marked an inline comment as done. compnerd added a comment. rebase, address negative timeouts, fix thunking for `__libcpp_tls_create` Repository: rL LLVM https://reviews.llvm.org/D28220 Files: include/__config include/__threading_sup

[PATCH] D28220: provide Win32 native threading

2017-01-06 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd removed rL LLVM as the repository for this revision. compnerd updated this revision to Diff 83432. compnerd added a comment. rebase https://reviews.llvm.org/D28220 Files: include/__config include/__threading_support include/thread Index: include/thread ==

[PATCH] D28220: provide Win32 native threading

2017-01-06 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd set the repository for this revision to rL LLVM. compnerd updated this revision to Diff 83453. Repository: rL LLVM https://reviews.llvm.org/D28220 Files: include/__config include/__threading_support include/thread Index: include/thread ==

[PATCH] D28220: provide Win32 native threading

2017-01-06 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd removed rL LLVM as the repository for this revision. compnerd updated this revision to Diff 83469. compnerd marked 2 inline comments as done. compnerd added a comment. remove `WIN32_LEAN_AND_MEAN`, fix decoration, remove inline decorations https://reviews.llvm.org/D28220 Files: inclu

[PATCH] D28426: [libc++] Tolerate presence of __deallocate macro

2017-01-06 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd accepted this revision. compnerd added a comment. This revision is now accepted and ready to land. This is a really nice cleanup! https://reviews.llvm.org/D28426 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/

[PATCH] D28212: typeinfo: provide a partial implementation for Win32

2017-01-06 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd updated this revision to Diff 83489. compnerd added a comment. Rebase for r291329. Repository: rL LLVM https://reviews.llvm.org/D28212 Files: include/typeinfo src/typeinfo.cpp Index: src/typeinfo.cpp === --- src/ty

[PATCH] D28220: provide Win32 native threading

2017-01-06 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd closed this revision. compnerd added a comment. SVN r291333 Comment at: include/__threading_support:29-30 +#include +#define WIN32_LEAN_AND_MEAN +#include +#include majnemer wrote: > EricWF wrote: > > I think we agreed that we cannot use this macro.

[PATCH] D26949: [libc++abi] Clean up visibility

2017-01-06 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd added inline comments. Comment at: src/cxa_new_delete.cpp:34 */ -__attribute__((__weak__, __visibility__("default"))) +__attribute__((__weak__)) void * EricWF wrote: > Can we abstract this away to a `_LIBCXXABI_NEW_DELETE_VIS` macro? Are `operator new`

[PATCH] D28383: build: add a heuristic to determine the C++ ABI

2017-01-07 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd abandoned this revision. compnerd added a comment. We have a temporary workaround while a proper macro is considered by SD-6. Repository: rL LLVM https://reviews.llvm.org/D28383 ___ cfe-commits mailing list cfe-commits@lists.llvm.org htt

[PATCH] D28212: typeinfo: provide a partial implementation for Win32

2017-01-07 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd added inline comments. Comment at: include/typeinfo:109 protected: +#if defined(_LIBCPP_HAS_MS_ABI_TYPEINFO) +#else EricWF wrote: > Don't we need a constructor here? No, we do not need a constructor since the emitted object is already a well formed obj

[PATCH] D28512: [libc++] Pair _aligned_malloc with _aligned_free

2017-01-11 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd accepted this revision. compnerd added a comment. This revision is now accepted and ready to land. Hah, can't believe we missed that. https://reviews.llvm.org/D28512 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.

[PATCH] D31375: Add docs for libunwind

2017-03-26 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd added a comment. What happens when you try building it in tree? Comment at: docs/index.rst:82 + +If you want to contribute a patch to libc++, the best place for that is +`Phabricator `_. Please include [libunwind] in the subject

[PATCH] D25157: [compiler-rt] [cmake] Respect COMPILER_RT_BUILD_* for libs, headers and tests

2017-03-29 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd added inline comments. Comment at: cmake/config-ix.cmake:438-441 if (SANITIZER_COMMON_SUPPORTED_ARCH AND NOT LLVM_USE_SANITIZER AND +(COMPILER_RT_BUILD_SANITIZERS OR COMPILER_RT_BUILD_XRAY) AND (OS_NAME MATCHES "Android|Darwin|Linux|FreeBSD" OR (OS_NAME MA

[PATCH] D26796: [Driver] Use arch type to find compiler-rt libraries (on Linux)

2017-01-14 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd added a comment. I do think that this is an issue. Particularly for Windows targets, which have usually had the different architecture value. https://reviews.llvm.org/D26796 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://l

[PATCH] D28862: [compiler-rt] [test] Use approximate comparison on float types

2017-01-18 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd added a comment. I think that the checks should be exact. Instead, we should check the compilation mode and change the exact value (i.e. if we are using i387 mode, we would use the adjusted value). Repository: rL LLVM https://reviews.llvm.org/D28862

[PATCH] D28785: Split exception.cpp and new.cpp implementation into different files for different runtimes

2017-01-18 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd added a comment. While I love this direction (the original version really was an unintelligible pile of code), I really think that this change may be taking on too much. Why not split it up first and do nothing else. We could do the MS ABI implementation in a subsequent change. This

[PATCH] D28849: [compiler-rt] [test] Fix page address logic in clear_cache_test to use binary negation

2017-01-18 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd added a comment. I wonder if we should take this a bit further. Use something like a `PAGE_SIZE` constant to avoid this confusion entirely. Furthremore, different targets could use different page sizes. IIRC, SPARC has a 8K page size by default. Repository: rL LLVM https://revi

[PATCH] D28849: [compiler-rt] [test] Fix page address logic in clear_cache_test

2017-01-19 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd added inline comments. Comment at: test/builtins/Unit/clear_cache_test.c:71 +char* start = (char*)((uintptr_t)execution_buffer & (-get_page_size())); +char* end = (char*)((uintptr_t)(&execution_buffer[128+4096]) & (-get_page_size())); #if defined(_WIN32) --

[PATCH] D28849: [compiler-rt] [test] Fix page address logic in clear_cache_test

2017-01-21 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd accepted this revision. compnerd added a comment. This revision is now accepted and ready to land. Would be nice to clang-format those lines, but its no worse than before. https://reviews.llvm.org/D28849 ___ cfe-commits mailing list cfe-com

[PATCH] D29101: Ignore -f(no)objc-arc-exception when -fno-objc-arc set

2017-01-24 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd closed this revision. compnerd added a comment. SVN r293014. https://reviews.llvm.org/D29101 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D29198: clang-cl: Warn about /U flags that look like filenames (PR31662)

2017-01-26 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd accepted this revision. compnerd added a comment. Thanks for adding this, diagnosing what was going on here the first time around took a little bit of thinking. https://reviews.llvm.org/D29198 ___ cfe-commits mailing list cfe-commits@lists

[PATCH] D25402: [Driver] Pass -lunwind along with compiler-rt when necessary on Linux

2017-01-26 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd requested changes to this revision. compnerd added a comment. This revision now requires changes to proceed. This really needs a new driver flag (`-unwinder`?) similar to `-rtlib`, as there are multiple unwinders, and it is unclear which unwinder is the proper one on a given target. Th

[PATCH] D28407: Refer to _LIBCPP_MSVC macro where applicable

2017-02-05 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd closed this revision. compnerd added a comment. SVN r294171 https://reviews.llvm.org/D28407 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D34523: AST: mangle BlockDecls under MS ABI

2017-06-26 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd marked 2 inline comments as done. compnerd added inline comments. Comment at: lib/AST/MicrosoftMangle.cpp:988 + if (const auto *RD = dyn_cast(DC)) +mangleName(RD); + else efriedma wrote: > The call to mangleName() looks a little weird..

[PATCH] D34523: AST: mangle BlockDecls under MS ABI

2017-06-26 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd marked 2 inline comments as done. compnerd added inline comments. Comment at: lib/AST/MicrosoftMangle.cpp:988 + if (const auto *RD = dyn_cast(DC)) +mangleName(RD); + else compnerd wrote: > efriedma wrote: > > The call to mangleName() lo

[PATCH] D34523: AST: mangle BlockDecls under MS ABI

2017-06-26 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd updated this revision to Diff 104028. compnerd added a comment. Handle unnamed parameters, improve mangling for NSDMis. The one case that we dont handle currently causes an assertion even in itanium mode. https://reviews.llvm.org/D34523 Files: lib/AST/MicrosoftMangle.cpp test/Cod

[PATCH] D34523: AST: mangle BlockDecls under MS ABI

2017-06-26 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd closed this revision. compnerd added a comment. SVN r306347 Thanks @efriedma and @majnemer! https://reviews.llvm.org/D34523 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D34588: Check for _MSC_VER before define _LIBCPP_MSVCRT

2017-06-26 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd added a comment. Thinking more about this, on Windows, is there a strong reason to default to a different libc by default on Windows? @bruno would reusing `-ffreestanding` work for you here? Or is there something else that we can identify about the target environment that can indicat

[PATCH] D34580: [CodeGen][ObjC] Load indirect ARC arguments in prolog

2017-06-27 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd closed this revision. compnerd added a comment. SVN r306444 https://reviews.llvm.org/D34580 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D34839: [Driver] Honor -nostdinc and -isystem-after on CrossWindows

2017-06-29 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd accepted this revision. compnerd added a comment. This revision is now accepted and ready to land. This seems like a good idea. Thanks! https://reviews.llvm.org/D34839 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.ll

[PATCH] D34859: [COFF, ARM64] Set the data type widths and the data layout string for COFF ARM64

2017-06-29 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd accepted this revision. compnerd added a comment. This revision is now accepted and ready to land. Can you please double check the type of `long double` as well? Comment at: lib/Basic/Targets.cpp:6583 + +// This is an LLP64 paltform. +// int:4, long:4, long lon

[PATCH] D34839: [Driver] Honor -nostdinc and -isystem-after on CrossWindows

2017-06-30 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd closed this revision. compnerd added a comment. SVN r306829 https://reviews.llvm.org/D34839 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D34770: [Bash-autocompletion] Auto complete cc1 options if -cc1 is specified

2017-07-03 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd accepted this revision. compnerd added inline comments. This revision is now accepted and ready to land. Comment at: clang/lib/Driver/Driver.cpp:1236 +// We want to show cc1-only options only when clang is invoked as "clang -cc1". +// When clang is invoked as "c

[PATCH] D34588: Check for _MSC_VER before define _LIBCPP_MSVCRT

2017-07-13 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd added a comment. In https://reviews.llvm.org/D34588#802533, @bruno wrote: > > Thinking more about this, on Windows, is there a strong reason to default > > to a different libc by default on Windows? > > I'm mostly concerned with `-fms-extensions` + darwin, which doesn't apply to > this

[PATCH] D35538: [CodeGen][ARM] ARM runtime helper functions are not always soft-fp

2017-07-18 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd requested changes to this revision. compnerd added a comment. This revision now requires changes to proceed. Can you please add a test that shows that the AEABI functions are not given the wrong CC? Also, can you show that if someone also passes `-meabi=gnu` with a VFP target, that we

[PATCH] D35862: [clang] Add ARM64 support to armintr.h for MSVC compatibility

2017-07-25 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd accepted this revision. compnerd added a comment. This revision is now accepted and ready to land. Please split this out into `arm64intr.h` and include it from `intrin.h` under a `#if defined(_M_ARM64)` case before committing. https://reviews.llvm.org/D35862

[PATCH] D35538: [CodeGen][ARM] ARM runtime helper functions are not always soft-fp

2017-07-25 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd added a comment. I think that the approach is reasonable. However, the test needs tweaking. The function and the call both are ambiguous in the match. Can you match the call sequence? Or explicitly the local label and then the call. https://reviews.llvm.org/D35538 _

[PATCH] D35972: Add warning to clang-reorder-fields when reordering breaks member init list dependencies

2017-07-27 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd added inline comments. Comment at: clang-reorder-fields/ReorderFieldsAction.cpp:111 +Results.insert(FD); + return Results; +} What if the `FieldDecl` belongs to a base class? Can you add a test case for that scenario? Repository: rL LLVM

[PATCH] D35961: [llvm] Update MachOObjectFile::exports interface

2017-07-27 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd added a comment. Does anyone use the overload with the `O` for `exports` with `nullptr` instead of `this`? If not, we could just inline `this` throughout. Comment at: tools/llvm-nm/llvm-nm.cpp:1230 Error Err = Error::success(); - for (const llvm::object::

[PATCH] D42232: [cmake] Also pass CMAKE_ASM_COMPILER_ID to next stage when bootstrapping

2018-01-19 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd accepted this revision. compnerd added a comment. This revision is now accepted and ready to land. Took a bit of reading to realize that the compiler is being set to clang, and therefore `CMAKE_ASM_COMPILER_ID` should be `Clang`. Repository: rC Clang https://reviews.llvm.org/D42232

[PATCH] D42508: AST: support protocol conformances on id/class/interfaces in MS ABI

2018-01-24 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd created this revision. compnerd added reviewers: rjmccall, rnk. Herald added a subscriber: cfe-commits. Add support for mangling ObjC protocol conformances in MS ABI as if they are COM interfaces. By diverging from the itanium mangling of `objc_protocol` prefixed names, this approach a

[PATCH] D42508: AST: support protocol conformances on id/class/interfaces in MS ABI

2018-01-24 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd updated this revision to Diff 131379. compnerd marked an inline comment as done. compnerd added a comment. scope the template back references and add a comment. https://reviews.llvm.org/D42508 Files: lib/AST/MicrosoftMangle.cpp test/CodeGenObjCXX/msabi-protocol-conformance.mm Ind

[PATCH] D42508: AST: support protocol conformances on id/class/interfaces in MS ABI

2018-01-25 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd updated this revision to Diff 131477. compnerd added a comment. Add additional test cases as discussed on IRC. These ensure that the back reference handling is correct. Repository: rC Clang https://reviews.llvm.org/D42508 Files: lib/AST/MicrosoftMangle.cpp test/CodeGenObjCXX/m

[PATCH] D42555: [libunwind] Don't enable _LIBUNWIND_BUILD_ZERO_COST_APIS if building the SJLJ APIs

2018-01-25 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd accepted this revision. compnerd added a comment. This revision is now accepted and ready to land. Ugh, I really wish that we could simplify that wrapping conditional. https://reviews.llvm.org/D42555 ___ cfe-commits mailing list cfe-commits

[PATCH] D42508: AST: support protocol conformances on id/class/interfaces in MS ABI

2018-01-26 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd closed this revision. compnerd added a comment. SVN r323547 Repository: rC Clang https://reviews.llvm.org/D42508 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D42614: AST: support ObjC lifetime qualifiers in MS ABI

2018-01-27 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd created this revision. compnerd added a reviewer: rjmccall. Herald added a subscriber: cfe-commits. Add support for Objective C lifetime qualifiers in MS ABI. Because there is no formal way to add a custom extension on a pointer qualifier, re-use C++/CX (which is deprecated) and C++/CLI

[PATCH] D42354: Fix libcxx MSVC C++17 redefinition of 'align_val_t'

2018-01-27 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd accepted this revision. compnerd added a comment. This revision is now accepted and ready to land. I think that if we can remove the `__zero` and `__max`, we should do that, but that is better done as a separate change. Repository: rCXX libc++ https://reviews.llvm.org/D42354

[PATCH] D42614: AST: support ObjC lifetime qualifiers in MS ABI

2018-01-29 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd added a comment. Hmm, the only thing that we could fake would be namespaces on the parameter types. Is that better? I'm not tied to re-using the existing mangling. Repository: rC Clang https://reviews.llvm.org/D42614 ___ cfe-commits m

[PATCH] D42614: AST: support ObjC lifetime qualifiers in MS ABI

2018-01-29 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd added a comment. Yeah, Im afraid I cannot definitely say that will never be sensible. I think I would, in fact, prefer an alternative. I'm just not sure what is a good viable alternative, especially since we are constrained in what the grammar accepts. The desugaring of the `id` and

[PATCH] D42758: Support `#pragma comment(lib, "name")` in the frontend for ELF

2018-01-31 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd created this revision. compnerd added a reviewer: rnk. This adds the frontend support required to support the use of the comment pragma to enable auto linking on ELFish targets. This is a generic ELF extension supported by LLVM. We need to change the handling for the "dependentlib" i

[PATCH] D42758: Support `#pragma comment(lib, "name")` in the frontend for ELF

2018-01-31 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd updated this revision to Diff 132252. compnerd added a comment. Add missed file Repository: rC Clang https://reviews.llvm.org/D42758 Files: lib/CodeGen/CodeGenModule.cpp lib/CodeGen/CodeGenModule.h lib/Parse/ParsePragma.cpp test/CodeGen/elf-linker-options.c Index: test/Cod

[PATCH] D42768: AST: add an extension to support SwiftCC on MS ABI

2018-01-31 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd created this revision. compnerd added a reviewer: rnk. compnerd added a subscriber: troughton. Since we are unable to mangle the SwiftCC CC in the function type, provide an additional namespace qualifier to the decorated source of `__swift_cc` which serves as the CC identifier. This is

[PATCH] D40929: Unblock Swift Calling Convention Mangling on Windows

2018-01-31 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd added a comment. https://reviews.llvm.org/D42768 adds the `__swift_cc` in the right location and detangles correctly with `undname` as well. Repository: rC Clang https://reviews.llvm.org/D40929 ___ cfe-commits mailing list cfe-commits@l

[PATCH] D31372: Support Microsoft mangling of swift calling convention methods

2018-01-31 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd added a comment. https://reviews.llvm.org/D42768 adds the __swift_cc in the right location and demangles correctly with undname as well. https://reviews.llvm.org/D31372 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.l

[PATCH] D42641: [MinGW] Emit typeinfo locally for dllimported classes without key functions

2018-01-31 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd added a comment. I think that the new version is better. Comment at: lib/CodeGen/ItaniumCXXABI.cpp:2766 +// Don't import the RTTI but emit it locally +if (CGM.getTriple().isWindowsGNUEnvironment() && IsDLLImport) + return false; Can't this

[PATCH] D42768: AST: add an extension to support SwiftCC on MS ABI

2018-01-31 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd updated this revision to Diff 132315. compnerd added a comment. Use reserved namespace. Repository: rC Clang https://reviews.llvm.org/D42768 Files: lib/AST/MicrosoftMangle.cpp test/CodeGenCXX/msabi-swiftcall-cc.cpp Index: test/CodeGenCXX/msabi-swiftcall-cc.cpp

[PATCH] D42768: AST: add an extension to support SwiftCC on MS ABI

2018-01-31 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd updated this revision to Diff 132324. compnerd added a comment. Handle pointers as well Repository: rC Clang https://reviews.llvm.org/D42768 Files: lib/AST/MicrosoftMangle.cpp test/CodeGenCXX/msabi-swiftcall-cc.cpp Index: test/CodeGenCXX/msabi-swiftcall-cc.cpp

[PATCH] D42768: AST: add an extension to support SwiftCC on MS ABI

2018-01-31 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd added a comment. @rjmccall I think both of those are concerns. I'm just putting this up so that others can grab and test it. It also coincides with the approach that we have taken elsewhere in clang using the `__clang` namespace for extending the decoration. What is the case that I

<    1   2   3   4   5   6   7   >