summaryrefslogtreecommitdiff
path: root/lib/IR/Verifier.cpp
diff options
context:
space:
mode:
authorJustin Bogner <mail@justinbogner.com>2014-03-10 21:22:44 +0000
committerJustin Bogner <mail@justinbogner.com>2014-03-10 21:22:44 +0000
commite62ce0107ff29147187c0721c30292d27ea6cb63 (patch)
tree324ff967aac6bb2b766db7f47d17ba6cde3e1766 /lib/IR/Verifier.cpp
parent8da0b7358d30b8a91648bd30046137376bf85464 (diff)
downloadllvm-e62ce0107ff29147187c0721c30292d27ea6cb63.tar.gz
llvm-e62ce0107ff29147187c0721c30292d27ea6cb63.tar.bz2
llvm-e62ce0107ff29147187c0721c30292d27ea6cb63.tar.xz
IR: Slightly more verbose error in Verifier
Extend the error message generated by the Verifier when an intrinsic name does not match the expected mangling to include the expected name. Simplifies debugging. Patch by Philip Reames! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203490 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/IR/Verifier.cpp')
-rw-r--r--lib/IR/Verifier.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/IR/Verifier.cpp b/lib/IR/Verifier.cpp
index f49cca5a3e..158601226a 100644
--- a/lib/IR/Verifier.cpp
+++ b/lib/IR/Verifier.cpp
@@ -2239,8 +2239,10 @@ void Verifier::visitIntrinsicFunctionCall(Intrinsic::ID ID, CallInst &CI) {
// know they are legal for the intrinsic!) get the intrinsic name through the
// usual means. This allows us to verify the mangling of argument types into
// the name.
- Assert1(Intrinsic::getName(ID, ArgTys) == IF->getName(),
- "Intrinsic name not mangled correctly for type arguments!", IF);
+ const std::string ExpectedName = Intrinsic::getName(ID, ArgTys);
+ Assert1(ExpectedName == IF->getName(),
+ "Intrinsic name not mangled correctly for type arguments! "
+ "Should be: " + ExpectedName, IF);
// If the intrinsic takes MDNode arguments, verify that they are either global
// or are local to *this* function.