[cfe-commits] r70137 - in /cfe/trunk: include/clang/Basic/TargetInfo.h lib/Basic/TargetInfo.cpp lib/Sema/SemaStmt.cpp

Chris Lattner sabre at nondot.org
Sun Apr 26 11:05:25 PDT 2009


Author: lattner
Date: Sun Apr 26 13:05:25 2009
New Revision: 70137

URL: http://llvm.org/viewvc/llvm-project?rev=70137&view=rev
Log:
in a tied operand, don't copy over the name or constraint string, just the flags.

Modified:
    cfe/trunk/include/clang/Basic/TargetInfo.h
    cfe/trunk/lib/Basic/TargetInfo.cpp
    cfe/trunk/lib/Sema/SemaStmt.cpp

Modified: cfe/trunk/include/clang/Basic/TargetInfo.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/TargetInfo.h?rev=70137&r1=70136&r2=70137&view=diff

==============================================================================
--- cfe/trunk/include/clang/Basic/TargetInfo.h (original)
+++ cfe/trunk/include/clang/Basic/TargetInfo.h Sun Apr 26 13:05:25 2009
@@ -231,7 +231,15 @@
     void setIsReadWrite() { Flags |= CI_ReadWrite; }
     void setAllowsMemory() { Flags |= CI_AllowsMemory; }
     void setAllowsRegister() { Flags |= CI_AllowsRegister; }
-    void setTiedOperand(unsigned N) { TiedOperand = N; }
+    
+    /// setTiedOperand - Indicate that this is an input operand that is tied to
+    /// the specified output operand.  Copy over the various constraint
+    /// information from the output.
+    void setTiedOperand(unsigned N, ConstraintInfo &Output) {
+      Flags = Output.Flags;
+      TiedOperand = N;
+      // Don't copy Name or constraint string.
+    }
   };
 
   // validateOutputConstraint, validateInputConstraint - Checks that

Modified: cfe/trunk/lib/Basic/TargetInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/TargetInfo.cpp?rev=70137&r1=70136&r2=70137&view=diff

==============================================================================
--- cfe/trunk/lib/Basic/TargetInfo.cpp (original)
+++ cfe/trunk/lib/Basic/TargetInfo.cpp Sun Apr 26 13:05:25 2009
@@ -245,8 +245,7 @@
         
         // The constraint should have the same info as the respective 
         // output constraint.
-        Info = OutputConstraints[i];
-        Info.setTiedOperand(i);
+        Info.setTiedOperand(i, OutputConstraints[i]);
       } else if (!validateAsmConstraint(Name, Info)) {
         // FIXME: This error return is in place temporarily so we can
         // add more constraints as we hit it.  Eventually, an unknown

Modified: cfe/trunk/lib/Sema/SemaStmt.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaStmt.cpp?rev=70137&r1=70136&r2=70137&view=diff

==============================================================================
--- cfe/trunk/lib/Sema/SemaStmt.cpp (original)
+++ cfe/trunk/lib/Sema/SemaStmt.cpp Sun Apr 26 13:05:25 2009
@@ -915,7 +915,6 @@
     return StmtError(Diag(AsmString->getLocStart(),diag::err_asm_wide_character)
       << AsmString->getSourceRange());
 
-
   for (unsigned i = 0; i != NumOutputs; i++) {
     StringLiteral *Literal = Constraints[i];
     if (Literal->isWide())





More information about the cfe-commits mailing list