[PATCH] D37206: [ItaniumCXXABI] Always use linkonce_odr linkage for RTTI data on MinGW

2017-08-28 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo created this revision. This fixes cases where dynamic classes produced RTTI data with external linkage, producing linker errors about duplicate symbols. This touches code close to what was changed in SVN r244266, but this change doesn't break the tests added in that revision. I have

[PATCH] D37207: [libc++] Add MINGW_LIBRARIES to the linker flags

2017-08-28 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo created this revision. Herald added a subscriber: mgorny. This is essential when building with -nodefaultlibs. This is similar to what already is done in libcxxabi in SVN r302760. https://reviews.llvm.org/D37207 Files: lib/CMakeLists.txt Index: lib/CMakeLists.txt

[PATCH] D36931: Update LLVM 5.0 release notes for ms_abi and __builtin_ms_va_list for aarch64

2017-08-19 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo created this revision. Herald added subscribers: kristof.beyls, rengolin, aemerson. https://reviews.llvm.org/D36931 Files: docs/ReleaseNotes.rst Index: docs/ReleaseNotes.rst === --- docs/ReleaseNotes.rst +++

[PATCH] D36931: Update LLVM 5.0 release notes for ms_abi and __builtin_ms_va_list for aarch64

2017-08-21 Thread Martin Storsjö via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL311359: Update Clang 5.0 release notes for ms_abi and __builtin_ms_va_list for aarch64 (authored by mstorsjo). Changed prior to commit: https://reviews.llvm.org/D36931?vs=111857=112022#toc Repository:

[PATCH] D37206: [ItaniumCXXABI] Always use linkonce_odr linkage for RTTI data on MinGW

2017-08-31 Thread Martin Storsjö via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL312224: [ItaniumCXXABI] Always use linkonce_odr linkage for RTTI data on MinGW (authored by mstorsjo). Changed prior to commit: https://reviews.llvm.org/D37206?vs=113309=113367#toc Repository: rL

[PATCH] D37327: Reland r312224 - [ItaniumCXXABI] Always use linkonce_odr linkage for RTTI data on MinGW

2017-08-31 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo created this revision. This fixes cases where dynamic classes produced RTTI data with external linkage, producing linker errors about duplicate symbols. This touches code close to what was changed in SVN r244266, but this change doesn't break the tests added in that revision. The

[PATCH] D37133: [libc++] Handle object files named *.obj in merge_archives.py

2017-09-03 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. Ping https://reviews.llvm.org/D37133 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D37207: [libc++] Add MINGW_LIBRARIES to the linker flags

2017-09-03 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. Ping https://reviews.llvm.org/D37207 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D37134: [libc++] Rerun ranlib manually after merging the static libraries

2017-09-03 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. Ping https://reviews.llvm.org/D37134 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D37207: [libc++] Add MINGW_LIBRARIES to the linker flags

2017-09-04 Thread Martin Storsjö via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL312498: Add MINGW_LIBRARIES to the linker flags (authored by mstorsjo). Changed prior to commit: https://reviews.llvm.org/D37207?vs=112873=113787#toc Repository: rL LLVM

[PATCH] D37133: [libc++] Handle object files named *.obj in merge_archives.py

2017-09-04 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. Do you have any pointers on how to do it with CMake? https://reviews.llvm.org/D37133 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D37133: [libc++] Handle object files named *.obj in merge_archives.py

2017-09-04 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. In https://reviews.llvm.org/D37133#860563, @compnerd wrote: > `$` should give you the `.o` or `.obj` > files used to construct the library. I guess that would only work if they're built all as part of the same CMake invocation?

[PATCH] D37206: [ItaniumCXXABI] Always use linkonce_odr linkage for RTTI data on MinGW

2017-08-30 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added inline comments. Comment at: lib/CodeGen/ItaniumCXXABI.cpp:2990-2993 + bool IsMinGW = + CGM.getContext().getTargetInfo().getTriple().getEnvironment() == + llvm::Triple::GNU && +

[PATCH] D37327: Reland r312224 - [ItaniumCXXABI] Always use linkonce_odr linkage for RTTI data on MinGW

2017-09-01 Thread Martin Storsjö via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL312306: Reland r312224 - [ItaniumCXXABI] Always use linkonce_odr linkage for RTTI data… (authored by mstorsjo). Changed prior to commit: https://reviews.llvm.org/D37327?vs=113380=113511#toc

