[PATCH] D60974: Clang IFSO driver action.

2019-07-01 Thread Puyan Lotfi via Phabricator via cfe-commits
plotfi added a comment. In D60974#1565632 , @jfb wrote: > In D60974#1565621 , @plotfi wrote: > > > In D60974#1565577 , @jfb wrote: > > > > > Looking at the code quickly, I'm

[PATCH] D60974: Clang IFSO driver action.

2019-07-01 Thread JF Bastien via Phabricator via cfe-commits
jfb added subscribers: arphaman, ributzka, Bigcheese. jfb added a comment. In D60974#1565621 , @plotfi wrote: > In D60974#1565577 , @jfb wrote: > > > Looking at the code quickly, I'm not sure that this should be in

[PATCH] D60974: Clang IFSO driver action.

2019-07-01 Thread Puyan Lotfi via Phabricator via cfe-commits
plotfi added a comment. In D60974#1565577 , @jfb wrote: > Looking at the code quickly, I'm not sure that this should be in clang > itself. It sounds like a better fit for a clang-based tool, and not clang. > Why does it need to be part of clang? @jfb I

[PATCH] D60974: Clang IFSO driver action.

2019-07-01 Thread Puyan Lotfi via Phabricator via cfe-commits
plotfi added a comment. In D60974#1565570 , @bruno wrote: > > I am currently working on the next part of clang interface stubs that will > > take the interface stubs per compilation unit and merge them into one text > > stub (which will be used by someth

[PATCH] D60974: Clang IFSO driver action.

2019-07-01 Thread Puyan Lotfi via Phabricator via cfe-commits
plotfi added a comment. In D60974#1565577 , @jfb wrote: > Looking at the code quickly, I'm not sure that this should be in clang > itself. It sounds like a better fit for a clang-based tool, and not clang. > Why does it need to be part of clang? In D

[PATCH] D60974: Clang IFSO driver action.

2019-07-01 Thread JF Bastien via Phabricator via cfe-commits
jfb added a comment. Looking at the code quickly, I'm not sure that this should be in clang itself. It sounds like a better fit for a clang-based tool, and not clang. Why does it need to be part of clang? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.o

[PATCH] D60974: Clang IFSO driver action.

2019-07-01 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno added a comment. > I am currently working on the next part of clang interface stubs that will > take the interface stubs per compilation unit and merge them into one text > stub (which will be used by something like llvm-elfabi to generate a stubbed > out ELF .so file). I was using llvm

[PATCH] D60974: Clang IFSO driver action.

2019-07-01 Thread Puyan Lotfi via Phabricator via cfe-commits
plotfi added a comment. In D60974#1565544 , @jfb wrote: > In D60974#1565541 , @plotfi wrote: > > > In D60974#1565527 , @jfb wrote: > > > > > In D60974#1565517

[PATCH] D60974: Clang IFSO driver action.

2019-07-01 Thread Puyan Lotfi via Phabricator via cfe-commits
plotfi added a comment. @ymandel @jfb Thanks for reaching out on this. Apologies for missing this one. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60974/new/ https://reviews.llvm.org/D60974 ___ cfe-c

[PATCH] D60974: Clang IFSO driver action.

2019-07-01 Thread Puyan Lotfi via Phabricator via cfe-commits
plotfi added a comment. In D60974#1565544 , @jfb wrote: > In D60974#1565541 , @plotfi wrote: > > > In D60974#1565527 , @jfb wrote: > > > > > In D60974#1565517

[PATCH] D60974: Clang IFSO driver action.

2019-07-01 Thread JF Bastien via Phabricator via cfe-commits
jfb added a comment. In D60974#1565541 , @plotfi wrote: > In D60974#1565527 , @jfb wrote: > > > In D60974#1565517 , @jfb wrote: > > > > > In D60974#1565054

[PATCH] D60974: Clang IFSO driver action.

2019-07-01 Thread Puyan Lotfi via Phabricator via cfe-commits
plotfi added a comment. In D60974#1565527 , @jfb wrote: > In D60974#1565517 , @jfb wrote: > > > In D60974#1565054 , @plotfi wrote: > > > > > So I think I know what may be goi

[PATCH] D60974: Clang IFSO driver action.

2019-07-01 Thread JF Bastien via Phabricator via cfe-commits
jfb added a comment. In D60974#1565517 , @jfb wrote: > In D60974#1565054 , @plotfi wrote: > > > So I think I know what may be going on on your end. The llvm-readelf in > > your path I believe might be the wrong lll

[PATCH] D60974: Clang IFSO driver action.

