summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-cfi-verify/lib/FileAnalysis.h
diff options
context:
space:
mode:
authorMitch Phillips <mitchphillips@outlook.com>2017-11-14 22:43:13 +0000
committerMitch Phillips <mitchphillips@outlook.com>2017-11-14 22:43:13 +0000
commit02993892d81f256d1a4a61bb4886db3376a75644 (patch)
tree34ba89032d0ee2746aeba55cac62a0e50ba5c905 /llvm/tools/llvm-cfi-verify/lib/FileAnalysis.h
parente6201c8724dbce94969bc0b7f81e950cdbb6f742 (diff)
downloadbcm5719-llvm-02993892d81f256d1a4a61bb4886db3376a75644.tar.gz
bcm5719-llvm-02993892d81f256d1a4a61bb4886db3376a75644.zip
[cfi-verify] Add DOT graph printing for GraphResult objects.
Allows users to view GraphResult objects in a DOT directed-graph format. This feature can be turned on through the --print-graphs flag. Also enabled pretty-printing of instructions in output. Together these features make analysis of unprotected CF instructions much easier by providing a visual control flow graph. Reviewers: pcc Subscribers: llvm-commits, kcc, vlad.tsyrklevich Differential Revision: https://reviews.llvm.org/D39819 llvm-svn: 318211
Diffstat (limited to 'llvm/tools/llvm-cfi-verify/lib/FileAnalysis.h')
-rw-r--r--llvm/tools/llvm-cfi-verify/lib/FileAnalysis.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/tools/llvm-cfi-verify/lib/FileAnalysis.h b/llvm/tools/llvm-cfi-verify/lib/FileAnalysis.h
index dfeff13863b..820c3683540 100644
--- a/llvm/tools/llvm-cfi-verify/lib/FileAnalysis.h
+++ b/llvm/tools/llvm-cfi-verify/lib/FileAnalysis.h
@@ -145,6 +145,10 @@ public:
// flow instruction in this file.
CFIProtectionStatus validateCFIProtection(const GraphResult &Graph) const;
+ // Prints an instruction to the provided stream using this object's pretty-
+ // printers.
+ void printInstruction(const Instr &InstrMeta, raw_ostream &OS) const;
+
protected:
// Construct a blank object with the provided triple and features. Used in
// testing, where a sub class will dependency inject protected methods to
OpenPOWER on IntegriCloud