summaryrefslogtreecommitdiffstats
path: root/llvm/lib/VMCore/Instructions.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/VMCore/Instructions.cpp')
-rw-r--r--llvm/lib/VMCore/Instructions.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/lib/VMCore/Instructions.cpp b/llvm/lib/VMCore/Instructions.cpp
index 5207ea52f49..511a0e851a1 100644
--- a/llvm/lib/VMCore/Instructions.cpp
+++ b/llvm/lib/VMCore/Instructions.cpp
@@ -65,6 +65,12 @@ bool CallSite::onlyReadsMemory() const {
else
return cast<InvokeInst>(I)->onlyReadsMemory();
}
+bool CallSite::isNoUnwind() const {
+ if (CallInst *CI = dyn_cast<CallInst>(I))
+ return CI->isNoUnwind();
+ else
+ return cast<InvokeInst>(I)->isNoUnwind();
+}
OpenPOWER on IntegriCloud