llvm.org GIT mirror llvm / 0ec29cb
[cfi-verify] Added a simple check that stops division-by-zero error when no indirect CF instructions are found in the provided file. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317500 91177308-0d34-0410-b5e6-96231b3b80d8 Mitch Phillips 1 year, 11 months ago
1 changed file(s) with 3 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
131131 uint64_t IndirectCFInstructions = ExpectedProtected + UnexpectedProtected +
132132 ExpectedUnprotected + UnexpectedUnprotected;
133133
134 if (IndirectCFInstructions == 0)
134 if (IndirectCFInstructions == 0) {
135135 outs() << "No indirect CF instructions found.\n";
136 return;
137 }
136138
137139 outs() << formatv("Expected Protected: {0} ({1:P})\n"
138140 "Unexpected Protected: {2} ({3:P})\n"