[PATCH] D37468: [libc++] Redirect strftime_l to the locale-ignorant strftime on mingw

2017-09-05 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo created this revision. _strftime_l is only available in the numbered msvcrt versions (starting from msvcr80.dll). In the default configuration, mingw targets the unversioned msvcrt.dll - and there, _strftime_l is not available (not even on windows 10). If __MSVCRT_VERSION__ is set to

[PATCH] D38679: [libunwind] Support dwarf unwinding on i386 windows

2017-10-09 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added inline comments. Comment at: src/AddressSpace.hpp:521 unw_word_t *offset) { -#ifndef _LIBUNWIND_IS_BAREMETAL +#if !defined(_LIBUNWIND_IS_BAREMETAL) && !defined(_WIN32) Dl_info dyldInfo; mstorsjo

[PATCH] D38679: [libunwind] Support dwarf unwinding on i386 windows

2017-10-09 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo updated this revision to Diff 118263. mstorsjo added a comment. Added a fixme comment about the truncated section name, flipped the ifdef in the assembly source. Didn't implement findFunctionName. https://reviews.llvm.org/D38679 Files: docs/index.rst src/AddressSpace.hpp

[PATCH] D38679: [libunwind] Support dwarf unwinding on i386 windows

2017-10-09 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added inline comments. Comment at: docs/index.rst:53 NetBSD x86_64 Clang, GCC DWARF CFI +Windows i386 ClangDWARF CFI Any i386, x86_64, ARMClangSjLj FWIW, for this to actually work

[PATCH] D38704: [libunwind] Emulate pthread rwlocks via SRW locks for windows

2017-10-09 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo created this revision. Herald added a subscriber: mehdi_amini. This makes sure that the FDE cache is thread safe. This requires building with `_WIN32_WINNT >= 0x0600`. The alternative would be to skip the FDE cache altogether if building without threads.

[PATCH] D38704: [libunwind] Emulate pthread rwlocks via SRW locks for windows

2017-10-09 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. In https://reviews.llvm.org/D38704#892479, @zturner wrote: > I'm a little nervous about re-inventing a poor man's version of a reader > writer lock. Can we not just copy LLVM's? I guess I could have a look to see how much extra either kitchen sink it would bring.

[PATCH] D38680: [libunwind] Fix handling of DW_CFA_GNU_args_size

2017-10-09 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. In https://reviews.llvm.org/D38680#892487, @compnerd wrote: > I think that the problem is that we are using the generic register name, but > we need to use the target specific register name. On x86, EIP/ESP are > swapped. You mean EBP/ESP? I think the code here

[PATCH] D38821: [COFF, ARM64] Add MS builtins __dmb, __dsb, __isb

2017-10-11 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo created this revision. Herald added subscribers: kristof.beyls, javed.absar, aemerson. This is an update to https://reviews.llvm.org/D36111 by @mgrang, taking over finishing of this patch. Compared to his version, this makes the intrinsics conditional to ALL_MS_LANGUAGES.

[PATCH] D38819: [libunwind] Add support for dwarf unwinding on windows on x86_64

2017-10-11 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. As further explanation/justification - libcxxabi and libunwind don't support SEH exceptions yet. https://reviews.llvm.org/D38819 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D38821: [COFF, ARM64] Add MS builtins __dmb, __dsb, __isb

2017-10-11 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. In https://reviews.llvm.org/D38821#895527, @compnerd wrote: > Don't you need a change to the intrinsics to actually map the builtin? Apparently, this change is all that's needed since the tests pass. I can of course try to look closer and see what actually makes it

[PATCH] D38680: [libunwind] Fix handling of DW_CFA_GNU_args_size

2017-10-11 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added inline comments. Comment at: src/libunwind.cpp:188 + co->getInfo(); + pint_t orgArgSize = (pint_t)info.gp; + uint64_t orgFuncStart = info.start_ip; rnk wrote: > I think it makes sense to have this here: the contract is that if the

[PATCH] D38821: [COFF, ARM64] Add MS builtins __dmb, __dsb, __isb

2017-10-12 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. In https://reviews.llvm.org/D38821#895527, @compnerd wrote: > Don't you need a change to the intrinsics to actually map the builtin? This seems to be automatically mapped via this piece of code in CGBuiltin.cpp: // See if we have a target specific intrinsic.

[PATCH] D38821: [COFF, ARM64] Add MS builtins __dmb, __dsb, __isb

2017-10-12 Thread Martin Storsjö via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL315567: [COFF, ARM64] Add MS builtins __dmb, __dsb, __isb (authored by mstorsjo). Changed prior to commit: https://reviews.llvm.org/D38821?vs=118689=118747#toc Repository: rL LLVM

[PATCH] D38679: [libunwind] Support dwarf unwinding on i386 windows

2017-10-11 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. In https://reviews.llvm.org/D38679#894668, @jroelofs wrote: > LGTM Thanks, will push this one without the docs update since it's still buggy in practice on windows until https://reviews.llvm.org/D38680 gets resolved. https://reviews.llvm.org/D38679

[PATCH] D36111: [COFF, ARM64] Add MS builtins __dmb, __dsb, __isb

2017-10-11 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. In https://reviews.llvm.org/D36111#895084, @mgrang wrote: > Sorry, I never got to complete this as I moved to other priorities. I do not > think I have cycles to do this now. Please feel free to take over this patch > :) Ok - will do! Thanks for letting me know!

[PATCH] D38679: [libunwind] Support dwarf unwinding on i386 windows

2017-10-11 Thread Martin Storsjö via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL315498: Support DWARF unwinding on i386 windows (authored by mstorsjo). Changed prior to commit: https://reviews.llvm.org/D38679?vs=118263=118673#toc Repository: rL LLVM

[PATCH] D38819: [libunwind] Add support for dwarf unwinding on windows on x86_64

2017-10-11 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo created this revision. Herald added a subscriber: aprantl. Clang doesn't currently support building for windows/x86_64 with dwarf by setting command line parameters, but if manually modified to use dwarf, we can make libunwind work in this configuration as well. Even if support for

[PATCH] D38290: Add a ld64.lld alias for the MACHO LLD target

2017-09-27 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added inline comments. Comment at: tools/clang/lib/Driver/ToolChain.cpp:394 +llvm::SmallString<8> LinkerName; +if(Triple.isOSDarwin()) + LinkerName.append("ld64."); Space between `if` and `(` Repository: rL LLVM

[PATCH] D38679: [libunwind] Support dwarf unwinding on i386 windows

2017-10-10 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. Are there any further comments on this, or can someone of those who commented on it before approve it? https://reviews.llvm.org/D38679 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D38819: [libunwind] Add support for dwarf unwinding on windows on x86_64

2017-10-23 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added inline comments. Comment at: src/UnwindRegistersRestore.S:98 + # skip fs + # skip gs + movq 56(%rcx), %rsp # cut back rsp to new location rnk wrote: > mstorsjo wrote: > > mstorsjo wrote: > > > compnerd wrote: > > > > Doesn't Win64 ABI require

[PATCH] D39206: [libunwind] Add missing checks for register number

2017-10-23 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo created this revision. Herald added a subscriber: JDevlieghere. Most other cases that touch `savedRegisters[reg]` have got this check, but these three seemed to lack it. https://reviews.llvm.org/D39206 Files: src/DwarfParser.hpp Index: src/DwarfParser.hpp

[PATCH] D38819: [libunwind] Add support for dwarf unwinding on windows on x86_64

2017-10-23 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added inline comments. Comment at: src/UnwindRegistersRestore.S:98 + # skip fs + # skip gs + movq 56(%rcx), %rsp # cut back rsp to new location mstorsjo wrote: > compnerd wrote: > > Doesn't Win64 ABI require some of the MMX registers be

[PATCH] D39156: [libunwind] Make HIDDEN_DIRECTIVE a function-like macro. NFCI.

2017-10-22 Thread Martin Storsjö via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL316300: Make HIDDEN_DIRECTIVE a function-like macro. NFCI. (authored by mstorsjo). Changed prior to commit: https://reviews.llvm.org/D39156?vs=119740=119792#toc Repository: rL LLVM

[PATCH] D39127: Fix template parameter default args missed if redecled

2017-10-22 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added inline comments. Comment at: lib/Sema/SemaTemplate.cpp:4811 + TemplateParameterList *Params = + cast(Template->getMostRecentDecl()) + ->getTemplateParameters(); erichkeane wrote: > mstorsjo wrote: > > How does this work if there's

[PATCH] D39206: [libunwind] Add missing checks for register number

2017-10-24 Thread Martin Storsjö via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL316415: Add missing checks for register number (authored by mstorsjo). Changed prior to commit: https://reviews.llvm.org/D39206?vs=119940=120001#toc Repository: rL LLVM

[PATCH] D39206: [libunwind] Add missing checks for register number

2017-10-24 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. In https://reviews.llvm.org/D39206#904723, @compnerd wrote: > I'd say out of range rather than too big. Ok, pushing with the message changed to out of range, and actually printing the value. Repository: rL LLVM https://reviews.llvm.org/D39206

[PATCH] D38704: [libunwind] Abstract rwlocks into a class, provide a SRW lock implementation for windows

2017-10-23 Thread Martin Storsjö via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL316364: Abstract rwlocks into a class, provide a SRW lock implementation for windows (authored by mstorsjo). Changed prior to commit: https://reviews.llvm.org/D38704?vs=119094=119914#toc Repository:

[PATCH] D36111: [COFF, ARM64] Add MS builtins __dmb, __dsb, __isb

2017-10-24 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo abandoned this revision. mstorsjo added a comment. This was updated, finished and merged in https://reviews.llvm.org/D38821. https://reviews.llvm.org/D36111 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D39673: Toolchain: Normalize dwarf, sjlj and seh eh

2017-11-15 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added inline comments. Comment at: lib/Frontend/InitPreprocessor.cpp:683 + if (LangOpts.SEHExceptions) +Builder.defineMacro("__SEH__"); Please define `__ARM_DWARF_EH__` if dwarf is enabled on arm, see D39533, as I commented earlier. (Sorry, I

[PATCH] D39918: [libunwind] Remove a FIXME about truncated section names

2017-11-13 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. In https://reviews.llvm.org/D39918#923070, @ruiu wrote: > Actually I don't have a strong opinion on that topic. It seems like just > truncating the section name to ".eh_fram" at the linker is good enough, but > how much important is the compatibility with GNU ld?

[PATCH] D39918: [libunwind] Remove a FIXME about truncated section names

2017-11-13 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. In https://reviews.llvm.org/D39918#923059, @ruiu wrote: > I think this is the right thing to do, but I'd defer it to libunwind's owner > to approve the patch. Removing the comment that is? Yes, since it's probably impossible to implement. Do you have any suggestion

[PATCH] D40181: [libcxx] Allow to set locale on Windows.

2017-11-23 Thread Martin Storsjö via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL318902: Allow to set locale on Windows. (authored by mstorsjo). Changed prior to commit: https://reviews.llvm.org/D40181?vs=123923=124055#toc Repository: rL LLVM https://reviews.llvm.org/D40181

[PATCH] D39673: Toolchain: Normalize dwarf, sjlj and seh eh

2017-11-28 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added inline comments. Comment at: cfe/trunk/lib/Driver/ToolChains/FreeBSD.cpp:368 +getTriple().getArch() == llvm::Triple::thumb) + return llvm::ExceptionHandling::SjLj; case llvm::Triple::GNUEABIHF: This seems to need a fallthrough

[PATCH] D39673: Toolchain: Normalize dwarf, sjlj and seh eh

2017-11-28 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added inline comments. Comment at: cfe/trunk/lib/Driver/ToolChain.cpp:457 + if (Triple.isOSWindows()) +return llvm::ExceptionHandling::WinEH; + return llvm::ExceptionHandling::None; It looks like this broke some buildbot after all - see e.g.

[PATCH] D39673: Toolchain: Normalize dwarf, sjlj and seh eh

2017-11-28 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added inline comments. Comment at: lib/Driver/ToolChain.cpp:458 +if (Triple.getArch() == llvm::Triple::x86) + return llvm::ExceptionHandling::DwarfCFI; +else I'd suggest braces around the outer if statement. But is there any point to this

[PATCH] D40181: [libcxx] Allow to set locale on Windows.

2017-11-22 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo accepted this revision. mstorsjo added a comment. LGTM, thanks for updating it! https://reviews.llvm.org/D40181 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D39673: Toolchain: Normalize dwarf, sjlj and seh eh

2017-11-22 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo accepted this revision. mstorsjo added a comment. Looks really good to me now! @rnk? Repository: rL LLVM https://reviews.llvm.org/D39673 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D41386: [libunwind][PPC64] Port to ppc64le - initial version

2017-12-19 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added inline comments. Comment at: include/__libunwind_config.h:46 +# define _LIBUNWIND_CURSOR_SIZE 148 +# define _LIBUNWIND_HIGHEST_DWARF_REGISTER 110 # elif defined(__ppc__) Don't hardcode a number here; add a define

[PATCH] D41386: [libunwind][PPC64] Port to ppc64le - initial version

2017-12-19 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. No further comments from my side, but it'd be good if @compnerd could have a look as well. https://reviews.llvm.org/D41386 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D39673: Toolchain: Normalize dwarf, sjlj and seh eh

2017-11-17 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. https://reviews.llvm.org/D39533 was committed now, so before committing, make sure that the `__ARM_DWARF_EH__` (that was added in that commit) only gets set while dwarf is enabled (which now is the default for mingw/arm but not msvc/arm). Repository: rL LLVM

[PATCH] D39918: [libunwind] Remove a FIXME about truncated section names

2017-11-16 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. @rnk I guess this is ok now as https://reviews.llvm.org/D40025 is committed and done? https://reviews.llvm.org/D39918 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D39533: [MinGW] Define __ARM_DWARF_EH__ on MinGW/ARM

2017-11-17 Thread Martin Storsjö via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL318511: [MinGW] Define __ARM_DWARF_EH__ for MinGW/ARM (authored by mstorsjo). Changed prior to commit: https://reviews.llvm.org/D39533?vs=121244=123298#toc Repository: rL LLVM

[PATCH] D39918: [libunwind] Remove a FIXME about truncated section names

2017-11-10 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo created this revision. Herald added a subscriber: aprantl. If the linker chose to store the full section name instead of truncating it, this field doesn't contain a truncated name, but an offset into the string table of the binary. The string table isn't loaded/mapped into memory

[PATCH] D38680: [libunwind] Fix handling of DW_CFA_GNU_args_size

2017-11-14 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. Ping @joerg https://reviews.llvm.org/D38680 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D39673: Toolchain: Normalize dwarf, sjlj and seh eh

2017-11-20 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. In https://reviews.llvm.org/D39673#929536, @martell wrote: > When doing that I noticed there is something really strange about the > existing macro defines. I assume they should only be defined when exceptions > is enabled. > This is by default in c++ mode of with

[PATCH] D39673: Toolchain: Normalize dwarf, sjlj and seh eh

2017-11-20 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added inline comments. Comment at: lib/Frontend/InitPreprocessor.cpp:684 +else if (TI.getTriple().isThumb() || TI.getTriple().isARM()) + Builder.defineMacro("__ARM_DWARF_EH__"); + } martell wrote: > mstorsjo wrote: > > Won't this start setting

