[PATCH] D38379: Classify llvm-cfi-verify.

Vlad Tsyrklevich via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 9 09:21:46 PDT 2017


vlad.tsyrklevich added a comment.

Also waiting to hear your response on the 2 unit tests questions.



================
Comment at: tools/llvm-cfi-verify/FileAnalysis.cpp:63
+  // Init the rest of the object.
+  auto InitResponse = Analysis.initialiseDisassemblyMembers();
+  if (InitResponse)
----------------
nit: `if (auto InitResponse = ...)` here? seems a little cleaner to me


================
Comment at: tools/llvm-cfi-verify/FileAnalysis.cpp:67
+
+  auto SectionParseResponse = Analysis.parseCodeSections();
+  if (SectionParseResponse)
----------------
ditto


================
Comment at: tools/llvm-cfi-verify/FileAnalysis.cpp:98
+      Instructions.find(InstrMeta.VMAddress);
+
+  if (KV == Instructions.end() || ++KV == Instructions.end())
----------------
nit: remove line


================
Comment at: tools/llvm-cfi-verify/FileAnalysis.cpp:145
+      TargetRegistry::lookupTarget(ArchName, ObjectTriple, ErrorString);
+
+  if (!ObjectTarget)
----------------
nit:get rid of line


================
Comment at: tools/llvm-cfi-verify/FileAnalysis.h:140
+  // A list of addresses of indirect control flow instructions.
+  std::set<uint64_t> IndirectInstructions;
+};
----------------
I kept coming back to this trying to figure out what IndirectInstructions were, rename to IndirectBranches/getIndirectBranches()?


https://reviews.llvm.org/D38379





More information about the llvm-commits mailing list