Skip to content
This repository has been archived by the owner on Aug 22, 2019. It is now read-only.

Use binary version identifiers instead of textual #686

Closed
wants to merge 1 commit into from

Conversation

okutane
Copy link

@okutane okutane commented Apr 22, 2017

Hello!
I'm proposing a small step towards generalization of sulong so it can be used with more LLVM bitcode producers.
Originally, I've tried to use it with apple clang (which version string is different from original clang's) and it's failed to parse, while bitcode file was totally compatible.

So I've looked into http://llvm.org/docs/BitCodeFormat.html#module-code-version-record and I think version number from MODULE_BLOCK is more strict and reliable than version strings.

This change is also needed for stuff like #654

I'm actually using sulong just for parsing, but I want to parse as many llvm based languages as possible, so more improvements toward generalization are to come (if you don't mind :) )

Changes overview:

  • sulong.LLVM option is removed, as we now using correct version taken from bitcode file being parsed;
  • version specific parsers are renamed to match bitcode format versions not clang versions;
  • listeners.Identification now does nothing, but kept to prevent warning about ignored records.

@graalvmbot
Copy link
Collaborator

  • It appears that user Dmitry Matveev with email address dmitriy -(dot)- g -(dot)- matveev -(at)- gmail -(dot)- com has not signed the Oracle Contributor Agreement.

If you believe this is an error, please contact [email protected].

@graalvmbot
Copy link
Collaborator

  • User Dmitry Matveev with email address dmitriy -(dot)- g -(dot)- matveev -(at)- gmail -(dot)- com is now cleared for contributions.

@grimmerm
Copy link
Contributor

grimmerm commented Apr 24, 2017

Dmitry, thanks for this contributions (and all future ones; we are looking forward to them)!

@okutane
Copy link
Author

okutane commented Apr 27, 2017

Hm.. my implementation is totally incorrect. I've misinterpret the point of 3.2 / 3.8 versioning. And my fix should be not about changing switch logic, but about generalizing these versions. I think I'll create different PR for that later.

@okutane okutane closed this Apr 27, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants