summaryrefslogtreecommitdiffstats
path: root/clang/utils/ABITest/ABITestGen.py
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-01-29 08:48:06 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-01-29 08:48:06 +0000
commitd0c901c5a65dc636b7684a06b1eca27ba23dbfdc (patch)
tree173518ac4fae33b82a1114172d1e030533d51c11 /clang/utils/ABITest/ABITestGen.py
parent7cd7d47c5cd091b93af801974bdabbd572a184f5 (diff)
downloadbcm5719-llvm-d0c901c5a65dc636b7684a06b1eca27ba23dbfdc.tar.gz
bcm5719-llvm-d0c901c5a65dc636b7684a06b1eca27ba23dbfdc.zip
ABITest: Fix access to array test values.
llvm-svn: 63296
Diffstat (limited to 'clang/utils/ABITest/ABITestGen.py')
-rwxr-xr-xclang/utils/ABITest/ABITestGen.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/clang/utils/ABITest/ABITestGen.py b/clang/utils/ABITest/ABITestGen.py
index 5b9756b5450..bdf0be4f1d9 100755
--- a/clang/utils/ABITest/ABITestGen.py
+++ b/clang/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,)
OpenPOWER on IntegriCloud