Rename AddrLabel and OCUVectorComponent -> AddrLabelExpr and OCUVectorElementExpr respectively. This is for consistency with other expr nodes end with *Expr.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@40785 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/AST/Expr.cpp b/AST/Expr.cpp
index 625634d..1a90b13 100644
--- a/AST/Expr.cpp
+++ b/AST/Expr.cpp
@@ -226,8 +226,8 @@
break;
case ParenExprClass: // C99 6.5.1p5
return cast<ParenExpr>(this)->getSubExpr()->isLvalue();
- case OCUVectorComponentClass:
- if (cast<OCUVectorComponent>(this)->containsDuplicateComponents())
+ case OCUVectorElementExprClass:
+ if (cast<OCUVectorElementExpr>(this)->containsDuplicateElements())
return LV_DuplicateVectorComponents;
return LV_Valid;
default:
@@ -583,14 +583,15 @@
return isIntegerConstantExpr(Val, Ctx, 0, true) && Val == 0;
}
-unsigned OCUVectorComponent::getNumComponents() const {
+unsigned OCUVectorElementExpr::getNumElements() const {
return strlen(Accessor.getName());
}
/// getComponentType - Determine whether the components of this access are
/// "point" "color" or "texture" elements.
-OCUVectorComponent::ComponentType OCUVectorComponent::getComponentType() const {
+OCUVectorElementExpr::ElementType
+OCUVectorElementExpr::getElementType() const {
// derive the component type, no need to waste space.
const char *compStr = Accessor.getName();
@@ -602,9 +603,9 @@
return Texture;
}
-/// containsDuplicateComponents - Return true if any element access is
+/// containsDuplicateElements - Return true if any element access is
/// repeated.
-bool OCUVectorComponent::containsDuplicateComponents() const {
+bool OCUVectorElementExpr::containsDuplicateElements() const {
const char *compStr = Accessor.getName();
unsigned length = strlen(compStr);
@@ -618,9 +619,9 @@
}
/// getEncodedElementAccess - We encode fields with two bits per component.
-unsigned OCUVectorComponent::getEncodedElementAccess() const {
+unsigned OCUVectorElementExpr::getEncodedElementAccess() const {
const char *compStr = Accessor.getName();
- unsigned length = getNumComponents();
+ unsigned length = getNumElements();
unsigned Result = 0;
diff --git a/AST/StmtPrinter.cpp b/AST/StmtPrinter.cpp
index 9ca1783..1d6fbcc 100644
--- a/AST/StmtPrinter.cpp
+++ b/AST/StmtPrinter.cpp
@@ -439,7 +439,7 @@
assert(Field && "MemberExpr should alway reference a field!");
OS << Field->getName();
}
-void StmtPrinter::VisitOCUVectorComponent(OCUVectorComponent *Node) {
+void StmtPrinter::VisitOCUVectorElementExpr(OCUVectorElementExpr *Node) {
PrintExpr(Node->getBase());
OS << ".";
OS << Node->getAccessor().getName();
@@ -471,7 +471,7 @@
// GNU extensions.
-void StmtPrinter::VisitAddrLabel(AddrLabel *Node) {
+void StmtPrinter::VisitAddrLabelExpr(AddrLabelExpr *Node) {
OS << "&&" << Node->getLabel()->getName();
}