[llvm-commits] [llvm] r74883 - /llvm/trunk/include/llvm/CodeGen/MachineOperand.h

Devang Patel dpatel at apple.com
Mon Jul 6 16:46:03 PDT 2009


Author: dpatel
Date: Mon Jul  6 18:46:02 2009
New Revision: 74883

URL: http://llvm.org/viewvc/llvm-project?rev=74883&view=rev
Log:
Add isMetadata() to check metadata operand.

Modified:
    llvm/trunk/include/llvm/CodeGen/MachineOperand.h

Modified: llvm/trunk/include/llvm/CodeGen/MachineOperand.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/MachineOperand.h?rev=74883&r1=74882&r2=74883&view=diff

==============================================================================
--- llvm/trunk/include/llvm/CodeGen/MachineOperand.h (original)
+++ llvm/trunk/include/llvm/CodeGen/MachineOperand.h Mon Jul  6 18:46:02 2009
@@ -164,6 +164,8 @@
   bool isGlobal() const { return OpKind == MO_GlobalAddress; }
   /// isSymbol - Tests if this is a MO_ExternalSymbol operand.
   bool isSymbol() const { return OpKind == MO_ExternalSymbol; }
+  /// isMetadata - Tests if this is a MO_Metadata operand.
+  bool isMetadata() const { return OpKind == MO_Metadata; }
 
   //===--------------------------------------------------------------------===//
   // Accessors for Register Operands
@@ -325,7 +327,7 @@
   }
 
   void setOffset(int64_t Offset) {
-    assert((isGlobal() || isSymbol() || isCPI()) &&
+    assert((isGlobal() || isSymbol() || isCPI() || isMetadata()) &&
         "Wrong MachineOperand accessor");
     Contents.OffsetedInfo.Offset = Offset;
   }





More information about the llvm-commits mailing list