[PATCH] D40181: [libcxx] Allow to set locale on Windows.

2017-11-20 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. In order to make this work with MinGW (more or less), I had to change the `_LIBCPP_MSVCRT` into `_LIBCPP_MSVCRT_LIKE` both in `include/__locale` and in `include/__config` (where `_LIBCPP_LOCALE__L_EXTENSIONS` is defined). Normal mingw that uses msvcrt.dll doesn't have

[PATCH] D40181: [libcxx] Allow to set locale on Windows.

2017-11-20 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. In https://reviews.llvm.org/D40181#930602, @EricWF wrote: > This LGTM. I would love if another party interested in Windows could review > it though. I can test this in a MinGW context and see if what it uses happens to be available there or not.

[PATCH] D40285: [MS] AARCH64 cleanup default WIN macros

2017-11-21 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. > WIN32 and WIN64 are not real definitions they are typically defined by the > system headers, _WIN32 and _WIN64 are the compiler definitions. Almost. In MSVC, WIN32 and WIN64 are never defined by the compiler, neither by system headers. Project files created by the

[PATCH] D40285: [MS] AARCH64 cleanup default WIN macros

2017-11-21 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. ... so in general I wouldn't mind doing a change like this, but I'd like to make it consistent on ARM, i386 and x86_64 at the same time in that case, instead of just changing aarch64. Repository: rL LLVM https://reviews.llvm.org/D40285

