[PATCH] D38424: MC Helpers for llvm-cfi-verify.
Mitch Phillips via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 4 13:09:02 PDT 2017
hctim added inline comments.
================
Comment at: tools/llvm-cfi-verify/FileVerifier.cpp:132
+bool FileVerifier::isUndefinedInstruction(const Instr &InstrMeta) const {
+ return MII->getName(InstrMeta.Instruction.getOpcode()) == "TRAP";
+}
----------------
vlad.tsyrklevich wrote:
> `getOpcode() == Instruction::Undefined?` Also, what if InstrMeta.Bad?
Made it more clear, this should only return true when the provided instruction is a trap used by CFI.
================
Comment at: tools/llvm-cfi-verify/FileVerifier.cpp:171
+
+ return &NextKV->second;
+ }
----------------
vlad.tsyrklevich wrote:
> Here you don't check `NextKV->second.bad` but below you do, which should it be?
Should be both. Updated the unit test for this.
https://reviews.llvm.org/D38424
More information about the llvm-commits
mailing list