Re: [PATCH] D21673: [libcxx] guard throw with exception enabling check

2016-06-24 Thread Weiming Zhao via cfe-commits
weimingz added a subscriber: weimingz. weimingz added a comment. It's a good idea. Currently, there are about 600+ "throws" being guarded by _LIBCPP_NO_EXCEPTIONS macro. How about let's merge the patch now and I can do the conversion of existing code to the wrapper in background? Weiming

Re: [PATCH] D21673: [libcxx] guard throw with exception enabling check

2016-06-24 Thread Weiming Zhao via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL273697: [libcxx] guard throw with exception enabling check (authored by weimingz). Changed prior to commit: http://reviews.llvm.org/D21673?vs=61755=61813#toc Repository: rL LLVM

[libcxx] r273697 - [libcxx] guard throw with exception enabling check

2016-06-24 Thread Weiming Zhao via cfe-commits
Author: weimingz Date: Fri Jun 24 13:02:27 2016 New Revision: 273697 URL: http://llvm.org/viewvc/llvm-project?rev=273697=rev Log: [libcxx] guard throw with exception enabling check Summary: this fixes build error when built with c++14 and no exceptions Reviewers: rmaprath Subscribers:

[PATCH] D21673: [libcxx] guard throw with exception enabling check

2016-06-23 Thread Weiming Zhao via cfe-commits
weimingz created this revision. weimingz added a subscriber: cfe-commits. this fixes build error when built with c++14 and no exceptions http://reviews.llvm.org/D21673 Files: include/experimental/optional Index: include/experimental/optional

[PATCH] D16171: Warning on redeclaring with a conflicting asm label

2016-01-13 Thread Weiming Zhao via cfe-commits
weimingz created this revision. weimingz added a reviewer: nicholas. weimingz added a subscriber: cfe-commits. r255371 errors on redeclaring with a conflicting asm label. This patch changes errors to warnings to prevent breaking existing codes. http://reviews.llvm.org/D16171 Files:

Re: [PATCH] D16171: Warning on redeclaring with a conflicting asm label

2016-01-14 Thread Weiming Zhao via cfe-commits
weimingz updated this revision to Diff 44931. weimingz added a comment. if the new decl is not used, we can just give warnings http://reviews.llvm.org/D16171 Files: include/clang/Basic/DiagnosticSemaKinds.td lib/Sema/SemaDecl.cpp test/Sema/asm-label.c Index: test/Sema/asm-label.c

Re: [PATCH] D21706: [libcxx] refactor for throw or assert

2016-06-24 Thread Weiming Zhao via cfe-commits
weimingz added a comment. Before replacing all throw/assert to macros, let's first check if we're on the right path. http://reviews.llvm.org/D21706 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D21706: [libcxx] refactor for throw or assert

2016-06-24 Thread Weiming Zhao via cfe-commits
weimingz created this revision. weimingz added reviewers: rmaprath, grandinj. weimingz added a subscriber: cfe-commits. Add macros to wrapper for throw or assert. http://reviews.llvm.org/D21706 Files: include/__config include/__locale include/array include/experimental/optional

[PATCH] D21708: [libcxx] fix compiler warning of autological-constant-out-of-range-compare

2016-06-24 Thread Weiming Zhao via cfe-commits
weimingz created this revision. weimingz added a subscriber: cfe-commits. warning: comparison of constant -2147483648 with expression of type 'long' (range [-2147483648, 2147483647]) is always false [-Wtautological-constant-out-of-range-compare] As int and long maybe the same size on most

Re: [PATCH] D17085: Test commit, fixed "clang" to "Clang" in docs

2016-02-10 Thread Weiming Zhao via cfe-commits
weimingz added a comment. LGTM http://reviews.llvm.org/D17085 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D17741: adds __FILE_BASENAME__ builtin macro

2016-02-29 Thread Weiming Zhao via cfe-commits
weimingz created this revision. weimingz added a subscriber: cfe-commits. __FILE__ will be expanded to the full path. In some embedded system scenarios, the final images is linked from many objs and the image size is a very important factor. The full filenames can occupy a lot space in the

Re: [PATCH] D17741: adds __FILE_BASENAME__ builtin macro

2016-02-29 Thread Weiming Zhao via cfe-commits
weimingz added a comment. In http://reviews.llvm.org/D17741#364756, @thakis wrote: > Instead of doing this, would it make sense to have a flag like > -ffile-basename that changes what __FILE__ expands to? > > I had wished I'd be able to have some control over __FILE__ (I'd like to say > "make

Re: [PATCH] D17741: adds __FILE_BASENAME__ builtin macro