2019-07-01 Thread JF Bastien via Phabricator via cfe-commits
jfb added a comment. In D60974#1565054 , @plotfi wrote: > So I think I know what may be going on on your end. The llvm-readelf in your > path I believe might be the wrong lllvm-readelf (llvm-readelf-7). Are you > sure you built llvm-readelf from git? P

[PATCH] D60974: Clang IFSO driver action.

2019-07-01 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added a comment. `ninja install` did the trick. Thanks for your help! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60974/new/ https://reviews.llvm.org/D60974 ___ cfe-commits mailing list cfe-

[PATCH] D60974: Clang IFSO driver action.

2019-07-01 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added a comment. In D60974#1565054 , @plotfi wrote: > So I think I know what may be going on on your end. The llvm-readelf in your > path I believe might be the wrong lllvm-readelf (llvm-readelf-7). Are you > sure you built llvm-readelf from git?

[PATCH] D60974: Clang IFSO driver action.

2019-07-01 Thread Puyan Lotfi via Phabricator via cfe-commits
plotfi added a comment. In D60974#1564747 , @ymandel wrote: > The tests for this code are failing in my build. Any suggestions welcome. > > My setup: > > cmake -G Ninja -DCMAKE_BUILD_TYPE=Release > -DCMAKE_C_COMPILER=/usr/bin/clang-7 -DCMAKE_CXX_COMPIL

[PATCH] D60974: Clang IFSO driver action.

2019-07-01 Thread Puyan Lotfi via Phabricator via cfe-commits
plotfi added a comment. In D60974#1564747 , @ymandel wrote: > The tests for this code are failing in my build. Any suggestions welcome. > > My setup: > > cmake -G Ninja -DCMAKE_BUILD_TYPE=Release > -DCMAKE_C_COMPILER=/usr/bin/clang-7 -DCMAKE_CXX_COMPIL

[PATCH] D60974: Clang IFSO driver action.

2019-07-01 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added a comment. The tests for this code are failing in my build. Any suggestions welcome. My setup: cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=/usr/bin/clang-7 -DCMAKE_CXX_COMPILER=/usr/bin/clang++-7 -DCMAKE_C_FLAGS='-gmlt -Wall' -DCMAKE_CXX_FLAGS='-gmlt -Wall' -D

[PATCH] D60974: Clang IFSO driver action.

2019-06-20 Thread Puyan Lotfi via Phabricator via cfe-commits
plotfi added a comment. This was re-landed in r363948 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60974/new/ https://reviews.llvm.org/D60974 ___ cfe-commits mailing list cfe-commits@lists.llvm.org ht

[PATCH] D60974: Clang IFSO driver action.

2019-06-19 Thread Puyan Lotfi via Phabricator via cfe-commits
plotfi updated this revision to Diff 205686. plotfi added a comment. This should address the shared lib issue. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60974/new/ https://reviews.llvm.org/D60974 Files: clang/include/clang/Basic/DiagnosticFr

[PATCH] D60974: Clang IFSO driver action.

2019-06-17 Thread Puyan Lotfi via Phabricator via cfe-commits
plotfi added a comment. In D60974#1547682 , @MaskRay wrote: > @plotfi Sorry I have to revert this patch. This can also cause problems in > `-DBUILD_SHARED_LIBS=off` builds. clangFrontend files cannot `#include > "clang/Index/CodegenNameGenerator.h"`, I

[PATCH] D60974: Clang IFSO driver action.

2019-06-17 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. @plotfi Sorry I have to revert this patch. This can also cause problems in `-DBUILD_SHARED_LIBS=off` builds. clangFrontend files cannot `#include "clang/Index/CodegenNameGenerator.h"`, I think you may have to move files around. Repository: rL LLVM CHANGES SINCE LA

[PATCH] D60974: Clang IFSO driver action.

2019-06-17 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: cfe/trunk/lib/Frontend/InterfaceStubFunctionsConsumer.cpp:12 +#include "clang/Frontend/FrontendActions.h" +#include "clang/Index/CodegenNameGenerator.h" +#include "clang/Sema/TemplateInstCallback.h" > rL363646 This file

[PATCH] D60974: Clang IFSO driver action.

2019-06-17 Thread Puyan Lotfi via Phabricator via cfe-commits
plotfi added a comment. I had to back out r363646. While it worked for me building locally with and without shared lib, it appears to have caused bots to break. I will take another look at fixing it in about 10 hours. Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/

[PATCH] D60974: Clang IFSO driver action.

