summaryrefslogtreecommitdiffstats
path: root/llvm/lib/IR/Verifier.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/IR/Verifier.cpp')
-rw-r--r--llvm/lib/IR/Verifier.cpp21
1 files changed, 15 insertions, 6 deletions
diff --git a/llvm/lib/IR/Verifier.cpp b/llvm/lib/IR/Verifier.cpp
index 9e77c32ee4b..85251551f99 100644
--- a/llvm/lib/IR/Verifier.cpp
+++ b/llvm/lib/IR/Verifier.cpp
@@ -131,15 +131,24 @@ private:
template <typename... Ts> void WriteTs() {}
public:
- // CheckFailed - A check failed, so print out the condition and the message
- // that failed. This provides a nice place to put a breakpoint if you want
- // to see why something is not correct.
- template <typename... Ts>
- void CheckFailed(const Twine &Message, const Ts &... Vs) {
+ // \brief A check failed, so printout out the condition and the message.
+ //
+ // This provides a nice place to put a breakpoint if you want to see why
+ // something is not correct.
+ void CheckFailed(const Twine &Message) {
OS << Message << '\n';
- WriteTs(Vs...);
Broken = true;
}
+
+ // \brief A check failed (with values to print).
+ //
+ // This calls the Message-only version so that the above is easier to set a
+ // breakpoint on.
+ template <typename T1, typename... Ts>
+ void CheckFailed(const Twine &Message, const T1 &V1, const Ts &... Vs) {
+ CheckFailed(Message);
+ WriteTs(V1, Vs...);
+ }
};
class Verifier : public InstVisitor<Verifier>, VerifierSupport {
OpenPOWER on IntegriCloud