summaryrefslogtreecommitdiffstats
path: root/clang/utils/ABITest/ABITestGen.py
diff options
context:
space:
mode:
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