2019-06-17 Thread Puyan Lotfi via Phabricator via cfe-commits
plotfi marked 3 inline comments as done. plotfi added inline comments. Comment at: cfe/trunk/lib/Frontend/CMakeLists.txt:58 clangDriver + clangIndex clangEdit asb wrote: > plotfi wrote: > > MaskRay wrote: > > > This is a layering issue. clangIndex depends

[PATCH] D60974: Clang IFSO driver action.

2019-06-17 Thread Alex Bradbury via Phabricator via cfe-commits
asb added inline comments. Comment at: cfe/trunk/lib/Frontend/CMakeLists.txt:58 clangDriver + clangIndex clangEdit plotfi wrote: > MaskRay wrote: > > This is a layering issue. clangIndex depends on clangFrontend so > > clangFrontend should not depend on c

[PATCH] D60974: Clang IFSO driver action.

2019-06-17 Thread Puyan Lotfi via Phabricator via cfe-commits
plotfi marked 3 inline comments as done. plotfi added inline comments. Comment at: cfe/trunk/lib/Frontend/InterfaceStubFunctionsConsumer.cpp:22 + StringRef Format; + std::set ParsedTemplates; + MaskRay wrote: > Does `StringSet<>` work? It probably could work. I

[PATCH] D60974: Clang IFSO driver action.

2019-06-17 Thread Puyan Lotfi via Phabricator via cfe-commits
plotfi marked an inline comment as done. plotfi added inline comments. Comment at: cfe/trunk/lib/Frontend/CMakeLists.txt:58 clangDriver + clangIndex clangEdit MaskRay wrote: > This is a layering issue. clangIndex depends on clangFrontend so > clangFronten

[PATCH] D60974: Clang IFSO driver action.

2019-06-17 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: cfe/trunk/lib/Frontend/InterfaceStubFunctionsConsumer.cpp:22 + StringRef Format; + std::set ParsedTemplates; + Does `StringSet<>` work? Comment at: cfe/trunk/lib/Frontend/InterfaceStubFunctionsConsum

[PATCH] D60974: Clang IFSO driver action.

2019-06-17 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: cfe/trunk/lib/Frontend/CMakeLists.txt:58 clangDriver + clangIndex clangEdit This is a layering issue. clangIndex depends on clangFrontend so clangFrontend should not depend on clangIndex. The circular dependency

[PATCH] D60974: Clang IFSO driver action.

2019-06-17 Thread Puyan Lotfi via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL363626: [clang-ifs] Clang Interface Stubs, first version. (authored by zer0, committed by ). Changed prior to commit: https://reviews.llvm.org/D60974?vs=205191&id=205203#toc Repository: rL LLVM CHAN

[PATCH] D60974: Clang IFSO driver action.

2019-06-17 Thread Puyan Lotfi via Phabricator via cfe-commits
plotfi updated this revision to Diff 205191. plotfi marked 2 inline comments as done. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60974/new/ https://reviews.llvm.org/D60974 Files: clang/include/clang/Basic/DiagnosticFrontendKinds.td clang/incl

[PATCH] D60974: Clang IFSO driver action.

2019-06-17 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd accepted this revision. compnerd added inline comments. This revision is now accepted and ready to land. Comment at: clang/lib/Frontend/InterfaceStubFunctionsConsumer.cpp:91 + std::vector MangledNames = CGNameGen.getAllManglings(ND); + if (isa(ND) || isa(ND)) {

[PATCH] D60974: Clang IFSO driver action.

2019-06-16 Thread Puyan Lotfi via Phabricator via cfe-commits
plotfi updated this revision to Diff 204978. plotfi marked 17 inline comments as done. plotfi added a comment. Addressing @compnerd's feedback Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60974/new/ https://reviews.llvm.org/D60974 Files: clang/

[PATCH] D60974: Clang IFSO driver action.

2019-06-16 Thread Puyan Lotfi via Phabricator via cfe-commits
plotfi added inline comments. Comment at: clang/lib/Frontend/InterfaceStubFunctionsConsumer.cpp:21 + StringRef InFile; + StringRef Format; + std::set ParsedTemplates; compnerd wrote: > An enumeration may be nicer. For now the format goes into the first line of

[PATCH] D60974: Clang IFSO driver action.

2019-06-12 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd added inline comments. Comment at: clang/lib/Frontend/CompilerInvocation.cpp:1690 + std::make_pair(frontend::GenerateInterfaceTBEExpV1, false)); + if (!ProgramActionPair.second) +Diags.Report(diag::err_drv_invalid_value) I t

