From: Daniel Dunbar Date: Thu, 29 Jan 2009 08:48:06 +0000 (+0000) Subject: ABITest: Fix access to array test values. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e61e95fdcd2bdf6293becd96c343ab3635cc4a68;p=clang 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 5b9756b545..bdf0be4f1d 100755 --- a/utils/ABITest/ABITestGen.py +++ b/utils/ABITest/ABITestGen.py @@ -263,7 +263,10 @@ class TypePrinter: 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,)