aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/Transforms/Utils/BuildLibCalls.cpp24
-rw-r--r--lib/Transforms/Vectorize/LoopVectorize.cpp2
-rw-r--r--lib/VMCore/Attributes.cpp14
-rw-r--r--lib/VMCore/Instructions.cpp8
4 files changed, 24 insertions, 24 deletions
diff --git a/lib/Transforms/Utils/BuildLibCalls.cpp b/lib/Transforms/Utils/BuildLibCalls.cpp
index bfb96cc182..51335ab363 100644
--- a/lib/Transforms/Utils/BuildLibCalls.cpp
+++ b/lib/Transforms/Utils/BuildLibCalls.cpp
@@ -40,9 +40,9 @@ Value *llvm::EmitStrLen(Value *Ptr, IRBuilder<> &B, const DataLayout *TD,
Module *M = B.GetInsertBlock()->getParent()->getParent();
AttributeWithIndex AWI[2];
AWI[0] = AttributeWithIndex::get(M->getContext(), 1, Attribute::NoCapture);
- Attribute::AttrVal AVs[2] = { Attribute::ReadOnly, Attribute::NoUnwind };
+ Attribute::AttrKind AVs[2] = { Attribute::ReadOnly, Attribute::NoUnwind };
AWI[1] = AttributeWithIndex::get(M->getContext(), AttributeSet::FunctionIndex,
- ArrayRef<Attribute::AttrVal>(AVs, 2));
+ ArrayRef<Attribute::AttrKind>(AVs, 2));
LLVMContext &Context = B.GetInsertBlock()->getContext();
Constant *StrLen = M->getOrInsertFunction("strlen",
@@ -69,9 +69,9 @@ Value *llvm::EmitStrNLen(Value *Ptr, Value *MaxLen, IRBuilder<> &B,
Module *M = B.GetInsertBlock()->getParent()->getParent();
AttributeWithIndex AWI[2];
AWI[0] = AttributeWithIndex::get(M->getContext(), 1, Attribute::NoCapture);
- Attribute::AttrVal AVs[2] = { Attribute::ReadOnly, Attribute::NoUnwind };
+ Attribute::AttrKind AVs[2] = { Attribute::ReadOnly, Attribute::NoUnwind };
AWI[1] = AttributeWithIndex::get(M->getContext(), AttributeSet::FunctionIndex,
- ArrayRef<Attribute::AttrVal>(AVs, 2));
+ ArrayRef<Attribute::AttrKind>(AVs, 2));
LLVMContext &Context = B.GetInsertBlock()->getContext();
Constant *StrNLen = M->getOrInsertFunction("strnlen",
@@ -97,10 +97,10 @@ Value *llvm::EmitStrChr(Value *Ptr, char C, IRBuilder<> &B,
return 0;
Module *M = B.GetInsertBlock()->getParent()->getParent();
- Attribute::AttrVal AVs[2] = { Attribute::ReadOnly, Attribute::NoUnwind };
+ Attribute::AttrKind AVs[2] = { Attribute::ReadOnly, Attribute::NoUnwind };
AttributeWithIndex AWI =
AttributeWithIndex::get(M->getContext(), AttributeSet::FunctionIndex,
- ArrayRef<Attribute::AttrVal>(AVs, 2));
+ ArrayRef<Attribute::AttrKind>(AVs, 2));
Type *I8Ptr = B.getInt8PtrTy();
Type *I32Ty = B.getInt32Ty();
@@ -126,9 +126,9 @@ Value *llvm::EmitStrNCmp(Value *Ptr1, Value *Ptr2, Value *Len,
AttributeWithIndex AWI[3];
AWI[0] = AttributeWithIndex::get(M->getContext(), 1, Attribute::NoCapture);
AWI[1] = AttributeWithIndex::get(M->getContext(), 2, Attribute::NoCapture);
- Attribute::AttrVal AVs[2] = { Attribute::ReadOnly, Attribute::NoUnwind };
+ Attribute::AttrKind AVs[2] = { Attribute::ReadOnly, Attribute::NoUnwind };
AWI[2] = AttributeWithIndex::get(M->getContext(), AttributeSet::FunctionIndex,
- ArrayRef<Attribute::AttrVal>(AVs, 2));
+ ArrayRef<Attribute::AttrKind>(AVs, 2));
LLVMContext &Context = B.GetInsertBlock()->getContext();
Value *StrNCmp = M->getOrInsertFunction("strncmp",
@@ -236,9 +236,9 @@ Value *llvm::EmitMemChr(Value *Ptr, Value *Val,
Module *M = B.GetInsertBlock()->getParent()->getParent();
AttributeWithIndex AWI;
- Attribute::AttrVal AVs[2] = { Attribute::ReadOnly, Attribute::NoUnwind };
+ Attribute::AttrKind AVs[2] = { Attribute::ReadOnly, Attribute::NoUnwind };
AWI = AttributeWithIndex::get(M->getContext(), AttributeSet::FunctionIndex,
- ArrayRef<Attribute::AttrVal>(AVs, 2));
+ ArrayRef<Attribute::AttrKind>(AVs, 2));
LLVMContext &Context = B.GetInsertBlock()->getContext();
Value *MemChr = M->getOrInsertFunction("memchr",
AttributeSet::get(M->getContext(), AWI),
@@ -266,9 +266,9 @@ Value *llvm::EmitMemCmp(Value *Ptr1, Value *Ptr2,
AttributeWithIndex AWI[3];
AWI[0] = AttributeWithIndex::get(M->getContext(), 1, Attribute::NoCapture);
AWI[1] = AttributeWithIndex::get(M->getContext(), 2, Attribute::NoCapture);
- Attribute::AttrVal AVs[2] = { Attribute::ReadOnly, Attribute::NoUnwind };
+ Attribute::AttrKind AVs[2] = { Attribute::ReadOnly, Attribute::NoUnwind };
AWI[2] = AttributeWithIndex::get(M->getContext(), AttributeSet::FunctionIndex,
- ArrayRef<Attribute::AttrVal>(AVs, 2));
+ ArrayRef<Attribute::AttrKind>(AVs, 2));
LLVMContext &Context = B.GetInsertBlock()->getContext();
Value *MemCmp = M->getOrInsertFunction("memcmp",
diff --git a/lib/Transforms/Vectorize/LoopVectorize.cpp b/lib/Transforms/Vectorize/LoopVectorize.cpp
index 6f8c65aa3d..f5ff79c0b9 100644
--- a/lib/Transforms/Vectorize/LoopVectorize.cpp
+++ b/lib/Transforms/Vectorize/LoopVectorize.cpp
@@ -94,7 +94,7 @@ struct LoopVectorize : public LoopPass {
// Check the function attribues to find out if this function should be
// optimized for size.
Function *F = L->getHeader()->getParent();
- Attribute::AttrVal SzAttr= Attribute::OptimizeForSize;
+ Attribute::AttrKind SzAttr= Attribute::OptimizeForSize;
bool OptForSize = F->getFnAttributes().hasAttribute(SzAttr);
unsigned VF = CM.selectVectorizationFactor(OptForSize, VectorizationFactor);
diff --git a/lib/VMCore/Attributes.cpp b/lib/VMCore/Attributes.cpp
index d47f35aed3..b2744c980d 100644
--- a/lib/VMCore/Attributes.cpp
+++ b/lib/VMCore/Attributes.cpp
@@ -29,9 +29,9 @@ using namespace llvm;
// Attribute Implementation
//===----------------------------------------------------------------------===//
-Attribute Attribute::get(LLVMContext &Context, ArrayRef<AttrVal> Vals) {
+Attribute Attribute::get(LLVMContext &Context, ArrayRef<AttrKind> Vals) {
AttrBuilder B;
- for (ArrayRef<AttrVal>::iterator I = Vals.begin(), E = Vals.end();
+ for (ArrayRef<AttrKind>::iterator I = Vals.begin(), E = Vals.end();
I != E; ++I)
B.addAttribute(*I);
return Attribute::get(Context, B);
@@ -61,7 +61,7 @@ Attribute Attribute::get(LLVMContext &Context, AttrBuilder &B) {
return Attribute(PA);
}
-bool Attribute::hasAttribute(AttrVal Val) const {
+bool Attribute::hasAttribute(AttrKind Val) const {
return pImpl && pImpl->hasAttribute(Val);
}
@@ -225,7 +225,7 @@ std::string Attribute::getAsString() const {
// AttrBuilder Implementation
//===----------------------------------------------------------------------===//
-AttrBuilder &AttrBuilder::addAttribute(Attribute::AttrVal Val){
+AttrBuilder &AttrBuilder::addAttribute(Attribute::AttrKind Val){
Bits |= AttributeImpl::getAttrMask(Val);
return *this;
}
@@ -251,7 +251,7 @@ AttrBuilder &AttrBuilder::addStackAlignmentAttr(unsigned Align){
return *this;
}
-AttrBuilder &AttrBuilder::removeAttribute(Attribute::AttrVal Val) {
+AttrBuilder &AttrBuilder::removeAttribute(Attribute::AttrKind Val) {
Bits &= ~AttributeImpl::getAttrMask(Val);
return *this;
}
@@ -266,7 +266,7 @@ AttrBuilder &AttrBuilder::removeAttributes(const Attribute &A){
return *this;
}
-bool AttrBuilder::hasAttribute(Attribute::AttrVal A) const {
+bool AttrBuilder::hasAttribute(Attribute::AttrKind A) const {
return Bits & AttributeImpl::getAttrMask(A);
}
@@ -432,7 +432,7 @@ Attribute AttributeSet::getAttributes(unsigned Idx) const {
/// hasAttrSomewhere - Return true if the specified attribute is set for at
/// least one parameter or for the return value.
-bool AttributeSet::hasAttrSomewhere(Attribute::AttrVal Attr) const {
+bool AttributeSet::hasAttrSomewhere(Attribute::AttrKind Attr) const {
if (AttrList == 0) return false;
const SmallVector<AttributeWithIndex, 4> &Attrs = AttrList->Attrs;
diff --git a/lib/VMCore/Instructions.cpp b/lib/VMCore/Instructions.cpp
index 187042656c..bb659fc69e 100644
--- a/lib/VMCore/Instructions.cpp
+++ b/lib/VMCore/Instructions.cpp
@@ -343,7 +343,7 @@ void CallInst::removeAttribute(unsigned i, Attribute attr) {
setAttributes(PAL);
}
-bool CallInst::hasFnAttr(Attribute::AttrVal A) const {
+bool CallInst::hasFnAttr(Attribute::AttrKind A) const {
if (AttributeList.getParamAttributes(AttributeSet::FunctionIndex)
.hasAttribute(A))
return true;
@@ -352,7 +352,7 @@ bool CallInst::hasFnAttr(Attribute::AttrVal A) const {
return false;
}
-bool CallInst::paramHasAttr(unsigned i, Attribute::AttrVal A) const {
+bool CallInst::paramHasAttr(unsigned i, Attribute::AttrKind A) const {
if (AttributeList.getParamAttributes(i).hasAttribute(A))
return true;
if (const Function *F = getCalledFunction())
@@ -572,7 +572,7 @@ void InvokeInst::setSuccessorV(unsigned idx, BasicBlock *B) {
return setSuccessor(idx, B);
}
-bool InvokeInst::hasFnAttr(Attribute::AttrVal A) const {
+bool InvokeInst::hasFnAttr(Attribute::AttrKind A) const {
if (AttributeList.getParamAttributes(AttributeSet::FunctionIndex).
hasAttribute(A))
return true;
@@ -581,7 +581,7 @@ bool InvokeInst::hasFnAttr(Attribute::AttrVal A) const {
return false;
}
-bool InvokeInst::paramHasAttr(unsigned i, Attribute::AttrVal A) const {
+bool InvokeInst::paramHasAttr(unsigned i, Attribute::AttrKind A) const {
if (AttributeList.getParamAttributes(i).hasAttribute(A))
return true;
if (const Function *F = getCalledFunction())