[PATCH] D60974: Clang IFSO driver action.

2019-06-12 Thread Puyan Lotfi via Phabricator via cfe-commits
plotfi updated this revision to Diff 204308. plotfi marked 2 inline comments as done. plotfi added a comment. Improving support for visibility correctness with classes, methods and inheritance. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60974/ne

[PATCH] D60974: Clang IFSO driver action.

2019-06-11 Thread Puyan Lotfi via Phabricator via cfe-commits
plotfi marked 3 inline comments as done. plotfi added a comment. In D60974#1534662 , @rupprecht wrote: > Can you upload this patch with context? Either use arc or upload w/ -U9 Thanks for the review. > I seem to have a lot of comments, but they're a

[PATCH] D60974: Clang IFSO driver action.

2019-06-11 Thread Puyan Lotfi via Phabricator via cfe-commits
plotfi updated this revision to Diff 204187. plotfi marked 11 inline comments as done. plotfi added a comment. addressing @rupprecht's feedback Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60974/new/ https://reviews.llvm.org/D60974 Files: clang

[PATCH] D60974: Clang IFSO driver action.

2019-06-07 Thread Puyan Lotfi via Phabricator via cfe-commits
plotfi updated this revision to Diff 203638. plotfi added a comment. -U99 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60974/new/ https://reviews.llvm.org/D60974 Files: clang/include/clang/Driver/Options.td clang/include/clang/Driver/Type

[PATCH] D60974: Clang IFSO driver action.

2019-06-07 Thread Jordan Rupprecht via Phabricator via cfe-commits
rupprecht added a reviewer: rupprecht. rupprecht added a comment. Can you upload this patch with context? Either use arc or upload w/ -U9 I seem to have a lot of comments, but they're all nits -- my major concern being the `llvm_unreachable`s should be errors instead (i.e. should be trigger

[PATCH] D60974: Clang IFSO driver action.

2019-06-06 Thread Puyan Lotfi via Phabricator via cfe-commits
plotfi updated this revision to Diff 203465. plotfi added a comment. git mv'ed hidden-class-inheritance.cpp Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60974/new/ https://reviews.llvm.org/D60974 Files: clang/include/clang/Driver/Options.td c

[PATCH] D60974: Clang IFSO driver action.

2019-06-06 Thread Puyan Lotfi via Phabricator via cfe-commits
plotfi updated this revision to Diff 203464. plotfi added a comment. Updated hidden parent/child class inheritance cases. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60974/new/ https://reviews.llvm.org/D60974 Files: clang/include/clang/Driver/

[PATCH] D60974: Clang IFSO driver action.

2019-06-04 Thread Puyan Lotfi via Phabricator via cfe-commits
plotfi updated this revision to Diff 202976. plotfi added a comment. Adding a test for inheritance and constructors/destroctors. Also addressing feedback from @alexshap Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60974/new/ https://reviews.llvm.

[PATCH] D60974: Clang IFSO driver action.

