Re: [libcxx] r291331 - thread: implement sleep_for on Windows

2017-01-06 Thread Asiri Rathnayake via cfe-commits
Wouldn't it be better to introduce a __libcpp_thread_nanosleep() API call here? I bumped into a similar issue with a custom thread implementation and have a downstream patch like that. Cheers, / Asiri On 7 Jan 2017 2:59 a.m., "Saleem Abdulrasool via cfe-commits" < cfe-commits@lists.llvm.org> w

[PATCH] D28441: [libc++] [CMake] Link with /nodefaultlibs on Windows

2017-01-06 Thread Andrey Khalyavin via Phabricator via cfe-commits
halyavin added inline comments. Comment at: lib/CMakeLists.txt:108-109 +if (LIBCXX_TARGETING_WINDOWS) + add_compile_flags(/Zl) + add_link_flags(/nodefaultlib) + add_library_flags(ucrt) # Universal C runtime smeenai wrote: > These should be guarded under a chec

[PATCH] D28442: [libc++] Implement terminate(), unexpected() and uncaught_exceptions() on Windows

2017-01-06 Thread Shoaib Meenai via Phabricator via cfe-commits
smeenai accepted this revision. smeenai added a comment. This revision is now accepted and ready to land. Hooray for Microsoft for putting all these in msvcrt (their **C** runtime library) instead of msvcprt (their C++ runtime library), I guess :p Comment at: src/exception.cpp

[PATCH] D28441: [libc++] [CMake] Link with /nodefaultlibs on Windows

2017-01-06 Thread Shoaib Meenai via Phabricator via cfe-commits
smeenai added inline comments. Comment at: CMakeLists.txt:43 +if (WIN32 AND NOT MINGW) + set(LIBCXX_TARGETING_WINDOWS ON) +else() Not the biggest fan of this name, since it's not obvious why MinGW shouldn't count as targeting Windows. I thought of `LIBCXX_TARGE

[libcxx] r291337 - Explicitly specify MSVC mangling of iostream globals. Patch from Dave Lee

2017-01-06 Thread Eric Fiselier via cfe-commits
Author: ericwf Date: Sat Jan 7 00:09:12 2017 New Revision: 291337 URL: http://llvm.org/viewvc/llvm-project?rev=291337&view=rev Log: Explicitly specify MSVC mangling of iostream globals. Patch from Dave Lee Modified: libcxx/trunk/src/iostream.cpp Modified: libcxx/trunk/src/iostream.cpp URL:

[PATCH] D24688: Introduce "hosted" module flag.

2017-01-06 Thread Mehdi AMINI via Phabricator via cfe-commits
mehdi_amini added a comment. In https://reviews.llvm.org/D24688#638835, @pcc wrote: > Didn't we figure out in the end that this could be a function attribute > instead? We did? You wrote in PR30403: "I had a brief look at what it would take to have a per-function TLI, and I'm not convinced th

[PATCH] D24688: Introduce "hosted" module flag.

2017-01-06 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc added a comment. Didn't we figure out in the end that this could be a function attribute instead? https://reviews.llvm.org/D24688 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D28441: [libc++] [CMake] Link with /nodefaultlibs on Windows

2017-01-06 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. Adding cfe-commits https://reviews.llvm.org/D28441 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D28442: [libc++] Implement terminate(), unexpected() and uncaught_exceptions() on Windows

2017-01-06 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF created this revision. EricWF added reviewers: compnerd, smeenai, rnk, majnemer. EricWF added a subscriber: cfe-commits. This patch implements the following functions on Windows by forwarding to the MSVCRT: - `get_terminate()` - `set_terminate()` - `terminate()` - `set_unexpected()` - `ge

[PATCH] D24688: Introduce "hosted" module flag.

2017-01-06 Thread Mehdi AMINI via Phabricator via cfe-commits
mehdi_amini updated this revision to Diff 83510. mehdi_amini added a comment. Rebase https://reviews.llvm.org/D24688 Files: clang/lib/CodeGen/BackendUtil.cpp clang/lib/CodeGen/CodeGenModule.cpp clang/test/CodeGen/nobuiltin.c clang/test/CodeGenCUDA/flush-denormals.cu clang/test/CodeGen

[PATCH] D28344: [AVR] Add support for the full set of inline asm constraints

2017-01-06 Thread Dylan McKay via Phabricator via cfe-commits
dylanmckay marked an inline comment as done. dylanmckay added inline comments. Comment at: lib/Basic/Targets.cpp:8506 + case 'N': // Integer constant (Range: -1) +Info.setRequiresImmediate(-1); + case 'O': // Integer constant (Range: 8, 16, 24)

[PATCH] D28344: [AVR] Add support for the full set of inline asm constraints

2017-01-06 Thread Dylan McKay via Phabricator via cfe-commits
dylanmckay updated this revision to Diff 83507. dylanmckay added a comment. Add tests for inline assembly constraints https://reviews.llvm.org/D28344 Files: lib/Basic/Targets.cpp test/CodeGen/avr-inline-asm-constraints.c Index: test/CodeGen/avr-inline-asm-constraints.c

