[cfe-commits] r158329 - /cfe/trunk/lib/CodeGen/CGStmt.cpp

Chad Rosier mcrosier at apple.com
Mon Jun 11 14:52:25 PDT 2012


Author: mcrosier
Date: Mon Jun 11 16:52:25 2012
New Revision: 158329

URL: http://llvm.org/viewvc/llvm-project?rev=158329&view=rev
Log:
Make CodeGenFunction::EmitMSAsmStmt throw a fatal error as MS-style inline
assembly is completely untested and unsupported.

Modified:
    cfe/trunk/lib/CodeGen/CGStmt.cpp

Modified: cfe/trunk/lib/CodeGen/CGStmt.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGStmt.cpp?rev=158329&r1=158328&r2=158329&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGStmt.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGStmt.cpp Mon Jun 11 16:52:25 2012
@@ -1684,41 +1684,6 @@
 }
 
 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.");
 }





More information about the cfe-commits mailing list