2019-06-03 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexshap added inline comments. Comment at: clang/lib/Frontend/InterfaceStubFunctionsConsumer.cpp:30 +uint8_t Binding; +MangledSymbol() = delete; +MangledSymbol(const std::string &Name, const std::string &ParentName, would be nice to have a newline be

[PATCH] D60974: Clang IFSO driver action.

2019-05-26 Thread Puyan Lotfi via Phabricator via cfe-commits
plotfi updated this revision to Diff 201471. plotfi added a comment. virtual function test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60974/new/ https://reviews.llvm.org/D60974 Files: clang/include/clang/Driver/Options.td clang/include/clan

[PATCH] D60974: Clang IFSO driver action.

2019-05-24 Thread Puyan Lotfi via Phabricator via cfe-commits
plotfi updated this revision to Diff 201339. plotfi added a comment. More test improvement. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60974/new/ https://reviews.llvm.org/D60974 Files: clang/include/clang/Driver/Options.td clang/include/cla

[PATCH] D60974: Clang IFSO driver action.

2019-05-23 Thread Puyan Lotfi via Phabricator via cfe-commits
plotfi updated this revision to Diff 201104. plotfi added a comment. Improving visibility extraction for class template specializations. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60974/new/ https://reviews.llvm.org/D60974 Files: clang/includ

[PATCH] D60974: Clang IFSO driver action.

2019-05-22 Thread Puyan Lotfi via Phabricator via cfe-commits
plotfi updated this revision to Diff 200828. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60974/new/ https://reviews.llvm.org/D60974 Files: clang/include/clang/Driver/Options.td clang/include/clang/Driver/Types.def clang/include/clang/Fronten

[PATCH] D60974: Clang IFSO driver action.

2019-05-22 Thread Puyan Lotfi via Phabricator via cfe-commits
plotfi updated this revision to Diff 200805. plotfi added a comment. adding static/extern tests. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60974/new/ https://reviews.llvm.org/D60974 Files: clang/include/clang/Driver/Options.td clang/includ

[PATCH] D60974: Clang IFSO driver action.

2019-05-21 Thread Puyan Lotfi via Phabricator via cfe-commits
plotfi updated this revision to Diff 200602. plotfi added a comment. fixing support for static functions. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60974/new/ https://reviews.llvm.org/D60974 Files: clang/include/clang/Driver/Options.td cla

[PATCH] D60974: Clang IFSO driver action.

2019-05-20 Thread Puyan Lotfi via Phabricator via cfe-commits
plotfi updated this revision to Diff 200393. plotfi added a comment. adding a nice inline test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60974/new/ https://reviews.llvm.org/D60974 Files: clang/include/clang/Driver/Options.td clang/include/

[PATCH] D60974: Clang IFSO driver action.

2019-05-14 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd added a comment. How about some cases for: - global variable which is `static` and `extern`'ed - global variable which is `static` defined in a function which is `static` - global variable which is `static` defined in a function which is *not* `inline` - global variable which is `static

[PATCH] D60974: Clang IFSO driver action.

2019-05-13 Thread Puyan Lotfi via Phabricator via cfe-commits
plotfi added a comment. @compnerd Any other test cases you'd like before the first drop? @jakehehrlich @rupprecht Do things here look good to you guys? Both formats are marked experimental, I plan to work on a merge action next. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D60974: Clang IFSO driver action.

2019-05-10 Thread Puyan Lotfi via Phabricator via cfe-commits
plotfi updated this revision to Diff 199112. plotfi added a comment. Adding lit test cases. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60974/new/ https://reviews.llvm.org/D60974 Files: clang/include/clang/Driver/Options.td clang/include/cla

[PATCH] D60974: Clang IFSO driver action.

2019-05-10 Thread Puyan Lotfi via Phabricator via cfe-commits
plotfi added a comment. In D60974#1498604 , @compnerd wrote: > This really needs more tests. Please add a positive/negative test for the > driver argument. Please try to organise the tests a bit to show what it is > that they are testing, emission of p

[PATCH] D60974: Clang IFSO driver action.

2019-05-10 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd added a comment. This really needs more tests. Please add a positive/negative test for the driver argument. Please try to organise the tests a bit to show what it is that they are testing, emission of public functions, not of protected functions or hidden functions. Behaviour with C

[PATCH] D60974: Clang IFSO driver action.

2019-05-10 Thread Puyan Lotfi via Phabricator via cfe-commits
plotfi added a comment. In D60974#1498240 , @jakehehrlich wrote: > This shouldn't emit the .tbe format at all, the .tbe format is meant to be in > near 1-1 correspondence with .so files, not with .o files. It has things like > DT_NEEDED, and DT_SONAME r

[PATCH] D60974: Clang IFSO driver action.

2019-05-10 Thread Puyan Lotfi via Phabricator via cfe-commits
plotfi updated this revision to Diff 199058. plotfi added a comment. Changing !tapi-tbe to !experimental-tapi-elf-v1, removing Endianness field from tapi-tbe. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60974/new/ https://reviews.llvm.org/D60974

[PATCH] D60974: Clang IFSO driver action.

2019-05-10 Thread Puyan Lotfi via Phabricator via cfe-commits
plotfi marked an inline comment as done. plotfi added a comment. In D60974#1498240 , @jakehehrlich wrote: > This shouldn't emit the .tbe format at all, the .tbe format is meant to be in > near 1-1 correspondence with .so files, not with .o files. It has

[PATCH] D60974: Clang IFSO driver action.

2019-05-10 Thread Puyan Lotfi via Phabricator via cfe-commits
plotfi marked 2 inline comments as done. plotfi added inline comments. Comment at: llvm/include/llvm/TextAPI/ELF/ELFStub.h:58 ELFArch Arch; + Optional Endian; std::vector NeededLibs; jakehehrlich wrote: > Why do we need or want this? If it is needed can it

[PATCH] D60974: Clang IFSO driver action.

2019-05-10 Thread Jake Ehrlich via Phabricator via cfe-commits
jakehehrlich added a comment. This shouldn't emit the .tbe format at all, the .tbe format is meant to be in near 1-1 correspondence with .so files, not with .o files. It has things like DT_NEEDED, and DT_SONAME related information that don't make sense for .o files for instance. If we put thin

[PATCH] D60974: Clang IFSO driver action.

2019-05-10 Thread Puyan Lotfi via Phabricator via cfe-commits
plotfi added a comment. @jakehehrlich What else are you looking for here? Can the patch for merging tbe files come later? @compnerd @rupprecht thoughts? I think this is a reasonable compromise: a minimal subset of what the yaml2obj and llvm-elfabi (with the addition of the Endian field) tools c

[PATCH] D60974: Clang IFSO driver action.

2019-05-09 Thread Puyan Lotfi via Phabricator via cfe-commits
plotfi marked an inline comment as done. plotfi added inline comments. Comment at: llvm/lib/TextAPI/ELF/TBEHandler.cpp:137 IO.mapRequired("Arch", (ELFArchMapper &)Stub.Arch); +IO.mapOptional("Endian", Stub.Endian); IO.mapOptional("NeededLibs", Stub.NeededLibs);

[PATCH] D60974: Clang IFSO driver action.

2019-05-09 Thread Puyan Lotfi via Phabricator via cfe-commits
plotfi updated this revision to Diff 198977. plotfi added a comment. renaming things from "ifso" to "interface stubs" Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60974/new/ https://reviews.llvm.org/D60974 Files: clang/include/clang/Driver/Opti

[PATCH] D60974: Clang IFSO driver action.

2019-05-09 Thread Puyan Lotfi via Phabricator via cfe-commits
plotfi updated this revision to Diff 198967. plotfi added a comment. cleaned up VisitNamedDecl Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60974/new/ https://reviews.llvm.org/D60974 Files: clang/include/clang/Driver/Options.td clang/include

[PATCH] D60974: Clang IFSO driver action.

2019-05-09 Thread Puyan Lotfi via Phabricator via cfe-commits
plotfi updated this revision to Diff 198963. plotfi marked 9 inline comments as done. plotfi added a comment. removed all the template functions to handle decls. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60974/new/ https://reviews.llvm.org/D609

[PATCH] D60974: Clang IFSO driver action.

2019-05-09 Thread Puyan Lotfi via Phabricator via cfe-commits
plotfi updated this revision to Diff 198902. plotfi added a comment. addressing a lot of @compnerd 's feedback. Still lots of templating. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60974/new/ https://reviews.llvm.org/D60974 Files: clang/inclu

[PATCH] D60974: Clang IFSO driver action.

2019-05-09 Thread Puyan Lotfi via Phabricator via cfe-commits
plotfi marked 2 inline comments as done. plotfi added inline comments. Comment at: clang/lib/Frontend/FrontendActions.cpp:223 +for (auto *I : cast(ND)->decls()) + HandleNamedDecl(dyn_cast(I), Symbols, RDO); +return true; compnerd wrote: > Hmm, do we

[PATCH] D60974: Clang IFSO driver action.

2019-05-09 Thread Puyan Lotfi via Phabricator via cfe-commits
plotfi marked 2 inline comments as done. plotfi added inline comments. Comment at: clang/lib/Driver/ToolChains/Clang.cpp:3590 +Twine("-interface-stubs-version=") + +Args.getLastArgValue(options::OPT_ifso_version_EQ))); + } compnerd wr

