ABITest: Fix access to array test values.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63296 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/utils/ABITest/ABITestGen.py b/utils/ABITest/ABITestGen.py
index 5b9756b..bdf0be4 100755
--- a/utils/ABITest/ABITestGen.py
+++ b/utils/ABITest/ABITestGen.py
@@ -263,7 +263,10 @@
             for i in range(t.numElements):
                 # Access in this fashion as a hackish way to portably
                 # access vectors.
-                self.printValueOfType(prefix, '((%s*) &%s)[%d]'%(t.elementType,name,i), t.elementType, output=output,indent=indent)                            
+                if t.isVector:
+                    self.printValueOfType(prefix, '((%s*) &%s)[%d]'%(t.elementType,name,i), t.elementType, output=output,indent=indent)
+                else:
+                    self.printValueOfType(prefix, '%s[%d]'%(name,i), t.elementType, output=output,indent=indent)                    
         else:
             raise NotImplementedError,'Cannot print value of type: "%s"'%(t,)