[libcxx] r291336 - system_error: correct ELAST emulation on Windows

2017-01-06 Thread Saleem Abdulrasool via cfe-commits
Author: compnerd Date: Fri Jan 6 23:13:32 2017 New Revision: 291336 URL: http://llvm.org/viewvc/llvm-project?rev=291336&view=rev Log: system_error: correct ELAST emulation on Windows ELAST should point to the last valid error string value. However, `_sys_nerr` provides the number of elements in

Re: [libcxx] r291192 - config_elast: fix typo (NFC)

2017-01-06 Thread Saleem Abdulrasool via cfe-commits
FTR, this wasn't changed with the renaming. But, taking a look at it does seem that it is off by one. Well spotted! On Thu, Jan 5, 2017 at 7:16 PM David Majnemer wrote: > On Thu, Jan 5, 2017 at 3:25 PM, Saleem Abdulrasool via cfe-commits < > cfe-commits@lists.llvm.org> wrote: > > Author: compn

[PATCH] D28344: [AVR] Add support for the full set of inline asm constraints

2017-01-06 Thread Dylan McKay via Phabricator via cfe-commits
dylanmckay updated this revision to Diff 83504. dylanmckay added a comment. Fix a few cases of unintentional switch fallthrough https://reviews.llvm.org/D28344 Files: lib/Basic/Targets.cpp Index: lib/Basic/Targets.cpp === --- l

[PATCH] D28404: IRGen: Add optnone attribute on function during O0

2017-01-06 Thread Mehdi AMINI via Phabricator via cfe-commits
mehdi_amini added inline comments. Comment at: clang/lib/CodeGen/CodeGenModule.cpp:910-912 // OptimizeNone wins over OptimizeForSize and MinSize. F->removeFnAttr(llvm::Attribute::OptimizeForSize); F->removeFnAttr(llvm::Attribute::MinSize); chandler

[PATCH] D28346: [AVR] Allow specifying the CPU on the command line

2017-01-06 Thread Dylan McKay via Phabricator via cfe-commits
dylanmckay updated this revision to Diff 83496. dylanmckay added a comment. Add tests This also defines the '__AVR' and 'AVR' values for all devices, to match what AVR-GCC does. https://reviews.llvm.org/D28346 Files: lib/Basic/Targets.cpp test/CodeGen/avr/target-cpu-defines/atmega328p.c

[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] D28425: Lit C++11 Compatibility Patch - nonthrowing destructors

2017-01-06 Thread John McCall via Phabricator via cfe-commits
rjmccall accepted this revision. rjmccall added a comment. This revision is now accepted and ready to land. Looks good to me. https://reviews.llvm.org/D28425 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailm

[libcxx] r291333 - provide Win32 native threading

2017-01-06 Thread Saleem Abdulrasool via cfe-commits
Author: compnerd Date: Fri Jan 6 21:07:45 2017 New Revision: 291333 URL: http://llvm.org/viewvc/llvm-project?rev=291333&view=rev Log: provide Win32 native threading Add an implementation for the Win32 threading model as a backing API for the internal c++ threading interfaces. This uses the Fls*

[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] 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

[libcxx] r291332 - [libc++] Tolerate presence of __deallocate macro

2017-01-06 Thread Eric Fiselier via cfe-commits
Author: ericwf Date: Fri Jan 6 21:01:24 2017 New Revision: 291332 URL: http://llvm.org/viewvc/llvm-project?rev=291332&view=rev Log: [libc++] Tolerate presence of __deallocate macro Summary: On Windows the identifier `__deallocate` is defined as a macro by one of the Windows system headers. Prev

[PATCH] D28220: provide Win32 native threading

2017-01-06 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF accepted this revision. EricWF added a comment. This revision is now accepted and ready to land. LGTM. I just successfully built this on Windows. https://reviews.llvm.org/D28220 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://l

