[llvm-commits] [llvm] r88711 - /llvm/trunk/include/llvm/Value.h

Dan Gohman gohman at apple.com
Fri Nov 13 14:24:13 PST 2009


Author: djg
Date: Fri Nov 13 16:24:13 2009
New Revision: 88711

URL: http://llvm.org/viewvc/llvm-project?rev=88711&view=rev
Log:
Move the FixedStackPseudoSourceValueVal enum value before InstructionVal
so that isa<Instructon> doesn't return true for FixedStackPseudoSourceValue
values. This fixes a variety of problems, including crashes with -debug
and -print-machineinstrs. Also, add a comment to warn about this.

Modified:
    llvm/trunk/include/llvm/Value.h

Modified: llvm/trunk/include/llvm/Value.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Value.h?rev=88711&r1=88710&r2=88711&view=diff

==============================================================================
--- llvm/trunk/include/llvm/Value.h (original)
+++ llvm/trunk/include/llvm/Value.h Fri Nov 13 16:24:13 2009
@@ -224,9 +224,11 @@
     NamedMDNodeVal,           // This is an instance of NamedMDNode
     InlineAsmVal,             // This is an instance of InlineAsm
     PseudoSourceValueVal,     // This is an instance of PseudoSourceValue
-    InstructionVal,           // This is an instance of Instruction
     FixedStackPseudoSourceValueVal, // This is an instance of 
                                     // FixedStackPseudoSourceValue
+    InstructionVal,           // This is an instance of Instruction
+    // Enum values starting at InstructionVal are used for Instructions;
+    // don't add new values here!
 
     // Markers:
     ConstantFirstVal = FunctionVal,





More information about the llvm-commits mailing list