diff options
| author | Chad Rosier <mcrosier@apple.com> | 2012-06-11 21:52:25 +0000 |
|---|---|---|
| committer | Chad Rosier <mcrosier@apple.com> | 2012-06-11 21:52:25 +0000 |
| commit | 175b507f5e891af1522f615b3bc8a62222443fda (patch) | |
| tree | b8c36d3a09dc7de5e3c3771ddbc9b83191bb1614 /clang/lib/CodeGen | |
| parent | e782fa649f22f5004890ae0f9458a2a197e3cf1e (diff) | |
| download | bcm5719-llvm-175b507f5e891af1522f615b3bc8a62222443fda.tar.gz bcm5719-llvm-175b507f5e891af1522f615b3bc8a62222443fda.zip | |
Make CodeGenFunction::EmitMSAsmStmt throw a fatal error as MS-style inline
assembly is completely untested and unsupported.
llvm-svn: 158329
Diffstat (limited to 'clang/lib/CodeGen')
| -rw-r--r-- | clang/lib/CodeGen/CGStmt.cpp | 39 |
1 files changed, 2 insertions, 37 deletions
diff --git a/clang/lib/CodeGen/CGStmt.cpp b/clang/lib/CodeGen/CGStmt.cpp index 2f06a8ed283..aabb8cdb712 100644 --- a/clang/lib/CodeGen/CGStmt.cpp +++ b/clang/lib/CodeGen/CGStmt.cpp @@ -1684,41 +1684,6 @@ void CodeGenFunction::EmitAsmStmt(const AsmStmt &S) { } void CodeGenFunction::EmitMSAsmStmt(const MSAsmStmt &S) { - // Analyze the asm string to decompose it into its pieces. We know that Sema - // has already done this, so it is guaranteed to be successful. - - // Get all the output and input constraints together. - - std::vector<llvm::Value*> Args; - std::vector<llvm::Type *> ArgTypes; - std::string Constraints; - - // Keep track of inout constraints. - - // Append the "input" part of inout constraints last. - - // Clobbers - - // Add machine specific clobbers - std::string MachineClobbers = Target.getClobbers(); - if (!MachineClobbers.empty()) { - if (!Constraints.empty()) - Constraints += ','; - Constraints += MachineClobbers; - } - - llvm::Type *ResultType = VoidTy; - - llvm::FunctionType *FTy = - llvm::FunctionType::get(ResultType, ArgTypes, false); - - llvm::InlineAsm *IA = - llvm::InlineAsm::get(FTy, *S.getAsmString(), Constraints, true); - llvm::CallInst *Result = Builder.CreateCall(IA, Args); - Result->addAttribute(~0, llvm::Attribute::NoUnwind); - - // Slap the source location of the inline asm into a !srcloc metadata on the - // call. - - // Extract all of the register value results from the asm. + // Analyze the asm string to decompose it into its pieces. + llvm::report_fatal_error("MS-style asm codegen isn't yet supported."); } |