[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/

[libcxx] r291331 - thread: implement sleep_for on Windows

2017-01-06 Thread Saleem Abdulrasool via cfe-commits
Author: compnerd Date: Fri Jan 6 20:48:30 2017 New Revision: 291331 URL: http://llvm.org/viewvc/llvm-project?rev=291331&view=rev Log: thread: implement sleep_for on Windows Windows does not provide an implementation of `nanosleep`. Round up the time duration to the nearest ms and use `Sleep`.

[libcxx] r291330 - [libc++] Correct macro name in documenation

2017-01-06 Thread Shoaib Meenai via cfe-commits
Author: smeenai Date: Fri Jan 6 20:45:35 2017 New Revision: 291330 URL: http://llvm.org/viewvc/llvm-project?rev=291330&view=rev Log: [libc++] Correct macro name in documenation The macro is named `_LIBCPP_TEMPLATE_VIS`, not `_LIBCPP_TEMPLATE_ONLY`. No functional change. Modified: libcxx/tru

[libcxx] r291329 - Add _LIBCPP_ABI_[ITANIUM|MICROSOFT] macros.

2017-01-06 Thread Eric Fiselier via cfe-commits
Author: ericwf Date: Fri Jan 6 20:43:58 2017 New Revision: 291329 URL: http://llvm.org/viewvc/llvm-project?rev=291329&view=rev Log: Add _LIBCPP_ABI_[ITANIUM|MICROSOFT] macros. This patch adds a libc++ configuration macro for the ABI we are targeting, either Itanium or Microsoft. For now we confi

[PATCH] D28404: IRGen: Add optnone attribute on function during O0

2017-01-06 Thread Chandler Carruth via Phabricator via cfe-commits
chandlerc added inline comments. Comment at: clang/lib/CodeGen/CodeGenModule.cpp:910-912 // OptimizeNone wins over OptimizeForSize and MinSize. F->removeFnAttr(llvm::Attribute::OptimizeForSize); F->removeFnAttr(llvm::Attribute::MinSize); mehdi_amin

Re: r291123 - CodeGen: plumb header search down to the IAS

2017-01-06 Thread Eric Christopher via cfe-commits
On Fri, Jan 6, 2017 at 5:56 AM Hal Finkel wrote: > > On 01/05/2017 08:30 PM, Eric Christopher via cfe-commits wrote: > > Ok, thanks. I agree that it's a problem. I'm definitely open for testing > ideas here. There are a few other things in the > TargetOptions/MCTargetOptions area that are already

[PATCH] D27872: [APFloat] Switch from (PPCDoubleDoubleImpl, IEEEdouble) layout to (IEEEdouble, IEEEdouble)

2017-01-06 Thread Eric Christopher via Phabricator via cfe-commits
echristo added a reviewer: scanon. echristo added a comment. Adding Steve in an attempt to get him to review :) https://reviews.llvm.org/D27872 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cf

[PATCH] D28404: IRGen: Add optnone attribute on function during O0

2017-01-06 Thread Mehdi AMINI via Phabricator via cfe-commits
mehdi_amini updated this revision to Diff 83480. mehdi_amini added a comment. Forgot to update test/CodeGen/attr-naked.c https://reviews.llvm.org/D28404 Files: clang/include/clang/Driver/CC1Options.td clang/include/clang/Frontend/CodeGenOptions.def clang/lib/CodeGen/CGOpenMPRuntime.cpp

[PATCH] D28404: IRGen: Add optnone attribute on function during O0

2017-01-06 Thread Mehdi AMINI via Phabricator via cfe-commits
mehdi_amini added inline comments. Comment at: clang/lib/CodeGen/CodeGenModule.cpp:910-912 // OptimizeNone wins over OptimizeForSize and MinSize. F->removeFnAttr(llvm::Attribute::OptimizeForSize); F->removeFnAttr(llvm::Attribute::MinSize); probinso

[PATCH] D28220: provide Win32 native threading

2017-01-06 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added inline comments. Comment at: include/__threading_support:30 +#define WIN32_LEAN_AND_MEAN +#include +#include EricWF wrote: > smeenai wrote: > > EricWF wrote: > > > EricWF wrote: > > > > smeenai wrote: > > > > > EricWF wrote: > > > > > > > Can we do

[PATCH] D28220: provide Win32 native threading

2017-01-06 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added inline comments. Comment at: include/__threading_support:30 +#define WIN32_LEAN_AND_MEAN +#include +#include smeenai wrote: > EricWF wrote: > > EricWF wrote: > > > smeenai wrote: > > > > EricWF wrote: > > > > > > Can we do as Reid suggests and not

[PATCH] D28427: Allow constexpr construction of subobjects unconditionally, not just in C++14.

2017-01-06 Thread David L. Jones via Phabricator via cfe-commits
dlj created this revision. dlj added a reviewer: rsmith. dlj added subscribers: cfe-commits, EricWF. Per https://wg21.link/CWG1677, the C++11 standard did not clarify that constant initialization of an object allowed constexpr brace-or-equal initialization of subobjects: struct foo_t { union {

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

2017-01-06 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. In https://reviews.llvm.org/D28426#638596, @smeenai wrote: > I'm guessing always defining `_LIBCPP_DISABLE_MACRO_CONFLICT_WARNINGS` on > Windows isn't considered an acceptable workaround either? Not really, since that still breaks users of the `__deallocate` since we `

[PATCH] D28365: [Driver] Updated for Visual Studio 2017

2017-01-06 Thread Hamza Sood via Phabricator via cfe-commits
hamzasood updated this revision to Diff 83473. hamzasood added a comment. - Modify the environment in some cases in buildLinker to keep link.exe happy. Thanks @rnk for taking the time to look at this. As suggested: - Replaced the confusing unique_ptr usage with a struct. - Renamed llvmArchToSubD

[PATCH] D28220: provide Win32 native threading

2017-01-06 Thread Shoaib Meenai via Phabricator via cfe-commits
smeenai added inline comments. Comment at: include/__threading_support:30 +#define WIN32_LEAN_AND_MEAN +#include +#include EricWF wrote: > EricWF wrote: > > smeenai wrote: > > > EricWF wrote: > > > > > Can we do as Reid suggests and not expose users to windows.