[PATCH] D40285: [MS] AARCH64 cleanup default WIN macros

2017-11-21 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. In https://reviews.llvm.org/D40285#931242, @martell wrote: > The easy one is to get rid of WIN64 because gcc doesn't even do that for > mingw. Yes it does, it behaves just the same as WIN32: $ x86_64-w64-mingw32-gcc -E -dM - < /dev/null | grep WIN64 #define

[PATCH] D40285: [MINGW] normalize WIN32 macros

2017-11-21 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo accepted this revision. mstorsjo added a comment. This revision is now accepted and ready to land. LGTM Comment at: test/Preprocessor/predefined-macros.c:200 +// CHECK-X86-WIN: #define _WIN32 1 +// CHECK-X86-WIN-NOT: #define _WIN64 1 +// CHECK-X86-WIN-NOT: #define

[PATCH] D40285: [MINGW] normalize WIN32 macros

2017-11-21 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo accepted this revision. mstorsjo added a comment. LGTM Repository: rL LLVM https://reviews.llvm.org/D40285 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D39673: Toolchain: Normalize dwarf, sjlj and seh eh

2017-11-19 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added inline comments. Comment at: lib/Frontend/InitPreprocessor.cpp:684 +else if (TI.getTriple().isThumb() || TI.getTriple().isARM()) + Builder.defineMacro("__ARM_DWARF_EH__"); + } Won't this start setting this define also on platforms where

