]> granicus.if.org Git - clang/commitdiff
inline asm calls should be nounwind. Chris, please review.
authorAnders Carlsson <andersca@mac.com>
Mon, 2 Mar 2009 19:58:15 +0000 (19:58 +0000)
committerAnders Carlsson <andersca@mac.com>
Mon, 2 Mar 2009 19:58:15 +0000 (19:58 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65866 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CGStmt.cpp

index 307dccff2f24e93ab11f9fda508a3376c701223a..cbd8a897bd203fa3955e2a051d053dbe79fa3526 100644 (file)
@@ -1003,7 +1003,10 @@ void CodeGenFunction::EmitAsmStmt(const AsmStmt &S) {
   llvm::InlineAsm *IA = 
     llvm::InlineAsm::get(FTy, AsmString, Constraints, 
                          S.isVolatile() || S.getNumOutputs() == 0);
-  llvm::Value *Result = Builder.CreateCall(IA, Args.begin(), Args.end(), "");
+  llvm::CallInst *Result
+    = Builder.CreateCall(IA, Args.begin(), Args.end(), "");
+  Result->addAttribute(~0, llvm::Attribute::NoUnwind);
+  
   if (ResultAddr) // FIXME: volatility
     Builder.CreateStore(Result, ResultAddr);
 }