[PATCH] D28220: provide Win32 native threading

2017-01-06 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added inline comments. Comment at: include/__threading_support:30 +#define WIN32_LEAN_AND_MEAN +#include +#include EricWF wrote: > smeenai wrote: > > EricWF wrote: > > > > Can we do as Reid suggests and not expose users to windows.h? > > > > > > I was a

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

2017-01-06 Thread Shoaib Meenai via Phabricator via cfe-commits
smeenai added a comment. I'm guessing always defining `_LIBCPP_DISABLE_MACRO_CONFLICT_WARNINGS` on Windows isn't considered an acceptable workaround either? https://reviews.llvm.org/D28426 ___ cfe-commits mailing list cfe-commits@lists.llvm.org htt

[PATCH] D28220: provide Win32 native threading

2017-01-06 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added inline comments. Comment at: include/__threading_support:30 +#define WIN32_LEAN_AND_MEAN +#include +#include smeenai wrote: > EricWF wrote: > > > Can we do as Reid suggests and not expose users to windows.h? > > > > I was about to ask the same que

[PATCH] D28220: provide Win32 native threading

2017-01-06 Thread Shoaib Meenai via Phabricator via cfe-commits
smeenai added inline comments. Comment at: include/__threading_support:30 +#define WIN32_LEAN_AND_MEAN +#include +#include EricWF wrote: > > Can we do as Reid suggests and not expose users to windows.h? > > I was about to ask the same question. These includes

[libcxx] r291322 - [libcxx] [test] Strip trailing whitespace. NFC, no code review.

2017-01-06 Thread Stephan T. Lavavej via cfe-commits
Author: stl_msft Date: Fri Jan 6 19:12:15 2017 New Revision: 291322 URL: http://llvm.org/viewvc/llvm-project?rev=291322&view=rev Log: [libcxx] [test] Strip trailing whitespace. NFC, no code review. Modified: libcxx/trunk/test/std/containers/sequences/array/iterators.pass.cpp libcxx/trunk

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