[PATCH] D39673: Toolchain: Normalize dwarf, sjlj and seh eh

2017-11-21 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. No objection from me about committing this now, although I have some minor comments (that possibly can be taken care of without reposting and re-reviewing). Still ok with @rnk? Comment at: lib/Frontend/InitPreprocessor.cpp:686 + else if

[PATCH] D40323: [libcxx] Remove a broken win32 locale function redirection

2017-11-21 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo created this revision. One can't replace vsscanf(_l) with a sscanf(_l) that doesn't take a va_list. This has been untouched since it was added in SVN r140728, so apparently it hasn't been used since. One reason for this mistake originally might have been that there was no _vsscanf_l

[PATCH] D40323: [libcxx] Remove a broken win32 locale function redirection

2017-11-21 Thread Martin Storsjö via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL318810: Remove a broken win32 locale function redirection (authored by mstorsjo). Changed prior to commit: https://reviews.llvm.org/D40323?vs=123851=123852#toc Repository: rL LLVM

[PATCH] D39918: [libunwind] Remove a FIXME about truncated section names

2017-11-16 Thread Martin Storsjö via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL318446: Remove a FIXME about truncated section names (authored by mstorsjo). Changed prior to commit: https://reviews.llvm.org/D39918?vs=122498=123223#toc Repository: rL LLVM

