[PATCH] D27718: [LLD][ARM] Accept first SHT_ARM_ATTRIBUTES section

Rui Ueyama via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 13 10:39:00 PST 2016


ruiu accepted this revision.
ruiu added a comment.
This revision is now accepted and ready to land.

LGTM



================
Comment at: ELF/InputFiles.cpp:344
+    // In a full implementation we would merge all attribute sections.
+    if (In<ELFT>::ARMAttributes == nullptr) {
+      In<ELFT>::ARMAttributes = make<InputSection<ELFT>>(this, &Sec, Name);
----------------
So you are using In<ELFT>::ARMAttributes as a boolean flag rather than an InputSection object in the sense that the variable is used only to check if we have already created a section instance for ARMAttribute. It doesn't feel like the right approach to me, but honestly I cannot think of a better way. So, LGTM, but do you think any other ways?


https://reviews.llvm.org/D27718





More information about the llvm-commits mailing list