Add support for global variables
authorChris Lattner <sabre@nondot.org>
Mon, 10 Sep 2001 20:07:57 +0000 (20:07 +0000)
committerChris Lattner <sabre@nondot.org>
Mon, 10 Sep 2001 20:07:57 +0000 (20:07 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@535 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Analysis/Expressions.cpp

index 2194d1f1ee869f599c96b808ceaf48daf2d5e414..e41182a08491431eb80dfcfd66729e3e54ed58bc 100644 (file)
@@ -165,9 +165,10 @@ ExprType analysis::ClassifyExpression(Value *Expr) {
   switch (Expr->getValueType()) {
   case Value::InstructionVal: break;    // Instruction... hmmm... investigate.
   case Value::TypeVal:   case Value::BasicBlockVal:
-  case Value::MethodVal: case Value::ModuleVal:
+  case Value::MethodVal: case Value::ModuleVal: default:
     assert(0 && "Unexpected expression type to classify!");
-  case Value::MethodArgumentVal:        // Method arg: nothing known, return var
+  case Value::GlobalVal:                // Global Variable & Method argument:
+  case Value::MethodArgumentVal:        // nothing known, return variable itself
     return Expr;
   case Value::ConstantVal:              // Constant value, just return constant
     ConstPoolVal *CPV = Expr->castConstantAsserting();