[PATCH] D39632: [libunwind] [docs] Mention that dwarf unwinding should be supported on arm64/windows

2017-11-15 Thread Martin Storsjö via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL318383: [docs] Mention that dwarf unwinding should be supported on arm64/windows (authored by mstorsjo). Changed prior to commit: https://reviews.llvm.org/D39632?vs=121601=123130#toc Repository: rL

[PATCH] D39631: [X86] Add 3dnow and 3dnowa to the list of valid target features

2017-11-04 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo created this revision. These were missed in SVN r316783, which broke compiling mingw-w64 CRT. https://reviews.llvm.org/D39631 Files: lib/Basic/Targets/X86.cpp test/Headers/mm3dnow.c Index: test/Headers/mm3dnow.c ===

[PATCH] D39631: [X86] Fix the spelling of 3dnow and 3dnowa in isValidFeatureName

2017-11-05 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo updated this revision to Diff 121623. mstorsjo retitled this revision from "[X86] Add 3dnow and 3dnowa to the list of valid target features" to "[X86] Fix the spelling of 3dnow and 3dnowa in isValidFeatureName". mstorsjo edited the summary of this revision. mstorsjo added a comment.

[PATCH] D38680: [libunwind] Fix handling of DW_CFA_GNU_args_size

2017-11-06 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. In https://reviews.llvm.org/D38680#903203, @joerg wrote: > I've looked at this in some detail now. I'm not exactly sure yet why it is > broken. The patch seems quite wrong to me. DW_CFA_GNU_args_size should be > applied only when unwinding a call instruction and that

[PATCH] D39631: [X86] Fix the spelling of 3dnow and 3dnowa in isValidFeatureName

2017-11-06 Thread Martin Storsjö via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL317504: [X86] Add 3dnow and 3dnowa to the list of valid target features (authored by mstorsjo). Changed prior to commit: https://reviews.llvm.org/D39631?vs=121623=121766#toc Repository: rL LLVM

[PATCH] D39534: [libunwind] Add ifdefs around ELF specific parts of UnwindRegisters*.S for ARM

2017-11-02 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added inline comments. Comment at: src/UnwindRegistersRestore.S:396 .fpu vfpv3-d16 +#endif DEFINE_LIBUNWIND_PRIVATE_FUNCTION(_ZN9libunwind13Registers_arm19restoreVFPWithFLDMDEPy) compnerd wrote: > This really isn't an ELF vs COFF/Mach-O thing.

