summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorReid Kleckner <reid@kleckner.net>2015-05-06 18:45:24 +0000
committerReid Kleckner <reid@kleckner.net>2015-05-06 18:45:24 +0000
commitd1b38c4b0bf4c912ed3251b45c2168b6f190d0b2 (patch)
tree02cd1dfaad2318851dc840212482251af4a562b6 /llvm/lib/CodeGen
parentf9f62b116f18477220eb5f37d326537e9ac3ebee (diff)
downloadbcm5719-llvm-d1b38c4b0bf4c912ed3251b45c2168b6f190d0b2.tar.gz
bcm5719-llvm-d1b38c4b0bf4c912ed3251b45c2168b6f190d0b2.zip
[WinEH] Improve fatal error message about failed demotion
llvm-svn: 236626
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/WinEHPrepare.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/WinEHPrepare.cpp b/llvm/lib/CodeGen/WinEHPrepare.cpp
index 2c72a556f75..f9497a3d989 100644
--- a/llvm/lib/CodeGen/WinEHPrepare.cpp
+++ b/llvm/lib/CodeGen/WinEHPrepare.cpp
@@ -1732,7 +1732,12 @@ Value *WinEHFrameVariableMaterializer::materializeValueFor(Value *V) {
}
if (isa<Instruction>(V) || isa<Argument>(V)) {
- errs() << "Failed to demote instruction used in exception handler:\n";
+ Function *Parent = isa<Instruction>(V)
+ ? cast<Instruction>(V)->getParent()->getParent()
+ : cast<Argument>(V)->getParent();
+ errs()
+ << "Failed to demote instruction used in exception handler of function "
+ << GlobalValue::getRealLinkageName(Parent->getName()) << ":\n";
errs() << " " << *V << '\n';
report_fatal_error("WinEHPrepare failed to demote instruction");
}
OpenPOWER on IntegriCloud