2016-02-29 Thread Weiming Zhao via cfe-commits
weimingz updated this revision to Diff 49445. weimingz added a comment. rename the macro to CLANG_FILE_BASENAME per Ben's comments. http://reviews.llvm.org/D17741 Files: include/clang/Lex/Preprocessor.h lib/Lex/PPMacroExpansion.cpp test/Lexer/file_basename.c Index:

Re: [PATCH] D17741: adds __FILE_BASENAME__ builtin macro

2016-03-10 Thread Weiming Zhao via cfe-commits
weimingz updated this revision to Diff 50300. weimingz added a comment. rebased http://reviews.llvm.org/D17741 Files: include/clang/Driver/Options.td include/clang/Lex/Preprocessor.h include/clang/Lex/PreprocessorOptions.h lib/Driver/Tools.cpp lib/Frontend/CompilerInvocation.cpp

Re: [PATCH] D17741: adds __FILE_BASENAME__ builtin macro

2016-03-14 Thread Weiming Zhao via cfe-commits
weimingz added a comment. In http://reviews.llvm.org/D17741#372098, @weimingz wrote: > rebased ping~ http://reviews.llvm.org/D17741 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

Re: [PATCH] D17741: adds __FILE_BASENAME__ builtin macro

2016-04-08 Thread Weiming Zhao via cfe-commits
weimingz added a subscriber: weimingz. weimingz added a comment. Sounds good. Will do. Thanks for reviewing http://reviews.llvm.org/D17741 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

Re: [PATCH] D17741: adds __FILE_BASENAME__ builtin macro

2016-04-08 Thread Weiming Zhao via cfe-commits
weimingz updated this revision to Diff 53105. weimingz added a comment. per Alex's suggestion, split into 2 flags: -ffile-macro-prefix-to-remove=xxx : remove matched prefix -ffile-macro-basename-only : remove the whole dir part http://reviews.llvm.org/D17741 Files:

Re: [PATCH] D17874: Switch krait to use -mcpu=cortex-a15 for assembler tool invocations.

2016-03-03 Thread Weiming Zhao via cfe-commits
weimingz added a reviewer: apazos. weimingz added a comment. LGTM. Ana, could you take a look too? http://reviews.llvm.org/D17874 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D17874: Switch krait to use -mcpu=cortex-a15 for assembler tool invocations.

2016-03-04 Thread Weiming Zhao via cfe-commits
weimingz accepted this revision. weimingz added a comment. This revision is now accepted and ready to land. Ana is OK with it. http://reviews.llvm.org/D17874 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

Re: [PATCH] D17741: adds __FILE_BASENAME__ builtin macro

2016-03-03 Thread Weiming Zhao via cfe-commits
weimingz updated this revision to Diff 49713. weimingz added a comment. Add "-f__FILE__-prefix-to-remove" flag to support the trim of the prefix. Passing special value __ALL_DIR__ to remove all dir parts. For example FILE is /a/b/c -f__FILE__-prefix-to-remove=/a/ will cause FILE be expanded to

Re: [PATCH] D17741: adds __FILE_BASENAME__ builtin macro

2016-03-03 Thread Weiming Zhao via cfe-commits
weimingz updated the summary for this revision. weimingz updated this revision to Diff 49762. weimingz added a comment. Change the option name to -ffile-macro-prefix-to-remove http://reviews.llvm.org/D17741 Files: include/clang/Driver/Options.td include/clang/Lex/Preprocessor.h

Re: [PATCH] D17741: adds __FILE_BASENAME__ builtin macro

2016-03-01 Thread Weiming Zhao via cfe-commits
weimingz added a comment. In http://reviews.llvm.org/D17741#364954, @thakis wrote: > In http://reviews.llvm.org/D17741#364931, @weimingz wrote: > > > In http://reviews.llvm.org/D17741#364756, @thakis wrote: > > > > > Instead of doing this, would it make sense to have a flag like > > >

Re: [PATCH] D17741: adds __FILE_BASENAME__ builtin macro

2016-03-21 Thread Weiming Zhao via cfe-commits
weimingz added a comment. In http://reviews.llvm.org/D17741#374725, @weimingz wrote: > In http://reviews.llvm.org/D17741#372098, @weimingz wrote: > > > rebased > > > ping~ HI, Any comments/suggestions? http://reviews.llvm.org/D17741 ___

Re: [PATCH] D17741: adds __FILE_BASENAME__ builtin macro

2016-04-22 Thread Weiming Zhao via cfe-commits
weimingz added a comment. Ping ? http://reviews.llvm.org/D17741 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D19225: [ARM] predefines __ELF__ macro for arm-none-eabi