2017-01-06 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF created this revision. EricWF added reviewers: compnerd, smeenai, mclow.lists, majnemer, rnk, rsmith. EricWF added a subscriber: cfe-commits. On Windows the identifier `__deallocate` is defined as a macro by one of the Windows system headers. Previously libc++ worked around this by `#undef

[PATCH] D28404: IRGen: Add optnone attribute on function during O0

2017-01-06 Thread Paul Robinson via Phabricator via cfe-commits
probinson added inline comments. Comment at: clang/lib/CodeGen/CodeGenModule.cpp:910-912 // OptimizeNone wins over OptimizeForSize and MinSize. F->removeFnAttr(llvm::Attribute::OptimizeForSize); F->removeFnAttr(llvm::Attribute::MinSize); mehdi_amin

[PATCH] D28425: Lit C++11 Compatibility Patch - nonthrowing destructors

2017-01-06 Thread Charles Li via Phabricator via cfe-commits
tigerleapgorge created this revision. tigerleapgorge added reviewers: rjmccall, rsmith. tigerleapgorge added a subscriber: cfe-commits. Hi everyone, I am Charles Li at Sony Playstation. I am refactoring my existing C++11 compatibility patches to make them easier to review. This patch is a subset

[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

RE: [cfe-dev] Testcase for LLVM PR9350

2017-01-06 Thread Andrew Rogers via cfe-commits
Hi, This is a (tested!) patch to add checks that both pre-increment and pre-decrement don’t overflow, for both char and short integer types (since they’re both narrower than int), as per the problem fixed in PR9350. Thanks, Andrew R From: Friedman, Eli [mailto:efrie...@codeaurora.org]

[PATCH] D28404: IRGen: Add optnone attribute on function during O0

2017-01-06 Thread Mehdi AMINI via Phabricator via cfe-commits
mehdi_amini updated this revision to Diff 83468. mehdi_amini added a comment. Address Paul's comment (remove useless block and add period to end comment) https://reviews.llvm.org/D28404 Files: clang/include/clang/Driver/CC1Options.td clang/include/clang/Frontend/CodeGenOptions.def clang/l

r291319 - PR20090: Add (passing) test from this bug; it's been fixed for a while.

2017-01-06 Thread Richard Smith via cfe-commits
Author: rsmith Date: Fri Jan 6 18:52:10 2017 New Revision: 291319 URL: http://llvm.org/viewvc/llvm-project?rev=291319&view=rev Log: PR20090: Add (passing) test from this bug; it's been fixed for a while. Modified: cfe/trunk/test/SemaTemplate/constexpr-instantiate.cpp Modified: cfe/trunk/tes

r291318 - PR23135: Don't instantiate constexpr functions referenced in unevaluated operands where possible.

2017-01-06 Thread Richard Smith via cfe-commits
Author: rsmith Date: Fri Jan 6 18:48:55 2017 New Revision: 291318 URL: http://llvm.org/viewvc/llvm-project?rev=291318&view=rev Log: PR23135: Don't instantiate constexpr functions referenced in unevaluated operands where possible. This implements something like the current direction of DR1581: w

[PATCH] D28220: provide Win32 native threading

2017-01-06 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added inline comments. Comment at: include/__threading_support:30 +#define WIN32_LEAN_AND_MEAN +#include +#include > Can we do as Reid suggests and not expose users to windows.h? I was about to ask the same question. These includes are dragging in the

[PATCH] D28404: IRGen: Add optnone attribute on function during O0

2017-01-06 Thread Mehdi AMINI via Phabricator via cfe-commits
mehdi_amini marked 2 inline comments as done. mehdi_amini added inline comments. Comment at: clang/lib/CodeGen/CodeGenModule.cpp:900 + ShouldAddOptNone &= !D->hasAttr(); + if (ShouldAddOptNone) { +B.addAttribute(llvm::Attribute::OptimizeNone); probinson wro

[PATCH] D28220: provide Win32 native threading

2017-01-06 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added inline comments. Comment at: include/__threading_support:580 +int __libcpp_tls_create(__libcpp_tls_key* __key, +void(_LIBCPP_TLS_DESTRUCTOR_CC* __at_exit)(void*)) +{ The `_LIBCPP_TLS_DESTRUCTOR_CC` needs to appear an the initi

[PATCH] D28404: IRGen: Add optnone attribute on function during O0

2017-01-06 Thread Paul Robinson via Phabricator via cfe-commits
probinson added inline comments. Comment at: clang/lib/CodeGen/CodeGenModule.cpp:896 + !CodeGenOpts.DisableO0ImplyOptNone && CodeGenOpts.OptimizationLevel == 0; + // We can't add optnone in the following cases, it won't pass the verifier + ShouldAddOptNone &= !D->hasAttr()

[PATCH] D28220: provide Win32 native threading

2017-01-06 Thread David Majnemer via Phabricator via cfe-commits
majnemer added inline comments. Comment at: include/__threading_support:29-30 +#include +#define WIN32_LEAN_AND_MEAN +#include +#include EricWF wrote: > I think we agreed that we cannot use this macro. Can we do as Reid suggests and not expose users to windows

[PATCH] D28220: provide Win32 native threading

2017-01-06 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added inline comments. Comment at: include/__threading_support:29 +#include +#define WIN32_LEAN_AND_MEAN +#include I think we agreed that we cannot use this macro. Comment at: include/__threading_support:426 +// Condition Variable +_LI

[PATCH] D28220: provide Win32 native threading

2017-01-06 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. Just tried the updated patch and I still get one build error: C:\Users\Eric\workspace\libcxx\src\thread.cpp(135,16): error: use of undeclared identifier 'nanosleep' while (nanosleep(&ts, &ts) == -1 && errno == EINTR) Repository: rL LLVM https://reviews.l

[PATCH] D28404: IRGen: Add optnone attribute on function during O0

2017-01-06 Thread Mehdi AMINI via Phabricator via cfe-commits
mehdi_amini marked 6 inline comments as done. mehdi_amini added inline comments. Comment at: clang/lib/CodeGen/CGOpenMPRuntime.cpp:760-762 Fn->removeFnAttr(llvm::Attribute::NoInline); + Fn->removeFnAttr(llvm::Attribute::OptimizeNone); Fn->addFnAttr(llvm::Attribute::AlwaysI

[PATCH] D28404: IRGen: Add optnone attribute on function during O0

2017-01-06 Thread Mehdi AMINI via Phabricator via cfe-commits
mehdi_amini updated this revision to Diff 83459. mehdi_amini added a comment. Address comments: reorganize the way ShouldAddOptNone is handled, hopefully make it more easy to track. Also after talking with Chandler on IRC, the source attribute "cold" does not add the LLVM IR attribute "optsize"

[libcxx] r291311 - Get all tuple tests passing on Windows

2017-01-06 Thread Eric Fiselier via cfe-commits
Author: ericwf Date: Fri Jan 6 18:10:42 2017 New Revision: 291311 URL: http://llvm.org/viewvc/llvm-project?rev=291311&view=rev Log: Get all tuple tests passing on Windows Modified: libcxx/trunk/test/libcxx/test/config.py libcxx/trunk/test/support/disable_missing_braces_warning.h Modifie

r291310 - [ThinLTO] Specify target triple in new test

2017-01-06 Thread Teresa Johnson via cfe-commits
Author: tejohnson Date: Fri Jan 6 18:09:42 2017 New Revision: 291310 URL: http://llvm.org/viewvc/llvm-project?rev=291310&view=rev Log: [ThinLTO] Specify target triple in new test This should fix bot failures in this test. Modified: cfe/trunk/test/CodeGen/thinlto_backend.ll Modified: cfe/tr

[libcxx] r291309 - Fix linking of DLL's on Windows

2017-01-06 Thread Eric Fiselier via cfe-commits
Author: ericwf Date: Fri Jan 6 18:01:55 2017 New Revision: 291309 URL: http://llvm.org/viewvc/llvm-project?rev=291309&view=rev Log: Fix linking of DLL's on Windows On Windows the runtime search path for DLL's is the same as PATH. This patch changes the test suite to add the libc++ build director

[libcxx] r291306 - Configure default ABI library as NONE on Windows

2017-01-06 Thread Eric Fiselier via cfe-commits
Author: ericwf Date: Fri Jan 6 17:59:52 2017 New Revision: 291306 URL: http://llvm.org/viewvc/llvm-project?rev=291306&view=rev Log: Configure default ABI library as NONE on Windows Modified: libcxx/trunk/CMakeLists.txt Modified: libcxx/trunk/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-

[PATCH] D28404: IRGen: Add optnone attribute on function during O0

2017-01-06 Thread Paul Robinson via Phabricator via cfe-commits
probinson added inline comments. Comment at: clang/lib/CodeGen/CodeGenModule.cpp:962 + ShouldAddOptNone &= !D->hasAttr(); + ShouldAddOptNone &= !D->hasAttr(); + ShouldAddOptNone &= !F->hasFnAttribute(llvm::Attribute::AlwaysInline); chandlerc wrote: > why is op

[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 ==

Re: [libcxx] r291275 - [libc++] Cleanup and document <__threading_support>

2017-01-06 Thread David Blaikie via cfe-commits
Thanks! On Fri, Jan 6, 2017 at 3:26 PM Eric Fiselier wrote: > Should be fixed in r291298. Sorry for the breakage. > > /Eric > > On Fri, Jan 6, 2017 at 4:18 PM, Eric Fiselier wrote: > > Hi David, > > Thanks for the information. Looking into it now. > > /Eric > > On Fri, Jan 6, 2017 at 4:02 PM, D

[PATCH] D27424: Add the diagnose_if attribute to clang.

2017-01-06 Thread George Burgess IV via Phabricator via cfe-commits
george.burgess.iv added a comment. > We do: > http://llvm.org/docs/CodingStandards.html#use-auto-type-deduction-to-make-code-more-readable Awesome. Thanks! > Btw, there's a question in there about late parsing that Phab won't let me > delete, feel free to ignore it. ;-) OK. The answer is "yes

[PATCH] D28419: clang-tools-extra: add gitattributes to disable EOL conversions on checkout of test source files

2017-01-06 Thread Antonio Maiorano via Phabricator via cfe-commits
amaiorano created this revision. amaiorano added reviewers: malcolm.parsons, ioeric. amaiorano added a subscriber: cfe-commits. Certain tests expect their input files to have LF line endings, while others expect CRLF. On Windows, when using Git with core.autocrlf=true, these tests fail because a

[PATCH] D27424: Add the diagnose_if attribute to clang.

2017-01-06 Thread George Burgess IV via Phabricator via cfe-commits
george.burgess.iv updated this revision to Diff 83412. george.burgess.iv marked 2 inline comments as done. george.burgess.iv added a comment. Addressed feedback. Thanks! https://reviews.llvm.org/D27424 Files: include/clang/AST/Expr.h include/clang/Basic/Attr.td include/clang/Basic/AttrDoc

[PATCH] D28362: [ThinLTO] Optionally ignore empty index file

2017-01-06 Thread Teresa Johnson via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL291303: [ThinLTO] Optionally ignore empty index file (authored by tejohnson). Changed prior to commit: https://reviews.llvm.org/D28362?vs=83405&id=83450#toc Repository: rL LLVM https://reviews.llvm.

r291303 - [ThinLTO] Optionally ignore empty index file

2017-01-06 Thread Teresa Johnson via cfe-commits
Author: tejohnson Date: Fri Jan 6 17:37:33 2017 New Revision: 291303 URL: http://llvm.org/viewvc/llvm-project?rev=291303&view=rev Log: [ThinLTO] Optionally ignore empty index file Summary: In order to simplify distributed build system integration, where actions may be scheduled before the Thin L

[PATCH] D28418: Fixing test to work when the compiler defaults to a different C++ standard version

2017-01-06 Thread Douglas Yung via Phabricator via cfe-commits
dyung created this revision. dyung added a reviewer: ABataev. dyung added a subscriber: cfe-commits. This test as originally written fails when run with a compiler that defaults to a different C++ standard. This patch fixes up the test and adds testing it explicitly using c++98 and c++11. http

[PATCH] D28404: IRGen: Add optnone attribute on function during O0

2017-01-06 Thread Chandler Carruth via Phabricator via cfe-commits
chandlerc added inline comments. Comment at: clang/lib/CodeGen/CGOpenMPRuntime.cpp:760-762 Fn->removeFnAttr(llvm::Attribute::NoInline); + Fn->removeFnAttr(llvm::Attribute::OptimizeNone); Fn->addFnAttr(llvm::Attribute::AlwaysInline); At point where we are i

[PATCH] D28404: IRGen: Add optnone attribute on function during O0

2017-01-06 Thread Paul Robinson via Phabricator via cfe-commits
probinson added a comment. In https://reviews.llvm.org/D28404#638350, @mehdi_amini wrote: > In https://reviews.llvm.org/D28404#638299, @probinson wrote: > > > In https://reviews.llvm.org/D28404#638221, @mehdi_amini wrote: > > > > > In https://reviews.llvm.org/D28404#638217, @probinson wrote: > >

[PATCH] D28381: [WebAssembly] Always inline atomics

2017-01-06 Thread Jacob Gravelle via Phabricator via cfe-commits
jgravelle-google added a comment. In https://reviews.llvm.org/D28381#637915, @sunfish wrote: > Would it be difficult to enable atomic.c in Emscripten's compiler-rt build, > to define these libcalls (assuming that the problem is just that they're not > currently defined)? Tried it and it seems

[PATCH] D28385: Add a cc1 option to force disabling lifetime-markers emission from clang

2017-01-06 Thread Mehdi AMINI via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL291300: Add a cc1 option to force disabling lifetime-markers emission from clang (authored by mehdi_amini). Changed prior to commit: https://reviews.llvm.org/D28385?vs=83321&id=83443#toc Repository:

r291300 - Add a cc1 option to force disabling lifetime-markers emission from clang

2017-01-06 Thread Mehdi Amini via cfe-commits
Author: mehdi_amini Date: Fri Jan 6 17:18:09 2017 New Revision: 291300 URL: http://llvm.org/viewvc/llvm-project?rev=291300&view=rev Log: Add a cc1 option to force disabling lifetime-markers emission from clang Summary: This intended as a debugging/development flag only. Differential Revision: h

Re: [libcxx] r291275 - [libc++] Cleanup and document <__threading_support>

2017-01-06 Thread Eric Fiselier via cfe-commits
Should be fixed in r291298. Sorry for the breakage. /Eric On Fri, Jan 6, 2017 at 4:18 PM, Eric Fiselier wrote: > Hi David, > > Thanks for the information. Looking into it now. > > /Eric > > On Fri, Jan 6, 2017 at 4:02 PM, David Blaikie wrote: > >> >> >> On Fri, Jan 6, 2017 at 12:16 PM Eric Fis

[libcxx] r291298 - Fix breakage caused when _LIBCPP_HAS_THREAD_API_PTHREAD is manually defined

2017-01-06 Thread Eric Fiselier via cfe-commits
Author: ericwf Date: Fri Jan 6 17:15:16 2017 New Revision: 291298 URL: http://llvm.org/viewvc/llvm-project?rev=291298&view=rev Log: Fix breakage caused when _LIBCPP_HAS_THREAD_API_PTHREAD is manually defined Modified: libcxx/trunk/include/__config Modified: libcxx/trunk/include/__config URL

[PATCH] D28385: Add a cc1 option to force disabling lifetime-markers emission from clang

2017-01-06 Thread Chandler Carruth via Phabricator via cfe-commits
chandlerc accepted this revision. chandlerc added a comment. This revision is now accepted and ready to land. LGTM https://reviews.llvm.org/D28385 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo

Re: [libcxx] r291275 - [libc++] Cleanup and document <__threading_support>

2017-01-06 Thread Eric Fiselier via cfe-commits
Hi David, Thanks for the information. Looking into it now. /Eric On Fri, Jan 6, 2017 at 4:02 PM, David Blaikie wrote: > > > On Fri, Jan 6, 2017 at 12:16 PM Eric Fiselier via cfe-commits < > cfe-commits@lists.llvm.org> wrote: > >> Author: ericwf >> Date: Fri Jan 6 14:05:40 2017 >> New Revision

[PATCH] D28220: provide Win32 native threading

2017-01-06 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. I'm seeing the following build errors on Windows: C:\Users\Eric\workspace\libcxx\include\__threading_support(521,3): warning: cannot delete expression with pointer-to-'void' type 'void *' [-Wdelete-incomplete] delete __data; ^ ~~ C:\Users\Eric\works

[PATCH] D28404: IRGen: Add optnone attribute on function during O0

2017-01-06 Thread Mehdi AMINI via Phabricator via cfe-commits
mehdi_amini updated this revision to Diff 83441. mehdi_amini added a comment. Herald added subscribers: dschuff, jfb. Fix one more conflicts with always_inline, and change some test check lines https://reviews.llvm.org/D28404 Files: clang/include/clang/Driver/CC1Options.td clang/include/cla

r291295 - Revisit PR10177: don't instantiate a variable if it's only referenced in a

2017-01-06 Thread Richard Smith via cfe-commits
Author: rsmith Date: Fri Jan 6 16:52:53 2017 New Revision: 291295 URL: http://llvm.org/viewvc/llvm-project?rev=291295&view=rev Log: Revisit PR10177: don't instantiate a variable if it's only referenced in a dependent context and can't be used in a constant expression. Per C++ [temp.inst]p2, "the

Re: [libcxx] r291275 - [libc++] Cleanup and document <__threading_support>

2017-01-06 Thread David Blaikie via cfe-commits
On Fri, Jan 6, 2017 at 12:16 PM Eric Fiselier via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Author: ericwf > Date: Fri Jan 6 14:05:40 2017 > New Revision: 291275 > > URL: http://llvm.org/viewvc/llvm-project?rev=291275&view=rev > Log: > [libc++] Cleanup and document <__threading_support>

[PATCH] D28404: IRGen: Add optnone attribute on function during O0

2017-01-06 Thread Mehdi AMINI via Phabricator via cfe-commits
mehdi_amini updated this revision to Diff 83433. mehdi_amini added a comment. Herald added a subscriber: jholewinski. Fix minsize issue (conditional was reversed) https://reviews.llvm.org/D28404 Files: clang/include/clang/Driver/CC1Options.td clang/include/clang/Frontend/CodeGenOptions.def

[PATCH] D28404: IRGen: Add optnone attribute on function during O0

2017-01-06 Thread Mehdi AMINI via Phabricator via cfe-commits
mehdi_amini added a comment. In https://reviews.llvm.org/D28404#638299, @probinson wrote: > In https://reviews.llvm.org/D28404#638221, @mehdi_amini wrote: > > > In https://reviews.llvm.org/D28404#638217, @probinson wrote: > > > > > The patch as-is obviously has a massive testing cost, and it's ea

[PATCH] D28415: PCH: fix a regression that reports a module is defined in both pch and pcm

2017-01-06 Thread Manman Ren via Phabricator via cfe-commits
manmanren created this revision. manmanren added reviewers: rsmith, benlangmuir, doug.gregor. manmanren added a subscriber: cfe-commits. In r276159, we started to say that a module X is defined in a pch if we specify -fmodule-name when building the pch. This caused a regression that reports modul

[PATCH] D28220: provide Win32 native threading

2017-01-06 Thread Andrey Khalyavin via Phabricator via cfe-commits
halyavin added a comment. LGTM. Comment at: include/__threading_support:480 + if (!SleepConditionVariableSRW(__cv, __m, + timeout_ms.count() > 0 ? timeout_ms.count() +: 0,

[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] D26900: [cmake] Obtain LLVM_CMAKE_PATH from llvm-config

2017-01-06 Thread Michał Górny via Phabricator via cfe-commits
mgorny added a comment. In https://reviews.llvm.org/D26900#638328, @EricWF wrote: > Is there a way to write this patch so that old `llvm-config`'s continue to > work, at least for a little while until everybody upgrades? Technically it's possible but I think it would add a lot of complexity. S

[PATCH] D28315: Update tools to use new getStyle API

2017-01-06 Thread Antonio Maiorano via Phabricator via cfe-commits
amaiorano added a comment. @ioeric Okay, check-clang-tools passes with my changes. FYI, tests were originally failing for me (without my changes) because I use Git, and it's configured to convert line endings to Windows (crlf) on checkout, but some of the tools tests specify extract offsets int

[PATCH] D26900: [cmake] Obtain LLVM_CMAKE_PATH from llvm-config

2017-01-06 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. Is there a way to write this patch so that old `llvm-config`'s continue to work, at least for a little while until everybody upgrades? https://reviews.llvm.org/D26900 ___ cfe-commits mailing list cfe-commits@lists.llvm.org h

[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] D28404: IRGen: Add optnone attribute on function during O0

2017-01-06 Thread Paul Robinson via Phabricator via cfe-commits
probinson added a comment. In https://reviews.llvm.org/D28404#638221, @mehdi_amini wrote: > In https://reviews.llvm.org/D28404#638217, @probinson wrote: > > > The patch as-is obviously has a massive testing cost, and it's easy to > > imagine people being tripped up by this in the future. > > > C

[libcxx] r291286 - Add _LIBCPP_COMPILER_[CLANG|GCC|MSVC|IBM] macros.

2017-01-06 Thread Eric Fiselier via cfe-commits
Author: ericwf Date: Fri Jan 6 15:42:58 2017 New Revision: 291286 URL: http://llvm.org/viewvc/llvm-project?rev=291286&view=rev Log: Add _LIBCPP_COMPILER_[CLANG|GCC|MSVC|IBM] macros. This patch refactors the compiler detection done in `__config` by creating a set of `_LIBCPP_COMPILER_` macros. Th

[PATCH] D28362: [ThinLTO] Optionally ignore empty index file

2017-01-06 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson added a comment. In https://reviews.llvm.org/D28362#638260, @mehdi_amini wrote: > > In order to simplify distributed build system integration, where actions > > may be scheduled before the Thin Link which determines the list of > > objects selected by the linker. The gold plugin curre

[PATCH] D28362: [ThinLTO] Optionally ignore empty index file

2017-01-06 Thread Mehdi AMINI via Phabricator via cfe-commits
mehdi_amini added a comment. > In order to simplify distributed build system integration, where actions may be scheduled before the Thin Link which determines the list of objects selected by the linker. The gold plugin currently will emit 0-sized index files for objects not selected by the link,

  1   2   >