summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/APValue.cpp
diff options
context:
space:
mode:
authorNate Begeman <natebegeman@mac.com>2009-01-18 03:20:47 +0000
committerNate Begeman <natebegeman@mac.com>2009-01-18 03:20:47 +0000
commit2f2bdeb5dfeff7e8066ce51b372e841254cfb91e (patch)
tree21f30567e87f2a5edb77dcf5950f770dfc6e59b6 /clang/lib/AST/APValue.cpp
parent144aacd19ef6dc25755c69048d4cb3a4a383ae8a (diff)
downloadbcm5719-llvm-2f2bdeb5dfeff7e8066ce51b372e841254cfb91e.tar.gz
bcm5719-llvm-2f2bdeb5dfeff7e8066ce51b372e841254cfb91e.zip
Support evaluation of vector constant expressions, and codegen of same.
llvm-svn: 62455
Diffstat (limited to 'clang/lib/AST/APValue.cpp')
-rw-r--r--clang/lib/AST/APValue.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/clang/lib/AST/APValue.cpp b/clang/lib/AST/APValue.cpp
index 87d9fc3442b..23e9e980c56 100644
--- a/clang/lib/AST/APValue.cpp
+++ b/clang/lib/AST/APValue.cpp
@@ -91,7 +91,9 @@ void APValue::print(llvm::raw_ostream &OS) const {
OS << "Float: " << GetApproxValue(getFloat());
return;
case Vector:
- OS << "Vector: <todo>";
+ OS << "Vector: " << getVectorElt(0);
+ for (unsigned i = 1; i != getVectorLength(); ++i)
+ OS << ", " << getVectorElt(i);
return;
case ComplexInt:
OS << "ComplexInt: " << getComplexIntReal() << ", " << getComplexIntImag();
OpenPOWER on IntegriCloud