2016-04-18 Thread Weiming Zhao via cfe-commits
weimingz created this revision. weimingz added reviewers: rengolin, silviu.baranga. weimingz added a subscriber: cfe-commits. Herald added subscribers: rengolin, aemerson. redefines __ELF__ macro for arm-none-eabi http://reviews.llvm.org/D19225 Files: lib/Basic/Targets.cpp

r266625 - [ARM] predefines __ELF__ macro for arm-none-eabi

2016-04-18 Thread Weiming Zhao via cfe-commits
Author: weimingz Date: Mon Apr 18 11:25:46 2016 New Revision: 266625 URL: http://llvm.org/viewvc/llvm-project?rev=266625=rev Log: [ARM] predefines __ELF__ macro for arm-none-eabi Summary: predefines __ELF__ macro for arm-none-eabi Reviewers: silviu.baranga, rengolin Subscribers: aemerson,

Re: [PATCH] D19225: [ARM] predefines __ELF__ macro for arm-none-eabi

2016-04-18 Thread Weiming Zhao via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL266625: [ARM] predefines __ELF__ macro for arm-none-eabi (authored by weimingz). Changed prior to commit: http://reviews.llvm.org/D19225?vs=54070=54074#toc Repository: rL LLVM

Re: [PATCH] D19344: [libc++] fix constexpr error when build with MUSL and macro redef warning when no exception

2016-04-20 Thread Weiming Zhao via cfe-commits
weimingz added inline comments. Comment at: include/__config:300 @@ -299,3 +299,3 @@ -#if !(__has_feature(cxx_exceptions)) +#if !(__has_feature(cxx_exceptions)) && !defined(_LIBCPP_NO_EXCEPTIONS) #define _LIBCPP_NO_EXCEPTIONS Is this change OK?

Re: [PATCH] D19344: [libc++] fix macro redef warning when exception is disabled

2016-04-20 Thread Weiming Zhao via cfe-commits
weimingz retitled this revision from "[libc++] fix constexpr error when build with MUSL and macro redef warning when no exception" to "[libc++] fix macro redef warning when exception is disabled". weimingz updated the summary for this revision. weimingz updated this revision to Diff 54457.

[libcxx] r266956 - [libc++] fix macro redef warning when exception is disabled

2016-04-20 Thread Weiming Zhao via cfe-commits
Author: weimingz Date: Thu Apr 21 00:28:18 2016 New Revision: 266956 URL: http://llvm.org/viewvc/llvm-project?rev=266956=rev Log: [libc++] fix macro redef warning when exception is disabled Summary: when setting LIBCXX_ENABLE_EXCEPTIONS=false, _LIBCPP_NO_EXCEPTIONS wil be defined in both

Re: [PATCH] D19344: [libc++] fix macro redef warning when exception is disabled

2016-04-20 Thread Weiming Zhao via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL266956: [libc++] fix macro redef warning when exception is disabled (authored by weimingz). Changed prior to commit: http://reviews.llvm.org/D19344?vs=54457=54459#toc Repository: rL LLVM

Re: [PATCH] D22292: [libunwind] Fix unw_getcontext for ARMv6-m

2016-07-13 Thread Weiming Zhao via cfe-commits
weimingz added a comment. In http://reviews.llvm.org/D22292#482750, @rmaprath wrote: > In http://reviews.llvm.org/D22292#482560, @compnerd wrote: > > > Can you explain why the write back is needed? You are doing the write back > > on r0, but then adjusting it back. So it is unclear why this

[PATCH] D22292: [libunwind] Fix unw_getcontext for ARMv6-m

2016-07-12 Thread Weiming Zhao via cfe-commits
weimingz created this revision. weimingz added reviewers: rengolin, rmaprath. weimingz added a subscriber: cfe-commits. Herald added subscribers: rengolin, aemerson. ARMv6-m requires the writeback suffix for stm. http://reviews.llvm.org/D22292 Files: src/UnwindRegistersSave.S Index:

Re: [PATCH] D22292: [libunwind] Fix unw_getcontext for ARMv6-m

2016-07-18 Thread Weiming Zhao via cfe-commits
weimingz added inline comments. Comment at: src/UnwindRegistersRestore.S:325 @@ -324,4 +324,3 @@ DEFINE_LIBUNWIND_PRIVATE_FUNCTION(_ZN9libunwind13Registers_arm20restoreCoreAndJumpToEv) -#if !defined(__ARM_ARCH_ISA_ARM) - ldr r2, [r0, #52] - ldr r3, [r0, #60] +#if

Re: [PATCH] D22292: [libunwind] Fix unw_getcontext for ARMv6-m

