diff options
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/CodeGen/WinEHPrepare.cpp | 7 |
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"); } |