Make instcombine promote inline asm calls to 'nounwind'
[oota-llvm.git] / lib / VMCore / Instructions.cpp
index 5207ea52f49325370b0bc340a1d82d9cb6fbf2f6..511a0e851a10e9747a6ff5d5c66f52b78497ce36 100644 (file)
@@ -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();
+}