summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis/Lint.cpp
diff options
context:
space:
mode:
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>2015-03-14 16:47:37 +0000
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>2015-03-14 16:47:37 +0000
commitec9d3f779a2265a07ca9ce7ad472f03528318972 (patch)
treef3b83541878386fe23036bd677be05a634c40989 /llvm/lib/Analysis/Lint.cpp
parentdfb9790a3d9564819c9b529c19675300e20d461f (diff)
downloadbcm5719-llvm-ec9d3f779a2265a07ca9ce7ad472f03528318972.tar.gz
bcm5719-llvm-ec9d3f779a2265a07ca9ce7ad472f03528318972.zip
Recover the ability to 'b CheckFailed' after r231577
Given that the stated purpose of `CheckFailed()` is to provide a nice spot for a breakpoint, it'd be nice not to have to use a regex to break on it. Recover the ability to simply use `b CheckFailed` by specializing the message-only version, and by changing the variadic version to call into the message-only version. llvm-svn: 232268
Diffstat (limited to 'llvm/lib/Analysis/Lint.cpp')
-rw-r--r--llvm/lib/Analysis/Lint.cpp21
1 files changed, 14 insertions, 7 deletions
diff --git a/llvm/lib/Analysis/Lint.cpp b/llvm/lib/Analysis/Lint.cpp
index 887688737b0..9260eb2c007 100644
--- a/llvm/lib/Analysis/Lint.cpp
+++ b/llvm/lib/Analysis/Lint.cpp
@@ -141,13 +141,20 @@ namespace {
}
}
- // 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) {
- MessagesStr << Message << '\n';
- WriteValues({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) { MessagesStr << Message << '\n'; }
+
+ // \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);
+ WriteValues({V1, Vs...});
}
};
}
OpenPOWER on IntegriCloud