Move the FixedStackPseudoSourceValueVal enum value before InstructionVal
authorDan Gohman <gohman@apple.com>
Fri, 13 Nov 2009 22:24:13 +0000 (22:24 +0000)
committerDan Gohman <gohman@apple.com>
Fri, 13 Nov 2009 22:24:13 +0000 (22:24 +0000)
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88711 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Value.h

index eba93723308426b8a6eb3cd5b04f3e433221c8b0..0960346cb8a6df25e81711ec20743b6843d6c338 100644 (file)
@@ -224,9 +224,11 @@ public:
     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,