[PATCH] D50144: Add Windows support for the GNUstep Objective-C ABI V2.

2018-08-14 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd added inline comments. Comment at: lib/AST/MicrosoftMangle.cpp:1886 case BuiltinType::ObjCId: -mangleArtificalTagType(TTK_Struct, "objc_object"); +mangleArtificalTagType(TTK_Struct, ".objc_object"); break; DHowett-MSFT wrote: > I'm intere

[PATCH] D46971: [DWARF] Get RA from RA register even if it appears unused

2018-05-29 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd added a comment. It would be nice if we had a test case added for this, but, seems correct to me. Comment at: src/DwarfInstructions.hpp:195 } +else if (i == (int)cieInfo.returnAddressRegister) + returnAddress = registers.getRegister(i); --

[PATCH] D46791: Make -gsplit-dwarf generally available

2018-05-29 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd added inline comments. Comment at: test/Driver/split-debug.c:23 +// Macosx // RUN: %clang -target x86_64-macosx -gsplit-dwarf -c -### %s 2> %t NIT: macOS or the legacy spelling of Mac OS X. https://reviews.llvm.org/D46791

[PATCH] D38249: [libunwind] Skip building unused parts when targeting SJLJ

2017-09-26 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd accepted this revision. compnerd added inline comments. This revision is now accepted and ready to land. Comment at: src/libunwind.cpp:27 +#ifndef __USING_SJLJ_EXCEPTIONS__ #include "AddressSpace.hpp" I would prefer that you used: #if !defined(__

[PATCH] D38250: [libunwind] Implement the Get/SetTopOfFunctionStack functions via a __thread TLS variable

