[PATCH] D125784: [llvm-dva] 09 - CodeView Reader
Carlos Alberto Enciso via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 21 00:36:14 PDT 2022
CarlosAlbertoEnciso added inline comments.
================
Comment at: llvm/lib/DebugInfo/LogicalView/Readers/LVCodeViewReader.cpp:493
+ // ".debug$P" section.
+ COFFObjectFile &Obj = *dyn_cast<COFFObjectFile>(&BinaryObj);
+ for (const SectionRef &Section : Obj.sections()) {
----------------
psamolysov wrote:
> If we are sure that `BinaryObj` is an instance of the `COFFObjectFile` here, could we just use `cast<>` instead of `dyn_cast<>`?
You are correct. Replaced with `cast<>`.
================
Comment at: llvm/lib/DebugInfo/LogicalView/Readers/LVCodeViewReader.cpp:840
+
+ const COFFObjectFile *Object = dyn_cast<COFFObjectFile>(&Obj);
+
----------------
psamolysov wrote:
> I believe a `cast<>` is enough if you are sure the `Obj` is an instance of the `COFFObjectFile` here.
You are correct. Replaced with `cast<>`.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D125784/new/
https://reviews.llvm.org/D125784
More information about the llvm-commits
mailing list