diff options
Diffstat (limited to 'lib/CodeGen/CGStmt.cpp')
-rw-r--r-- | lib/CodeGen/CGStmt.cpp | 24 |
1 files changed, 1 insertions, 23 deletions
diff --git a/lib/CodeGen/CGStmt.cpp b/lib/CodeGen/CGStmt.cpp index d78908dee8..467c77945e 100644 --- a/lib/CodeGen/CGStmt.cpp +++ b/lib/CodeGen/CGStmt.cpp @@ -1691,36 +1691,14 @@ void CodeGenFunction::EmitMSAsmStmt(const MSAsmStmt &S) { std::vector<llvm::Value*> Args; std::vector<llvm::Type *> ArgTypes; - std::string Constraints; - - // Clobbers - for (unsigned i = 0, e = S.getNumClobbers(); i != e; ++i) { - StringRef Clobber = S.getClobber(i); - - if (Clobber != "memory" && Clobber != "cc") - Clobber = Target.getNormalizedGCCRegisterName(Clobber); - - if (i != 0) - Constraints += ','; - - Constraints += "~{"; - Constraints += Clobber; - Constraints += '}'; - } - // Add machine specific clobbers std::string MachineClobbers = Target.getClobbers(); - if (!MachineClobbers.empty()) { - if (!Constraints.empty()) - Constraints += ','; - Constraints += MachineClobbers; - } llvm::FunctionType *FTy = llvm::FunctionType::get(VoidTy, ArgTypes, false); llvm::InlineAsm *IA = - llvm::InlineAsm::get(FTy, *S.getAsmString(), Constraints, true); + llvm::InlineAsm::get(FTy, *S.getAsmString(), MachineClobbers, true); llvm::CallInst *Result = Builder.CreateCall(IA, Args); Result->addAttribute(~0, llvm::Attribute::NoUnwind); Result->addAttribute(~0, llvm::Attribute::IANSDialect); |