[PATCH] D60974: Clang IFSO driver action.

2019-05-07 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd added inline comments. Comment at: clang/include/clang/Driver/Options.td:626 HelpText<"Use the LLVM representation for assembler and object files">; +def emit_ifso : Flag<["-"], "emit-interface-stubs">, Flags<[CC1Option]>, Group, + HelpText<"Generate Inteface Stub F

[PATCH] D60974: Clang IFSO driver action.

2019-05-07 Thread Puyan Lotfi via Phabricator via cfe-commits
plotfi marked 6 inline comments as done. plotfi added inline comments. Comment at: clang/include/clang/Driver/Options.td:626 HelpText<"Use the LLVM representation for assembler and object files">; +def emit_ifso : Flag<["-"], "emit-interface-stubs">, Flags<[CC1Option]>, Group

[PATCH] D60974: Clang IFSO driver action.

2019-05-07 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd added inline comments. Comment at: clang/include/clang/Driver/Options.td:626 HelpText<"Use the LLVM representation for assembler and object files">; +def emit_ifso : Flag<["-"], "emit-interface-stubs">, Flags<[CC1Option]>, Group, + HelpText<"Generate Inteface Stub F

[PATCH] D60974: Clang IFSO driver action.

2019-05-07 Thread Puyan Lotfi via Phabricator via cfe-commits
plotfi added a comment. @jakehehrlich @compnerd ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60974/new/ https://reviews.llvm.org/D60974 ___ cfe-commits mailing list cfe-commits@lists.llvm.org htt