[PATCH] D39251: [libunwind] Fix building for ARM with dwarf exception handling

2017-11-02 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added inline comments. Comment at: src/Registers.hpp:1481 + mutable uint32_t _iwmmx_control[4]; #endif }; compnerd wrote: > Why the change to mark these as mutable? These are touched from within `getRegister`, but we need to make `getRegister` const

[PATCH] D39251: [libunwind] Fix building for ARM with dwarf exception handling

2017-11-02 Thread Martin Storsjö via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL317192: Fix building for ARM with dwarf exception handling (authored by mstorsjo). Changed prior to commit: https://reviews.llvm.org/D39251?vs=120863=121242#toc Repository: rL LLVM

[PATCH] D39534: [libunwind] Add ifdefs around ELF specific parts of UnwindRegisters*.S for ARM

2017-11-02 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo created this revision. Herald added subscribers: kristof.beyls, aprantl, aemerson. This allows using dwarf exceptions on MinGW/ARM. This goes together with https://reviews.llvm.org/D39532 in LLVM and https://reviews.llvm.org/D39533 in clang. https://reviews.llvm.org/D39534 Files:

[PATCH] D39673: Toolchain: Normalize dwarf, sjlj and seh eh

2017-11-07 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. In https://reviews.llvm.org/D39673#917524, @martell wrote: > I mostly expect this to be useful where environment has builds all 3 versions > of the libunwind. where the library is named differently based on the eh > model. > e.g. `libunwind-sjlj.a` `libunwind-seh.a`

[PATCH] D39673: Toolchain: Normalize dwarf, sjlj and seh eh

2017-11-06 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. In https://reviews.llvm.org/D39673#917506, @martell wrote: > @mstorsjo I think this should help with issues like having to set the default > for ARM to DWARF. Btw, in addition to making setting `__SEH__` conditional, it should also instead set `__ARM_DWARF_EH__` on

[PATCH] D39673: Toolchain: Normalize dwarf, sjlj and seh eh

2017-11-06 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. In https://reviews.llvm.org/D39673#917506, @martell wrote: > @mstorsjo I think this should help with issues like having to set the default > for ARM to DWARF. > If you can set it at run time then it should be a lot easier to just set > that in the clang wrapper

[PATCH] D39533: [MinGW] Define __ARM_DWARF_EH__ on MinGW/ARM

2017-11-02 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo created this revision. Herald added subscribers: kristof.beyls, javed.absar, aemerson. This should go together with https://reviews.llvm.org/D39532 in LLVM. https://reviews.llvm.org/D39533 Files: lib/Basic/Targets/ARM.cpp test/Preprocessor/init.c Index: test/Preprocessor/init.c

[PATCH] D39534: [libunwind] Add ifdefs around ELF specific parts of UnwindRegisters*.S for ARM

2017-11-03 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added inline comments. Comment at: src/UnwindRegistersRestore.S:396 .fpu vfpv3-d16 +#endif DEFINE_LIBUNWIND_PRIVATE_FUNCTION(_ZN9libunwind13Registers_arm19restoreVFPWithFLDMDEPy) mstorsjo wrote: > compnerd wrote: > > This really isn't an ELF vs

[PATCH] D39534: [libunwind] Add ifdefs around ELF specific parts of UnwindRegisters*.S for ARM

2017-11-04 Thread Martin Storsjö via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL317423: Add ifdefs around ELF specific parts of UnwindRegisters*.S for arm (authored by mstorsjo). Changed prior to commit: https://reviews.llvm.org/D39534?vs=121245=121600#toc Repository: rL LLVM

[PATCH] D39632: [libunwind] [docs] Mention that dwarf unwinding should be supported on arm64/windows

2017-11-04 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo created this revision. Herald added subscribers: kristof.beyls, aemerson. This didn't require any further changes to libunwind as long as win64 in general is handled correctly. https://reviews.llvm.org/D39632 Files: docs/index.rst Index: docs/index.rst

[PATCH] D39534: [libunwind] Add ifdefs around ELF specific parts of UnwindRegisters*.S for ARM

2017-11-04 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. In https://reviews.llvm.org/D39534#915935, @jroelofs wrote: > In https://reviews.llvm.org/D39534#915920, @mstorsjo wrote: > > > In https://reviews.llvm.org/D39534#915916, @compnerd wrote: > > > > > Very well, if thats the current implementation in the AsmParser, thats