2016-07-18 Thread Weiming Zhao via cfe-commits
weimingz added inline comments. Comment at: src/UnwindRegistersRestore.S:326 @@ +325,3 @@ +#if !defined(__ARM_ARCH_ISA_ARM) && __ARM_ARCH_ISA_THUMB == 1 + @ r8-r12: ldr into r1-r5, then mov to r8-r12 + ldr r1, [r0, #0x20] weimingz wrote: > originally, r0-r7 get

Re: [PATCH] D21706: [libcxx] refactor for throw

2016-07-11 Thread Weiming Zhao via cfe-commits
weimingz added a comment. Hi Marshall, do you have any comments? http://reviews.llvm.org/D21706 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D21706: [libcxx] refactor for throw

2016-07-01 Thread Weiming Zhao via cfe-commits
weimingz retitled this revision from "[libcxx] refactor for throw or assert" to "[libcxx] refactor for throw". weimingz updated the summary for this revision. weimingz updated this revision to Diff 62470. http://reviews.llvm.org/D21706 Files: include/__functional_03 include/__locale

Re: [PATCH] D21706: [libcxx] refactor for throw

2016-07-01 Thread Weiming Zhao via cfe-commits
weimingz updated this revision to Diff 62515. weimingz marked 5 inline comments as done. weimingz added a comment. fix issues per Noel's suggestion http://reviews.llvm.org/D21706 Files: include/__functional_03 include/__locale include/array include/bitset include/complex

Re: [PATCH] D21706: [libcxx] refactor for throw

2016-07-01 Thread Weiming Zhao via cfe-commits
weimingz added inline comments. Comment at: include/exception:262 @@ -261,3 +261,3 @@ _LIBCPP_INLINE_VISIBILITY -inline void __libcpp_throw(_Exception const& __e) { +inline __attribute__((noreturn)) void __libcpp_throw(_Exception const& __e) { #ifndef _LIBCPP_NO_EXCEPTIONS

Re: [PATCH] D17741: adds __FILE_BASENAME__ builtin macro

2016-09-06 Thread Weiming Zhao via cfe-commits
weimingz added a comment. ping? https://reviews.llvm.org/D17741 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libcxx] r307595 - [libc++] Refactoring __sync_* builtins; NFC (Reland)

2017-07-10 Thread Weiming Zhao via cfe-commits
Author: weimingz Date: Mon Jul 10 14:37:35 2017 New Revision: 307595 URL: http://llvm.org/viewvc/llvm-project?rev=307595=rev Log: [libc++] Refactoring __sync_* builtins; NFC (Reland) Summary: Wrap __sync_* builtins with __libcpp_ functions to facility future customizations as atomic operations

[libcxx] r307591 - [libc++] Refactoring __sync_* builtins; NFC

2017-07-10 Thread Weiming Zhao via cfe-commits
Author: weimingz Date: Mon Jul 10 14:02:54 2017 New Revision: 307591 URL: http://llvm.org/viewvc/llvm-project?rev=307591=rev Log: [libc++] Refactoring __sync_* builtins; NFC Summary: Wrap __sync_* builtins with __libcpp_ functions to facility future customizations as atomic operations are

[libcxx] r307593 - Revert "[libc++] Refactoring __sync_* builtins; NFC"

2017-07-10 Thread Weiming Zhao via cfe-commits
Author: weimingz Date: Mon Jul 10 14:23:32 2017 New Revision: 307593 URL: http://llvm.org/viewvc/llvm-project?rev=307593=rev Log: Revert "[libc++] Refactoring __sync_* builtins; NFC" This reverts commit 72ff8866bca49ee7d24c87673293b4ce88a039ec. Removed: libcxx/trunk/include/__atomic_support

r302274 - [ARM] Limit the diagnose when an ISR calls a regular function

2017-05-05 Thread Weiming Zhao via cfe-commits
Author: weimingz Date: Fri May 5 14:25:29 2017 New Revision: 302274 URL: http://llvm.org/viewvc/llvm-project?rev=302274=rev Log: [ARM] Limit the diagnose when an ISR calls a regular function Summary: When the function is compiled with soft-float or on CPU with no FPU, we don't need to diagnose

[libcxx] r313694 - [libc++] Replace __sync_* functions with __libcpp_atomic_* functions

2017-09-19 Thread Weiming Zhao via cfe-commits
Author: weimingz Date: Tue Sep 19 16:18:03 2017 New Revision: 313694 URL: http://llvm.org/viewvc/llvm-project?rev=313694=rev Log: [libc++] Replace __sync_* functions with __libcpp_atomic_* functions Summary: This patch replaces __sync_* with __libcpp_atomic_* and adds a wrapper function for