[PATCH] D60974: Clang IFSO driver action.

2019-05-06 Thread Puyan Lotfi via Phabricator via cfe-commits
plotfi added a comment. In D60974#1490358 , @rupprecht wrote: > I didn't follow the technical details, but I don't see anything wrong with > moving forward on this patch. I think this seems like an interesting idea > worth experimenting with. > > In D609

[PATCH] D60974: Clang IFSO driver action.

2019-05-04 Thread Puyan Lotfi via Phabricator via cfe-commits
plotfi updated this revision to Diff 198157. plotfi added a comment. Changing experimental flag to -interface-stubs-version=experimental-ifo-elf-v1 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60974/new/ https://reviews.llvm.org/D60974 Files: c

[PATCH] D60974: Clang IFSO driver action.

2019-05-04 Thread Puyan Lotfi via Phabricator via cfe-commits
plotfi updated this revision to Diff 198152. plotfi added a comment. Herald added subscribers: llvm-commits, MaskRay, hiraditya, arichardson, emaste. Herald added a reviewer: espindola. Herald added a project: LLVM. Adding support for multiple formats using -interface-stubs-version=. I'll add ano

[PATCH] D60974: Clang IFSO driver action.

2019-05-03 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd added a comment. @rupprecht - actually, I *really* like the idea of putting the experimental in the name. Also agree with you on the `ifo` vs `ifso`. Although, if we go with `ifo`, I would prefer to bikeshed the option to `-emit-interface` (well with the experimental stuck in as well

[PATCH] D60974: Clang IFSO driver action.

2019-05-03 Thread Jordan Rupprecht via Phabricator via cfe-commits
rupprecht added a comment. I didn't follow the technical details, but I don't see anything wrong with moving forward on this patch. I think this seems like an interesting idea worth experimenting with. In D60974#1488563 , @jakehehrlich wrote: > > Jake,

[PATCH] D60974: Clang IFSO driver action.

2019-05-02 Thread Jake Ehrlich via Phabricator via cfe-commits
jakehehrlich added a comment. > Jake, I am still not sure what you would prefer for moving forward. The > current patch can output the yaml format I originally proposed or the one > that looks similar to the one you proposed. What I need to know is: > > Do you want the merging if the "ifo" file

[PATCH] D60974: Clang IFSO driver action.

2019-05-02 Thread Puyan Lotfi via Phabricator via cfe-commits
plotfi marked an inline comment as done. plotfi added a comment. In D60974#1486631 , @jakehehrlich wrote: > In D60974#1486384 , @compnerd wrote: > > > @jakehehrlich - unfortunately, removing the attributes on the s

[PATCH] D60974: Clang IFSO driver action.

2019-05-01 Thread Puyan Lotfi via Phabricator via cfe-commits
plotfi updated this revision to Diff 197645. plotfi added a comment. - change "ifso" for intermediate files to "ifo" - Updated schemas. I have both our own proposal and the proposal that resembles elfeabi here. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.l

[PATCH] D60974: Clang IFSO driver action.

2019-05-01 Thread Jake Ehrlich via Phabricator via cfe-commits
jakehehrlich added a comment. In D60974#1486384 , @compnerd wrote: > @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

[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

[PATCH] D60974: Clang IFSO driver action.

2019-04-30 Thread Puyan Lotfi via Phabricator via cfe-commits
plotfi added a comment. In D60974#1485607 , @jakehehrlich wrote: > The linker doesn't look at section permissions. In fact the only thing it > even looks at the section index for is to check for alignment for copy > relocations which is something most p

[PATCH] D60974: Clang IFSO driver action.

2019-04-30 Thread Puyan Lotfi via Phabricator via cfe-commits
plotfi added a comment. In D60974#1485610 , @jakehehrlich wrote: > > Wanted to mention, from my testing with yaml2obj, I needed the section > > flags (SHF_EXECINSTR, SHF_WRITE, SHF_ALLOC, etc) otherwise nm was spitting > > the wrong thing. How are you g

[PATCH] D60974: Clang IFSO driver action.

2019-04-30 Thread Puyan Lotfi via Phabricator via cfe-commits
plotfi added a comment. In D60974#1485611 , @jakehehrlich wrote: > Oh and "ifo" is a good name. I still would like to keep the clang flag as -emit-ifso; the intermediate unmerged files are analogous to object files but the final result should be somet

[PATCH] D60974: Clang IFSO driver action.

2019-04-30 Thread Jake Ehrlich via Phabricator via cfe-commits
jakehehrlich added a comment. > Wanted to mention, from my testing with yaml2obj, I needed the section flags > (SHF_EXECINSTR, SHF_WRITE, SHF_ALLOC, etc) otherwise nm was spitting the > wrong thing. How are you going to handle those? I'm not sure what you mean. yaml2obj is a different tool that

[PATCH] D60974: Clang IFSO driver action.

2019-04-30 Thread Jake Ehrlich via Phabricator via cfe-commits
jakehehrlich added a comment. Oh and "ifo" is a good name. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60974/new/ https://reviews.llvm.org/D60974 ___ cfe-commits mailing list cfe-commits@lists.llvm.o

[PATCH] D60974: Clang IFSO driver action.

2019-04-30 Thread Jake Ehrlich via Phabricator via cfe-commits
jakehehrlich added a comment. The linker doesn't look at section permissions. In fact the only thing it even looks at the section index for is to check for alignment for copy relocations which is something most people don't even use. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST AC

[PATCH] D60974: Clang IFSO driver action.

2019-04-30 Thread Puyan Lotfi via Phabricator via cfe-commits
plotfi added a comment. In D60974#1485552 , @jakehehrlich wrote: > Well I think it should be a seperate tool but because the code inside > llvm-elfabi isn't a library yet (though it is written to be used like one) we > can do that by adding a symlink an

[PATCH] D60974: Clang IFSO driver action.

2019-04-30 Thread Puyan Lotfi via Phabricator via cfe-commits
plotfi added a comment. In D60974#1483479 , @jakehehrlich wrote: > In D60974#1483380 , @plotfi wrote: > > > Also, curious on the lack of denoting the sections and which symbols go in > > which sections? Do you jus

[PATCH] D60974: Clang IFSO driver action.

2019-04-30 Thread Jake Ehrlich via Phabricator via cfe-commits
jakehehrlich added a comment. Well I think it should be a seperate tool but because the code inside llvm-elfabi isn't a library yet (though it is written to be used like one) we can do that by adding a symlink and changing the behavior of the underlying binary to present as a different tool. Ma

[PATCH] D60974: Clang IFSO driver action.

2019-04-30 Thread Puyan Lotfi via Phabricator via cfe-commits
plotfi added a comment. In D60974#1485417 , @jakehehrlich wrote: > Background: > There are two parts to this. TextAPI is a public interface of textual > representations for these sorts of files that already exists in llvm. There > exist ELF and MachO t

[PATCH] D60974: Clang IFSO driver action.

2019-04-30 Thread Jake Ehrlich via Phabricator via cfe-commits
jakehehrlich added a comment. Background: There are two parts to this. TextAPI is a public interface of textual representations for these sorts of files that already exists in llvm. There exist ELF and MachO textual representations currently. llvm-elfabi is a tool for 1) Creating Stubs 2) Creat

