s/AttributesImpl/AttributeImpl/g This is going to apply to Attribute, not Attributes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170631 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/VMCore/AttributesImpl.h b/lib/VMCore/AttributeImpl.h
similarity index 91%
rename from lib/VMCore/AttributesImpl.h
rename to lib/VMCore/AttributeImpl.h
index 396634e..980c383 100644
--- a/lib/VMCore/AttributesImpl.h
+++ b/lib/VMCore/AttributeImpl.h
@@ -1,4 +1,4 @@
-//===-- AttributesImpl.h - Attribute Internals -----------------*- C++ -*-===//
+//===-- AttributeImpl.h - Attribute Internals -------------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
@@ -22,10 +22,10 @@
class LLVMContext;
-class AttributesImpl : public FoldingSetNode {
+class AttributeImpl : public FoldingSetNode {
uint64_t Bits; // FIXME: We will be expanding this.
public:
- AttributesImpl(uint64_t bits) : Bits(bits) {}
+ AttributeImpl(uint64_t bits) : Bits(bits) {}
bool hasAttribute(uint64_t A) const;
diff --git a/lib/VMCore/Attributes.cpp b/lib/VMCore/Attributes.cpp
index 9e24add..2782455 100644
--- a/lib/VMCore/Attributes.cpp
+++ b/lib/VMCore/Attributes.cpp
@@ -13,7 +13,7 @@
//===----------------------------------------------------------------------===//
#include "llvm/Attributes.h"
-#include "AttributesImpl.h"
+#include "AttributeImpl.h"
#include "LLVMContextImpl.h"
#include "llvm/ADT/FoldingSet.h"
#include "llvm/ADT/StringExtras.h"
@@ -48,12 +48,12 @@
ID.AddInteger(B.Raw());
void *InsertPoint;
- AttributesImpl *PA = pImpl->AttrsSet.FindNodeOrInsertPos(ID, InsertPoint);
+ AttributeImpl *PA = pImpl->AttrsSet.FindNodeOrInsertPos(ID, InsertPoint);
if (!PA) {
// If we didn't find any existing attributes of the same shape then create a
// new one and insert it.
- PA = new AttributesImpl(B.Raw());
+ PA = new AttributeImpl(B.Raw());
pImpl->AttrsSet.InsertNode(PA, InsertPoint);
}
@@ -224,7 +224,7 @@
//===----------------------------------------------------------------------===//
AttrBuilder &AttrBuilder::addAttribute(Attribute::AttrVal Val){
- Bits |= AttributesImpl::getAttrMask(Val);
+ Bits |= AttributeImpl::getAttrMask(Val);
return *this;
}
@@ -250,7 +250,7 @@
}
AttrBuilder &AttrBuilder::removeAttribute(Attribute::AttrVal Val) {
- Bits &= ~AttributesImpl::getAttrMask(Val);
+ Bits &= ~AttributeImpl::getAttrMask(Val);
return *this;
}
@@ -265,7 +265,7 @@
}
bool AttrBuilder::hasAttribute(Attribute::AttrVal A) const {
- return Bits & AttributesImpl::getAttrMask(A);
+ return Bits & AttributeImpl::getAttrMask(A);
}
bool AttrBuilder::hasAttributes() const {
@@ -275,28 +275,28 @@
return Bits & A.Raw();
}
bool AttrBuilder::hasAlignmentAttr() const {
- return Bits & AttributesImpl::getAttrMask(Attribute::Alignment);
+ return Bits & AttributeImpl::getAttrMask(Attribute::Alignment);
}
uint64_t AttrBuilder::getAlignment() const {
if (!hasAlignmentAttr())
return 0;
return 1ULL <<
- (((Bits & AttributesImpl::getAttrMask(Attribute::Alignment)) >> 16) - 1);
+ (((Bits & AttributeImpl::getAttrMask(Attribute::Alignment)) >> 16) - 1);
}
uint64_t AttrBuilder::getStackAlignment() const {
if (!hasAlignmentAttr())
return 0;
return 1ULL <<
- (((Bits & AttributesImpl::getAttrMask(Attribute::StackAlignment))>>26)-1);
+ (((Bits & AttributeImpl::getAttrMask(Attribute::StackAlignment))>>26)-1);
}
//===----------------------------------------------------------------------===//
// AttributeImpl Definition
//===----------------------------------------------------------------------===//
-uint64_t AttributesImpl::getAttrMask(uint64_t Val) {
+uint64_t AttributeImpl::getAttrMask(uint64_t Val) {
switch (Val) {
case Attribute::None: return 0;
case Attribute::ZExt: return 1 << 0;
@@ -331,23 +331,23 @@
llvm_unreachable("Unsupported attribute type");
}
-bool AttributesImpl::hasAttribute(uint64_t A) const {
+bool AttributeImpl::hasAttribute(uint64_t A) const {
return (Bits & getAttrMask(A)) != 0;
}
-bool AttributesImpl::hasAttributes() const {
+bool AttributeImpl::hasAttributes() const {
return Bits != 0;
}
-bool AttributesImpl::hasAttributes(const Attribute &A) const {
+bool AttributeImpl::hasAttributes(const Attribute &A) const {
return Bits & A.Raw(); // FIXME: Raw() won't work here in the future.
}
-uint64_t AttributesImpl::getAlignment() const {
+uint64_t AttributeImpl::getAlignment() const {
return Bits & getAttrMask(Attribute::Alignment);
}
-uint64_t AttributesImpl::getStackAlignment() const {
+uint64_t AttributeImpl::getStackAlignment() const {
return Bits & getAttrMask(Attribute::StackAlignment);
}
diff --git a/lib/VMCore/LLVMContextImpl.cpp b/lib/VMCore/LLVMContextImpl.cpp
index 4c3ce15..585ec2c 100644
--- a/lib/VMCore/LLVMContextImpl.cpp
+++ b/lib/VMCore/LLVMContextImpl.cpp
@@ -96,9 +96,9 @@
CDSConstants.clear();
// Destroy attributes.
- for (FoldingSetIterator<AttributesImpl> I = AttrsSet.begin(),
+ for (FoldingSetIterator<AttributeImpl> I = AttrsSet.begin(),
E = AttrsSet.end(); I != E; ) {
- FoldingSetIterator<AttributesImpl> Elem = I++;
+ FoldingSetIterator<AttributeImpl> Elem = I++;
delete &*Elem;
}
diff --git a/lib/VMCore/LLVMContextImpl.h b/lib/VMCore/LLVMContextImpl.h
index fa08614..7ff0120 100644
--- a/lib/VMCore/LLVMContextImpl.h
+++ b/lib/VMCore/LLVMContextImpl.h
@@ -15,7 +15,7 @@
#ifndef LLVM_LLVMCONTEXT_IMPL_H
#define LLVM_LLVMCONTEXT_IMPL_H
-#include "AttributesImpl.h"
+#include "AttributeImpl.h"
#include "ConstantsContext.h"
#include "LeaksContext.h"
#include "llvm/ADT/APFloat.h"
@@ -247,7 +247,7 @@
DenseMapAPFloatKeyInfo> FPMapTy;
FPMapTy FPConstants;
- FoldingSet<AttributesImpl> AttrsSet;
+ FoldingSet<AttributeImpl> AttrsSet;
FoldingSet<AttributeSetImpl> AttrsLists;
StringMap<Value*> MDStringCache;