2017-09-26 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd requested changes to this revision. compnerd added a comment. This revision now requires changes to proceed. I have a complete implementation for this which is known to work on Windows at least. The only thing that `__thread` requires is a working linker (which does not include binutil

[PATCH] D37905: [libclang, bindings]: add spelling location

2017-09-27 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd requested changes to this revision. compnerd added a comment. This revision now requires changes to proceed. If I'm not mistaken, the change just means that the python bindings need a "newer" libclang, libclang's interfaces don't really change. I think that is acceptable. ==

[PATCH] D37905: [libclang, bindings]: add spelling location

2017-09-28 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd accepted this revision. compnerd added inline comments. This revision is now accepted and ready to land. Comment at: bindings/python/clang/cindex.py:320 +return self._get_spelling()['offset'] def __eq__(self, other): frutiger wrote: > comp

[PATCH] D38381: [libunwind] Skip building x86 parts of UnwindRegisters*.S when targeting SjLj

2017-09-28 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd accepted this revision. compnerd added a comment. This revision is now accepted and ready to land. I really wish that there was a way to handle this in the build system instead. https://reviews.llvm.org/D38381 ___ cfe-commits mailing list c

[PATCH] D38380: [libunwind] Add CMake support for building for MinGW

2017-09-28 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd added a comment. With an explanation of the `gcc_s` vs `gcc`, I think this LG. Comment at: cmake/config-ix.cmake:38 +else () + set(MINGW_RUNTIME gcc_s gcc) +endif() This seems really weird. `gcc_s` and `gcc` are the same library, the form

[PATCH] D38250: [libunwind] Implement the Get/SetTopOfFunctionStack functions via a __thread TLS variable

2017-09-28 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd added a comment. Ugh, I was mixing up `_Unwind_SjLj_Register` with this function. Comment at: src/Unwind-sjlj.c:468 +#ifndef __APPLE__ +__thread struct _Unwind_FunctionContext *stack = NULL; I would prefer: #if !defined(__APPLE__)

[PATCH] D38250: [libunwind] Implement the Get/SetTopOfFunctionStack functions via a __thread TLS variable

2017-10-01 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd accepted this revision. compnerd added inline comments. This revision is now accepted and ready to land. Comment at: src/Unwind-sjlj.c:481 +#endif // !defined(__APPLE__) + #endif // defined(_LIBUNWIND_BUILD_SJLJ_APIS) mstorsjo wrote: > compnerd wrote: >

[PATCH] D38250: [libunwind] Implement the Get/SetTopOfFunctionStack functions via a __thread TLS variable

2017-10-01 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd requested changes to this revision. compnerd added a comment. This revision now requires changes to proceed. Actually, Ill go ahead and make the more invasive change and that will provide this properly. https://reviews.llvm.org/D38250 ___

[PATCH] D38250: [libunwind] Implement the Get/SetTopOfFunctionStack functions via a __thread TLS variable

2017-10-01 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd added a comment. I believe that SVN r314632 should address the issue more thorougly. https://reviews.llvm.org/D38250 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D38522: [libc++] Support Microsoft ABI without vcruntime headers

2017-10-03 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd added a comment. Why do we expect the tests to fail without vcruntime headers? Comment at: src/support/runtime/exception_msvc.ipp:31 +extern "C" { +typedef void(__CRTDECL* terminate_handler)(); +_ACRTIMP terminate_handler __cdecl set_terminate( Really?

[PATCH] D37891: Driver: hoist the `wchar_t` handling to the driver

2017-10-05 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd updated this revision to Diff 117832. compnerd added a comment. Moves the logic back into Basic. The flags are now optional, but controlled by the driver. The test adjustments are to map the old `-fshort-wchar` to `-fwchar-type=short -fno-signed-wchar` for the most part, there is one

[PATCH] D37891: Driver: hoist the `wchar_t` handling to the driver

2017-10-05 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd added inline comments. Comment at: lib/Basic/TargetInfo.cpp:29 +namespace { +TargetInfo::IntType GetDefaultWCharType(const llvm::Triple &T) { + const llvm::Triple::ArchType Arch = T.getArch(); rnk wrote: > How is this better than what we had before? It'

[PATCH] D37891: Driver: hoist the `wchar_t` handling to the driver

2017-10-06 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd updated this revision to Diff 118085. compnerd added a comment. Split the defaulting back to all the various targets. Repository: rL LLVM https://reviews.llvm.org/D37891 Files: include/clang/Basic/DiagnosticFrontendKinds.td include/clang/Basic/LangOptions.def include/clang/Dri

[PATCH] D37891: Driver: hoist the `wchar_t` handling to the driver

2017-10-06 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd added inline comments. Comment at: lib/Basic/Targets/AArch64.cpp:47-51 + bool IsNetBSD = getTriple().getOS() == llvm::Triple::NetBSD; + bool IsOpenBSD = getTriple().getOS() == llvm::Triple::OpenBSD; + if (!getTriple().isOSDarwin() && !IsNetBSD && !IsOpenBSD) +WCha

[PATCH] D37891: Driver: hoist the `wchar_t` handling to the driver

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

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

2017-10-09 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd requested changes to this revision. compnerd added a comment. This revision now requires changes to proceed. 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. We should also have

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

2017-10-11 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd added a comment. Don't you need a change to the intrinsics to actually map the builtin? https://reviews.llvm.org/D38821 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2017-10-14 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd added inline comments. Comment at: include/unwind.h:125 uintptr_t private_2; // holds sp that phase1 found for phase2 to use -#ifndef __LP64__ +#if !defined(__LP64__) && !defined(_WIN64) // The implementation of _Unwind_Exception uses an attribute mode on the -

[PATCH] D37905: [libclang, bindings]: add spelling location

2017-10-17 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd accepted this revision. compnerd added a comment. @frutiger you have commit rights now right? https://reviews.llvm.org/D37905 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2017-10-21 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd accepted this revision. compnerd added a comment. This revision is now accepted and ready to land. Thanks for cleaning this up. IIRC, I have similar behavior in compiler-rt for `HIDDEN_SYMBOL`. https://reviews.llvm.org/D39156 ___ cfe-comm

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

2017-10-22 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd added inline comments. Comment at: src/UnwindRegistersRestore.S:98 + # skip fs + # skip gs + movq 56(%rcx), %rsp # cut back rsp to new location Doesn't Win64 ABI require some of the MMX registers be saved/restored too? https://reviews.llvm.org/D38

[PATCH] D39217: [libclang, bindings]: add spelling location

2017-10-23 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd added a subscriber: akyrtzi. compnerd added a comment. I think that this is reasonable given that it is addressing a long standing issue. CC'ing @akyrtzi for his opinion as well. https://reviews.llvm.org/D39217 ___ cfe-commits mailing lis

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

2017-10-23 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd accepted this revision. compnerd added a comment. I'd say out of range rather than too big. https://reviews.llvm.org/D39206 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2017-10-24 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd added a comment. Whats the motivation for adding DWARF based unwinding on ARM? What environment is using this? Comment at: src/Registers.hpp:1342 } + static int lastDwarfRegNum() { return 287; } Can we not use `_LIBUNWIND_HIGHEST_DWARF_REGISTE

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

2018-02-06 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd added a comment. @jhenderson I believe that the first one is what this is implementing. I believe that adding the last two as a patch following this one is preferable as that is specific to the needs for PS4, but, both of those should be possible to accommodate. I would love to see a

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

2018-02-06 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd updated this revision to Diff 133030. compnerd added a comment. Add additional test, update docs Repository: rC Clang https://reviews.llvm.org/D42758 Files: docs/LanguageExtensions.rst lib/CodeGen/CodeGenModule.cpp lib/CodeGen/CodeGenModule.h lib/Parse/ParsePragma.cpp test

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

2018-02-06 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd updated this revision to Diff 133087. compnerd added a comment. address design changes Repository: rC Clang https://reviews.llvm.org/D42768 Files: lib/AST/MicrosoftMangle.cpp test/CodeGenCXX/msabi-swiftcall-cc.cpp Index: test/CodeGenCXX/msabi-swiftcall-cc.cpp =

[PATCH] D42768: AST: support SwiftCC on MS ABI

2018-02-06 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd updated this revision to Diff 133114. compnerd retitled this revision from "AST: add an extension to support SwiftCC on MS ABI" to "AST: support SwiftCC on MS ABI". compnerd edited the summary of this revision. compnerd added a comment. Update to what Microsoft has communicated offline

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

2018-02-06 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd added inline comments. Comment at: docs/LanguageExtensions.rst:2732 + +The ``#pragma comment(lib, ...)`` directive is supported on all ELF targets. +The second parameter is the library name (without the traditional Unix prefix of erichkeane wrote: > The

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

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

[PATCH] D42768: AST: support SwiftCC on MS ABI

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

[PATCH] D42933: [Sema] Avoid -Wformat warning for NSInteger/NSUInteger 'int' values with %zu/%zi long specifiers

2018-02-06 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd added a comment. @aaron.ballman, yeah, I believe that the warning is working as intended, it just so happens that at runtime things just happened to work out. Repository: rC Clang https://reviews.llvm.org/D42933 ___ cfe-commits mailing

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

2018-02-07 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd updated this revision to Diff 133319. compnerd edited the summary of this revision. compnerd added a comment. Address comments from @rjmccall Repository: rC Clang https://reviews.llvm.org/D42614 Files: lib/AST/MicrosoftMangle.cpp test/CodeGenObjCXX/msabi-objc-extensions.mm tes

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

2018-02-07 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd added a comment. @rjmccall, I've updated the approach and no longer abuse the existing decoration styles. This uses a custom namespace with artificial types to differentiate the types. I've also ensured that the parameter types do not encode the type information. Repository: rC C

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

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

[PATCH] D34365: [FrontEnd] Allow overriding the default C/C++ -std via CMake vars

2018-02-19 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd added a comment. Is there a need for this given the changes for 6.0? https://reviews.llvm.org/D34365 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D43586: CodeGen: handle blocks correctly when inalloca'ed

2018-02-21 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd updated this revision to Diff 135304. compnerd added a comment. Update comment Repository: rC Clang https://reviews.llvm.org/D43586 Files: lib/CodeGen/CGDecl.cpp test/CodeGenCXX/block-inalloca.cpp Index: test/CodeGenCXX/block-inalloca.cpp ==

[PATCH] D43586: CodeGen: handle blocks correctly when inalloca'ed

2018-02-21 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd created this revision. compnerd added a reviewer: rnk. Herald added a subscriber: cfe-commits. When using blocks with C++ on Windows x86, it is possible to have the block literal be pushed into the inalloca'ed parameters. Teach IRGen to handle the case properly by extracting the block li

[PATCH] D43586: CodeGen: handle blocks correctly when inalloca'ed

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

[PATCH] D43734: [RecordLayout] Don't align to non-power-of-2 sizes when using -mms-bitfields

2018-02-24 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd added inline comments. Comment at: lib/AST/RecordLayoutBuilder.cpp:1755 CharUnits TypeSize = Context.getTypeSizeInChars(BTy); -if (TypeSize > FieldAlign) +if (TypeSize > FieldAlign && +llvm::isPowerOf2_64(TypeSize.getQuantity()))

[PATCH] D43734: [RecordLayout] Don't align to non-power-of-2 sizes when using -mms-bitfields

2018-02-26 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. If its easy enough to wire that through to the frontend as a proper diagnostic, that would be better with a test. Otherwise, this is good to continue to make progress. https://reviews.l

[PATCH] D33259: Don't defer to the GCC driver for linking arm-baremetal

2017-05-23 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd added a comment. Looks generally pretty good. This is going to be a pretty cool addition! Comment at: lib/Driver/ToolChains/BareMetal.cpp:68 + SmallString<128> Dir(getDriver().ResourceDir); + llvm::sys::path::append(Dir, "lib", "baremetal"); + return Dir.str(); ---

[PATCH] D33637: [libcxxabi][demangler] Fix a exponential string copying bug

2017-05-28 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. Thanks for looking into this, its been on my list for a while now. Comment at: src/cxa_demangle.cpp:2918 } +if (!isalpha(*p0) && !isdigit(*p0) && *p0 !=

[PATCH] D32269: [Driver] Add iSOFTLinux to GNU ToolChains X86Triple

2017-06-01 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd added inline comments. Comment at: test/Driver/linux-ld.c:467-471 +// RUN: %clang %s -### -o %t.o 2>&1 --target=x86_64-everest-linux +// RUN: %clang %s -### -o %t.o 2>&1 --target=x86_64-pure64-linux +// RUN: %clang %s -### -o %t.o 2>&1 --target=i686-isoft-linux +// RUN:

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

2017-06-22 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd created this revision. compnerd added a project: clang. When generating the decorated name for a static variable inside a BlockDecl, construct a scope for the block invocation function that homes the parameter. This allows for arbitrary nesting of the blocks even if the variables are

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

2017-06-22 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd added a comment. @efriedma hmm...using `getBlockManglingNumber` causes the name to be duplicated. Ill look into that. However, wouldn't all the block invocation functions be defined and COMDAT'ed? @majnemer Sure, will add more tests. Repository: rL LLVM https://reviews.llvm.org/

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

2017-06-23 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd updated this revision to Diff 103768. compnerd added a comment. Add additional test cases, improve coverage and mangling. Repository: rL LLVM https://reviews.llvm.org/D34523 Files: lib/AST/MicrosoftMangle.cpp test/CodeGenCXX/msabi-blocks.cpp Index: test/CodeGenCXX/msabi-blocks.

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

2017-06-23 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd added a comment. @efriedma which bit of the Itanium mangling should I be looking at? A BlockDecl does not have visibility associated with them, so Im not sure what I should be checking to see if the block is visible or not. What is the best way forward for finishing this up? Reposi

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

2017-06-23 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd added a comment. @efriedma I think that Im still not understanding the case that you are trying to point out. How do we end up in a state where the block invocation function is referenced external to the TU? The block would be referenced to by name of the block, no? AFAICT, this is

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

2017-06-23 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd updated this revision to Diff 103794. compnerd added a comment. This is a step in the right direction. Although the NSDMI cases and default parameter value cases are not yet handled, they break due to tracking of the global mangling number tracking, not due to the scheme. Repository:

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

2017-06-23 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd added a comment. Ah, thanks for the explanation @efriedma. Comment at: lib/AST/MicrosoftMangle.cpp:981-984 + Out << "YAXPAU__block_literal"; + if (Discriminator) +Out<< '_' << Discriminator; + Out << "@@@Z"; majnemer wrote: > I t

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

2017-06-24 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd updated this revision to Diff 103845. compnerd added a comment. Address feedback. Also fix the case that was previously not working. This now covers all the various cases that have been discussed. Repository: rL LLVM https://reviews.llvm.org/D34523 Files: lib/AST/MicrosoftMangl

[PATCH] D34588: Check for _MSC_VER before define _LIBCPP_MSVCRT

2017-06-24 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd added inline comments. Comment at: include/__config:234-235 +// a MS compatibility version is specified. # ifndef __MINGW32__ -#define _LIBCPP_MSVCRT // Using Microsoft's C Runtime library +#ifdef _MSC_VER +# define _LIBCPP_MSVCRT // Using Microsoft's C Ru

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

2017-06-25 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd updated this revision to Diff 103879. compnerd marked 2 inline comments as done. compnerd added a comment. Use `mangleSourceName` Repository: rL LLVM https://reviews.llvm.org/D34523 Files: lib/AST/MicrosoftMangle.cpp test/CodeGenCXX/msabi-blocks.cpp Index: test/CodeGenCXX/msabi

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

2017-06-25 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd added a comment. I can add the nested/nested classes. What were other nested concepts you thinking of? Comment at: lib/AST/MicrosoftMangle.cpp:980-981 + unsigned Discriminator = BD->getBlockManglingNumber(); + if (!Discriminator) +Discriminator = Co

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

2017-06-25 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd updated this revision to Diff 103887. compnerd added a comment. Some more comments, add test case. Repository: rL LLVM https://reviews.llvm.org/D34523 Files: lib/AST/MicrosoftMangle.cpp test/CodeGenCXX/msabi-blocks.cpp Index: test/CodeGenCXX/msabi-blocks.cpp ===

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

2017-06-26 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd updated this revision to Diff 103981. compnerd added a comment. __ptr64 mangling, add tests for 32-bit. Repository: rL LLVM https://reviews.llvm.org/D34523 Files: lib/AST/MicrosoftMangle.cpp test/CodeGenCXX/msabi-blocks.cpp Index: test/CodeGenCXX/msabi-blocks.cpp ==

[PATCH] D41623: [cmake] [libcxxabi] Fix path problems when cross compiling.

2017-12-29 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd added a comment. I think that it might be better to handle this as a single global change: if(CMAKE_FIND_ROOT_PATH) set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE NEVER) endif() Repository: rCXXA libc++abi https://reviews.llvm.org/D41623 ___

[PATCH] D41621: [cmake] [libunwind] Fix path problems when cross compiling.

2017-12-29 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd requested changes to this revision. compnerd added a comment. This revision now requires changes to proceed. Similar to the libc++abi and libc++ changes. https://reviews.llvm.org/D41621 ___ cfe-commits mailing list cfe-commits@lists.llvm.or

[PATCH] D41622: [cmake] [libcxx] Fix path and flag problems when cross compiling.

2017-12-29 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd added a comment. Similar to the libc++abi wrt `find_path`. The `CMAKE_REQUIRED_FLAGS` handling LGTM. Repository: rCXX libc++ https://reviews.llvm.org/D41622 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/

[PATCH] D39074: [libunwind][MIPS]: Add support for unwinding in N32 processes.

2018-01-04 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd added a comment. Looking over this patch again, I think I really would prefer that this was split up into two patches. The first one should be entirely mechanical, replacing `n64` with `newabi`. The second patch would actually make the changes that you are are after. That would real

[PATCH] D41706: [Driver] Update default sanitizer blacklist location

2018-01-08 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd accepted this revision. compnerd added a comment. This revision is now accepted and ready to land. This seems fine, but will need https://reviews.llvm.org/D41673 to go in at the same time. The sanitizers are pretty tightly coupled with the compiler, so I don't think that it is too big

[PATCH] D41842: [libunwind][MIPS]: Rename Registers_mips_n64 to Registers_mips_newabi.

2018-01-08 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. Thanks for splitting this up! https://reviews.llvm.org/D41842 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/c

[PATCH] D43842: CodeGenObjCXX: handle inalloca appropriately for msgSend variant

2018-02-27 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd created this revision. compnerd added reviewers: rjmccall, rnk. objc_msgSend_stret takes a hidden parameter for the returned structure's address for the construction. When the function signature is rewritten for the inalloca passing, the return type is no longer marked as indirect but ra

[PATCH] D43842: CodeGenObjCXX: handle inalloca appropriately for msgSend variant

2018-02-28 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd added a comment. Yeah, this is still an indirect return. I can see your point about the representation, nfortunately, I think that change is way out of scope for this. That would be a pretty large and invasive change to wire that through. Repository: rC Clang https://reviews.llvm

[PATCH] D43842: CodeGenObjCXX: handle inalloca appropriately for msgSend variant

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

[PATCH] D43908: [RecordLayout] Only assert that fundamental type sizes are power of two on MSVC

2018-02-28 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd accepted this revision. compnerd added a comment. Ugh, really not a fan of this change. Repository: rC Clang https://reviews.llvm.org/D43908 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/li

[PATCH] D43908: [RecordLayout] Only assert that fundamental type sizes are power of two on MSVC

2018-03-01 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd accepted this revision. compnerd added a comment. Awesome, thanks, this makes me feel much more comfortable. https://reviews.llvm.org/D43908 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listi

[PATCH] D44278: CodeGen: simplify and validate exception personalities

2018-03-08 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd created this revision. compnerd added reviewers: rnk, smeenai. Simplify the dispatching for the personality routines. This really had no test coverage previously, so add test coverage for the various cases. This turns out to be pretty complicated as the various languages and models inter

[PATCH] D44278: CodeGen: simplify and validate exception personalities

2018-03-08 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd updated this revision to Diff 137668. compnerd added a comment. add more context Repository: rC Clang https://reviews.llvm.org/D44278 Files: lib/CodeGen/CGException.cpp test/CodeGen/personality.c test/CodeGenCXX/personality.cpp test/CodeGenObjC/personality.m test/CodeGenOb

[PATCH] D44278: CodeGen: simplify and validate exception personalities

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

[PATCH] D44327: ObjCARC: teach the cloner about funclets

2018-03-09 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd created this revision. compnerd added a reviewer: gottesmm. Herald added a subscriber: cfe-commits. compnerd added a reviewer: ahatanak. compnerd added subscribers: rnk, majnemer. In the case that the CallInst that is being moved has an associated operand bundle which is a funclet, the mo

[PATCH] D43797: [CMake] Copy the generated __config header into build directory

2018-03-09 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd accepted this revision. compnerd added inline comments. This revision is now accepted and ready to land. Comment at: libcxx/include/CMakeLists.txt:19 +DEPENDS ${LIBCXX_BINARY_DIR}/__generated_config) + set(generated_config_deps generate_config_header) +endif() -

[PATCH] D44327: ObjCARC: teach the cloner about funclets

2018-03-09 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd updated this revision to Diff 137867. compnerd added a comment. Use the BB colorizer to detect the token. Fortunately, there is no BB removal/splitting happening here, so there is no state to maintain. Repository: rL LLVM https://reviews.llvm.org/D44327 Files: lib/Transforms/Obj

[PATCH] D44327: ObjCARC: teach the cloner about funclets

2018-03-12 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd closed this revision. compnerd added a comment. SVN r327336. Addressed comments in SVN r327351, because I forgot to incorporate them in the first try. Repository: rL LLVM https://reviews.llvm.org/D44327 ___ cfe-commits mailing list cfe

[PATCH] D44646: Sema: in msvc compatibility mode, don't allow forceinline on variadics

2018-03-19 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd added a comment. What happens in the case that you have a variadic in C code marked with `__forceinline`? Does that also cause a warning with MSVC? Comment at: test/Sema/ms-forceinline-on-variadic.cpp:1 +// RUN: %clang_cc1 -emit-llvm -o - -triple i686-windows -verify

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

2018-06-11 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd accepted this revision. compnerd added a comment. This revision is now accepted and ready to land. This makes much more sense. Thanks @joerg https://reviews.llvm.org/D38680 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lis

[PATCH] D46971: [DWARF] Get RA from RA register even if it appears unused

2018-06-12 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. x86-Linux-only test is good. LG with the discussed changes. Comment at: src/DwarfInstructions.hpp:195 } +else if (i == (int)cieInfo.returnAddressRegiste

[PATCH] D57001: [libunwind] Don't define unw_fpreg_t to uint64_t for __ARM_DWARF_EH__

2019-01-24 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. `double` should be safe for ARM DWARF EH, though, technically, `long double` is more appropriate of a type definition (the FPU state that is saved should be the widest floating point type)

[PATCH] D57404: build: remove use of llvm-config

2019-01-29 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd created this revision. compnerd added reviewers: chandlerc, rnk. Herald added a subscriber: mgorny. Update the CMake build to use the LLVM CMake Config package rather than invoking `llvm-config` to find the parameters. Users can specify `-DLLVM_DIR=` to CMake to indicate where the LLVM

[PATCH] D57404: build: remove use of llvm-config

2019-01-29 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd added a comment. @mgorny, no, you should specify `-DLLVM_DIR=/path/to/where/the/config/lives` instead. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57404/new/ https://reviews.llvm.org/D57404 ___ cfe-commit

[PATCH] D55525: [Driver] Add support for -fembed-bitcode for assembly file

2018-12-11 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd added a comment. This really feels odd. Why not expect that the developer will add the content themselves? I'm not sure I understand the motivation for this change. I think that this should be easy to write a test case for as well. Repository: rC Clang CHANGES SINCE LAST ACTION

[PATCH] D55229: [COFF] Statically link certain runtime library functions

2018-12-11 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd added a subscriber: theraven. compnerd added inline comments. Comment at: CodeGen/CodeGenModule.cpp:2957-2958 !getCodeGenOpts().LTOVisibilityPublicStd && - !getTriple().isWindowsGNUEnvironment()) { + !getTriple().isWindowsGNUEnvironment() &&

[PATCH] D55586: Basic: make `int_least64_t` and `int_fast64_t` match on Darwin

2018-12-11 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd created this revision. compnerd added reviewers: ahatanak, rjmccall. The Darwin targets use `int64_t` and `uint64_t` to define the `int_least64_t` and `int_fast64_t` types. The underlying type is actually a `long long`. Match the types to allow the printf specifiers to work properly and

[PATCH] D58649: Fix inline assembler constraint validation

2019-02-26 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. Nice find! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58649/new/ https://reviews.llvm.org/D58649 ___ cfe-commits mailing list cfe

[PATCH] D59745: [NFC] Move writeFuncOrVarName out of class CodegenNameGenerator so that it can be reused more easily.

2019-03-24 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd added a comment. Hmm, what exactly does the libclang interfaces not give you or what exactly did you intend to have this be used as. Perhaps with some more details we can find a good solution for the specific case that you have in mind. Repository: rC Clang CHANGES SINCE LAST ACTI

[PATCH] D60274: [ELF] Implement Dependent Libraries Feature

2019-04-12 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd added inline comments. Comment at: lld/ELF/InputFiles.cpp:662 } + case SHT_LLVM_DEPLIBS: { +if (Config->Relocatable) Can you make the flag here reflect the name as well? (`SHT_LLVM_DEPENDENT_LIBRARIES`) Comment at: lld/ELF/Op

[PATCH] D60974: Clang IFSO driver action.

2019-04-22 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd added a comment. @jakehehrlich I think you are misunderstanding this. The intent here is to provide a means to emit just the interfaces from a library into a stub that can be used for building. However, rather than have the interfaces be defined elsewhere, having clang run through th

[PATCH] D60974: Clang IFSO driver action.

2019-04-22 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd added a comment. I'm well versed in the complexities of a linker - I've worked extensively on the GNU linkers as well as with lld. The visibility of the symbols is actually computed by the compiler - the STV_* flags associated with the symtab entry give you that information which is a

[PATCH] D60974: Clang IFSO driver action.

2019-04-23 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd added a comment. BTW, to clarify how this is intended to be used: the collection of the public interfaces defines the *public* interfaces of the module. This information can be used to generate a **minimally** viable ELF module that the linker can use to link against - no `.text` segm

[PATCH] D60974: Clang IFSO driver action.

2019-04-23 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd added inline comments. Comment at: clang/lib/Frontend/FrontendActions.cpp:326 +(*OS) << " - Name:.text\n"; +(*OS) << "Type:STT_SECTION\n"; +(*OS) << "Section: .text\n"; This is wrong, this marks the ty

[PATCH] D60974: Clang IFSO driver action.

2019-04-23 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd added a comment. The strong motivation here is to avoid having the list be maintained outside of the source code. I am not too strongly tied to the YAML approach as long as the binaries that we get at the end are equivalent to the pruned ELF binaries from the YAML2ELF approach. Howev

[PATCH] D60974: Clang IFSO driver action.

2019-04-24 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd added a comment. Okay, if the TBE isn't suitable for the pre-merged format, then I think that this should be okay with the current approach. This is more about the generation and not wanting to have to maintain a separate side table of information manually. It just is a different tra

[PATCH] D60974: Clang IFSO driver action.

2019-04-24 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd added a comment. @jakehehrlich - when do you expect to have your idea put up? I don't think that it is fair to have this wait until you have time to put something up that can be discussed. I think that getting this working and then iterating on it and migrating it over to some shared

[PATCH] D60974: Clang IFSO driver action.

2019-04-24 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd added a comment. @phosek - I completely agree, I really would prefer that this not promote the `yaml2obj` tool to an officially supported tool. The reason for using the same output format is for testing convenience, and this should not really invoke the tool (this should work without

[PATCH] D60974: Clang IFSO driver action.

2019-05-01 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd added a comment. @jakehehrlich - unfortunately, removing the attributes on the sections will make the content look different with `nm` which is something we do need to appear proper for consumers of the interface libraries. Versioning has a number of problems inherent to it (unfortuna

  1   2   3   4   5   6   7   >