[PATCH] D60974: Clang IFSO driver action.

2019-04-30 Thread Puyan Lotfi via Phabricator via cfe-commits
plotfi added a comment. In D60974#1484744 , @jakehehrlich wrote: > > Does llvm-elfabi consume your proposed Schema format? Has it landed yet? > > No, I just proposed it and explained my reasoning. If you wanted to add this > format to TextAPI that would

[PATCH] D60974: Clang IFSO driver action.

2019-04-30 Thread Jake Ehrlich via Phabricator via cfe-commits
jakehehrlich added a comment. > Does llvm-elfabi consume your proposed Schema format? Has it landed yet? No, I just proposed it and explained my reasoning. If you wanted to add this format to TextAPI that would be acceptable. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION h

[PATCH] D60974: Clang IFSO driver action.

2019-04-29 Thread Puyan Lotfi via Phabricator via cfe-commits
plotfi added a comment. In D60974#1483480 , @jakehehrlich wrote: > In D60974#1483399 , @plotfi wrote: > > > In D60974#1483265 , @jakehehrlich > > wrote: > > > > > In D60974

[PATCH] D60974: Clang IFSO driver action.

2019-04-29 Thread Jake Ehrlich via Phabricator via cfe-commits
jakehehrlich added a comment. With respect to group handeling. I think we should just check that the details of every symbol across all unmerged files that are being merged are consistent and then ignore duplicates. For symbols that are not defined in sections that are a part of a comdat group

  1   2   >