[PATCH] D60616: Make parseBitcodeFile use a named StructType, if it exists and matches.
Arnt Gulbrandsen via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 15 07:16:38 PDT 2019
arnt marked 4 inline comments as done.
arnt added a comment.
I didn't mean to suggest that I'd done all of them, I just ran out of working time on Friday. I attended to the rest now and will push a new revision as soon as the tests have run.
================
Comment at: llvm/include/llvm/IR/DerivedTypes.h:271-272
}
+ static StructType *getIfExists(LLVMContext &Context, StringRef Name);
+
----------------
lebedev.ri wrote:
> This probably deserves a `///` doxygen comment
Yes.
There could be a lot more of them in general. Doxygen sucks.
================
Comment at: llvm/lib/Bitcode/Reader/BitcodeReader.cpp:1549-1550
+ ArrayRef<Type *> EltTys) {
+ StructType * Candidate = StructType::getIfExists(Context, Name);
+ if (Candidate && EltTys.equals(Candidate->elements()))
+ return Candidate;
----------------
lebedev.ri wrote:
> here and elsewhere - not from clang-format
> (you can just setup a git pre-commit hook so all your commits will have correct formatting)
I added the emacs integration. I'll try the git commit hook before my next pull request, thanks for the suggestion.
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D60616/new/
https://reviews.llvm.org/D60616
More information about the llvm-commits
mailing list