Small cleanup to lldb_private::GetVersion().
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Unit Tests
Event Timeline
lldb/source/lldb.cpp | ||
---|---|---|
22 | this won't expand to a string as is, does this indicate it's unused? |
LLDB_REVISION and LLDB_REPOSITORY are coming from VCSVersion.inc where it should be defined as a string. However the generation of that file seems to be broken since the monorepo migration. I put up a patch here that gets this working again: D88950
There is also the framework script that tries to define LLDB_REVISION but I assume that's only used for the headers we ship in the Framework? Not 100% sure what's going on with that.
Beside that, I think this code can really use some cleanup. I added some comments what else can be removed/updated.
lldb/source/lldb.cpp | ||
---|---|---|
20 | This can return a string. | |
29 | You can remove that comment too, it's from a time where there was special Darwin version code. |
@teemperor I removed the comment and restored repository handling. It becomes much more of a useless diff :)
Yeah there isn't a lot of unused code left here. If you want you can make a follow up replacing all the C-string logic with std::string (and removing the static local result var as that seems unnecessary).
This can return a string.