[PATCH] D39534: [libunwind] Add ifdefs around ELF specific parts of UnwindRegisters*.S for ARM

2017-11-04 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. In https://reviews.llvm.org/D39534#915938, @jroelofs wrote: > i.e. should this be keyed off of `__ARM_EABI__` instead? I'm not really sure. As I quoted earlier, the exact case for enabling these directives in the LLVM codebase right now is `(!IsMachO && !IsCOFF)`.

[PATCH] D39534: [libunwind] Add ifdefs around ELF specific parts of UnwindRegisters*.S for ARM

2017-11-04 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. In https://reviews.llvm.org/D39534#915916, @compnerd wrote: > Very well, if thats the current implementation in the AsmParser, thats > reasonable. I don't think that the directive has anything to do with the > file format though. I can agree with that. In addition

[PATCH] D39631: [X86] Add 3dnow and 3dnowa to the list of valid target features

2017-11-04 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. In https://reviews.llvm.org/D39631#915943, @craig.topper wrote: > Can we just add -Werror to test/CodeGen/3dnow-builtins.c to test this? That file actually already has got `-Werror` > I believe it should be throwing a warning currently. It doesn't. That test

[PATCH] D39382: [libunwind] Restore arch specific lastDwarfRegNum in builds without _LIBUNWIND_IS_NATIVE_ONLY

2017-10-28 Thread Martin Storsjö via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL316843: Restore arch specific lastDwarfRegNum in builds without… (authored by mstorsjo). Changed prior to commit: https://reviews.llvm.org/D39382?vs=120679=120736#toc Repository: rL LLVM

[PATCH] D38110: [libunwind][MIPS]: Add support for unwinding in O32 and N64 processes.

2017-10-30 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. Just a heads up WRT this patch; we're discussing changing the size of `unw_word_t` to match `uintptr_t` in https://reviews.llvm.org/D39365. Does that break anything for your case? It shouldn't affect what's stored in the Register class, only pointers in the

[PATCH] D39365: [libunwind] Change unw_word_t to always have the same size as the pointer size

2017-10-30 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. In https://reviews.llvm.org/D39365#910590, @theraven wrote: > This makes things worse for us. On CHERI, `[u]intptr_t` is a (`typedef` for > a) built-in type that can hold a capability. Having `unw_word_t` be > `uintptr_t` For understanding, I guess you meant

[PATCH] D39365: [libunwind] Change unw_word_t to always have the same size as the pointer size

2017-10-30 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. In https://reviews.llvm.org/D39365#910713, @theraven wrote: > Sorry - it looks as if I read the diff back to front. I seem to be less > awake than I thought today... > > Reading the diff the correct way around, this seems like a definite > improvement. Ok, thanks!

[PATCH] D38819: [libunwind] Add support for dwarf unwinding on windows on x86_64

2017-10-25 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added inline comments. Comment at: src/UnwindRegistersRestore.S:72 + movq 56(%rcx), %rax # rax holds new stack pointer + subq $16, %rax + movq %rax, 56(%rcx) mstorsjo wrote: > compnerd wrote: > > Hmm, why is this `$16`? The `$rsp` was adjusted by

[PATCH] D38819: [libunwind] Add support for dwarf unwinding on windows on x86_64

2017-10-26 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo updated this revision to Diff 120380. mstorsjo added a comment. Simplified the assembly by sharing much more code between the unix and win64 paths, added a padding element to ensure more stable struct packing. https://reviews.llvm.org/D38819 Files: docs/index.rst

[PATCH] D39251: [libunwind] Fix building for ARM with dwarf exception handling

2017-10-24 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo created this revision. Herald added subscribers: kristof.beyls, aprantl, aemerson. The previous definition of _LIBUNWIND_HIGHEST_DWARF_REGISTER seems to be a copy of the ARM64 value (introduced in SVN r276128); since the code actually hasn't compiled properly for arm in dwarf mode

[PATCH] D39251: [libunwind] Fix building for ARM with dwarf exception handling

2017-10-24 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. In https://reviews.llvm.org/D39251#906110, @compnerd wrote: > Whats the motivation for adding DWARF based unwinding on ARM? What > environment is using this? AFAIK NetBSD does. And my actual target is for MinGW/ARM; it seemed to be less effort to make libunwind

<    1   2   3   4   5   6   7   8   9   10   >