diff options
| author | Chris Lattner <sabre@nondot.org> | 2010-06-23 06:00:24 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2010-06-23 06:00:24 +0000 |
| commit | 37141f4fb4ac93cee02ead6bae49539086d2629f (patch) | |
| tree | 8823447a65934f464cda11172b9048e57c12f761 /clang/lib/Frontend | |
| parent | b48a2d5d2fb71df0ff5cbfc33d0879da19ead9f4 (diff) | |
| download | bcm5719-llvm-37141f4fb4ac93cee02ead6bae49539086d2629f.tar.gz bcm5719-llvm-37141f4fb4ac93cee02ead6bae49539086d2629f.zip | |
improve altivec vector bool/pixel support, patch by Anton Yartsev
with several tweaks by me.
llvm-svn: 106619
Diffstat (limited to 'clang/lib/Frontend')
| -rw-r--r-- | clang/lib/Frontend/PCHReader.cpp | 10 | ||||
| -rw-r--r-- | clang/lib/Frontend/PCHWriter.cpp | 3 |
2 files changed, 6 insertions, 7 deletions
diff --git a/clang/lib/Frontend/PCHReader.cpp b/clang/lib/Frontend/PCHReader.cpp index b83445bc50b..97c4d380ebe 100644 --- a/clang/lib/Frontend/PCHReader.cpp +++ b/clang/lib/Frontend/PCHReader.cpp @@ -2060,20 +2060,20 @@ QualType PCHReader::ReadTypeRecord(uint64_t Offset) { } case pch::TYPE_VECTOR: { - if (Record.size() != 4) { + if (Record.size() != 3) { Error("incorrect encoding of vector type in PCH file"); return QualType(); } QualType ElementType = GetType(Record[0]); unsigned NumElements = Record[1]; - bool AltiVec = Record[2]; - bool Pixel = Record[3]; - return Context->getVectorType(ElementType, NumElements, AltiVec, Pixel); + unsigned AltiVecSpec = Record[2]; + return Context->getVectorType(ElementType, NumElements, + (VectorType::AltiVecSpecific)AltiVecSpec); } case pch::TYPE_EXT_VECTOR: { - if (Record.size() != 4) { + if (Record.size() != 3) { Error("incorrect encoding of extended vector type in PCH file"); return QualType(); } diff --git a/clang/lib/Frontend/PCHWriter.cpp b/clang/lib/Frontend/PCHWriter.cpp index 1fb90851b5b..a55684a29a9 100644 --- a/clang/lib/Frontend/PCHWriter.cpp +++ b/clang/lib/Frontend/PCHWriter.cpp @@ -128,8 +128,7 @@ void PCHTypeWriter::VisitVariableArrayType(const VariableArrayType *T) { void PCHTypeWriter::VisitVectorType(const VectorType *T) { Writer.AddTypeRef(T->getElementType(), Record); Record.push_back(T->getNumElements()); - Record.push_back(T->isAltiVec()); - Record.push_back(T->isPixel()); + Record.push_back(T->getAltiVecSpecific()); Code = pch::TYPE_VECTOR; } |

