Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add LLVM file types and extensions as well as extensions used by LLVM #27

Merged
merged 1 commit into from
Jan 6, 2019

Conversation

chandlerc
Copy link
Contributor

in various places.

This includes the LLVM textual IR (.ll), generated bitcode files (.bc),
a custom language used in LLVM's implementation called "TableGen" (.td),
and C++ extensions used for generated code and X-macro files (.def and
.inc).

Bitcode files are treated similarly to object files, although that is
a bit odd. They are somewhere between archives and object files in terms
of utility, but they most often show up as intermediate files. When
being packaged and used, they are more commonly placed into an archive,
so this seems the least confusing scheme to me.

@dtzWill
Copy link

dtzWill commented Jan 4, 2019

LGTM! .bca is long dead, can't think of other LLVM suffixes to add. Thanks!

@sharkdp
Copy link
Owner

sharkdp commented Jan 5, 2019

Thank you very much for your contribution!

Concerning the categorization, there are two paths we could follow:

  • Group file extensions by the content of the file. This is essentially what you did, i.e. label .inc and .def files as programming.source.cxx.
  • Group files that "belong together". In this case, we would maybe put .inc and .def files in the same category as the textual IR (programming.source.llvm).

I have to admit that I didn't follow either style very closely (so far), but I think this would be a good point to agree on a general "guideline". In the end, this depends on what we think would be a more useful visual grouping by color in the terminal output.

in various places.

This includes the LLVM textual IR (`.ll`), machine IR (`.mir`) generated
bitcode files (`.bc`), a custom language used in LLVM's implementation
called "TableGen" (`.td`), and C++ extensions used for generated code
and X-macro files (`.def` and `.inc`).

Bitcode files are treated similarly to object files, although that is
a bit odd. They are somewhere between archives and object files in terms
of utility, but they most often show up as intermediate files. When
being packaged and used, they are more commonly placed into an archive,
so this seems the least confusing scheme to me.
@chandlerc
Copy link
Contributor Author

Concerning the categorization, there are two paths we could follow:

  • Group file extensions by the content of the file. This is essentially what you did, i.e. label .inc and .def files as programming.source.cxx.
  • Group files that "belong together". In this case, we would maybe put .inc and .def files in the same category as the textual IR (programming.source.llvm).

I don't think this is the case here.

While .inc and .def are motivated by the LLVM project's usage of them, we use them as just another form of C++ code. I really think that if they belong in a group, it is the same one as .cpp and .inl. The LLVM textual IR files are very different and wouldn't "belong together" in any real sense.

I actually forgot one LLVM file type: .mir which is used for a different intermediate format. These do in a sense belong together. However, their contents have nothing in common. I've added .mir in the llvm group, but happy to move it.

I also have no personal preference on how you organize them, justed seemed easy to add the ones from a project I work on here.

Copy link
Owner

@sharkdp sharkdp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, makes sense. Thank you very much.

@sharkdp sharkdp merged commit 9a11c00 into sharkdp:master Jan 6, 2019
@chandlerc chandlerc deleted the llvm branch January 1, 2021 01:18
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants