[llvm-commits] [llvm] r56622 - in /llvm/trunk: include/llvm-c/ include/llvm/ include/llvm/Bitcode/ include/llvm/Support/ lib/AsmParser/ lib/Bitcode/Reader/ lib/Bitcode/Writer/ lib/CodeGen/ lib/CodeGen/SelectionDAG/ lib/ExecutionEngine/Interpreter/ lib/Target/CBackend/ lib/Target/CppBackend/ lib/Target/MSIL/ lib/Target/X86/ lib/Target/X86/AsmPrinter/ lib/Transforms/IPO/ lib/Transforms/Scalar/ lib/Transforms/Utils/ lib/VMCore/ utils/TableGen/
Devang Patel
dpatel at apple.com
Thu Sep 25 14:00:46 PDT 2008
Author: dpatel
Date: Thu Sep 25 16:00:45 2008
New Revision: 56622
URL: http://llvm.org/viewvc/llvm-project?rev=56622&view=rev
Log:
Large mechanical patch.
s/ParamAttr/Attribute/g
s/PAList/AttrList/g
s/FnAttributeWithIndex/AttributeWithIndex/g
s/FnAttr/Attribute/g
This sets the stage
- to implement function notes as function attributes and
- to distinguish between function attributes and return value attributes.
This requires corresponding changes in llvm-gcc and clang.
Modified:
llvm/trunk/include/llvm-c/Core.h
llvm/trunk/include/llvm/Argument.h
llvm/trunk/include/llvm/Attributes.h
llvm/trunk/include/llvm/Bitcode/LLVMBitCodes.h
llvm/trunk/include/llvm/Function.h
llvm/trunk/include/llvm/Instructions.h
llvm/trunk/include/llvm/Intrinsics.h
llvm/trunk/include/llvm/Support/CallSite.h
llvm/trunk/lib/AsmParser/llvmAsmParser.cpp.cvs
llvm/trunk/lib/AsmParser/llvmAsmParser.h.cvs
llvm/trunk/lib/AsmParser/llvmAsmParser.y
llvm/trunk/lib/AsmParser/llvmAsmParser.y.cvs
llvm/trunk/lib/Bitcode/Reader/BitcodeReader.cpp
llvm/trunk/lib/Bitcode/Reader/BitcodeReader.h
llvm/trunk/lib/Bitcode/Writer/BitcodeWriter.cpp
llvm/trunk/lib/Bitcode/Writer/ValueEnumerator.cpp
llvm/trunk/lib/Bitcode/Writer/ValueEnumerator.h
llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp
llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
llvm/trunk/lib/CodeGen/ShadowStackGC.cpp
llvm/trunk/lib/ExecutionEngine/Interpreter/Execution.cpp
llvm/trunk/lib/Target/CBackend/CBackend.cpp
llvm/trunk/lib/Target/CppBackend/CPPBackend.cpp
llvm/trunk/lib/Target/MSIL/MSILWriter.cpp
llvm/trunk/lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.cpp
llvm/trunk/lib/Target/X86/AsmPrinter/X86IntelAsmPrinter.cpp
llvm/trunk/lib/Target/X86/X86FastISel.cpp
llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
llvm/trunk/lib/Transforms/IPO/AddReadAttrs.cpp
llvm/trunk/lib/Transforms/IPO/ArgumentPromotion.cpp
llvm/trunk/lib/Transforms/IPO/DeadArgumentElimination.cpp
llvm/trunk/lib/Transforms/IPO/GlobalOpt.cpp
llvm/trunk/lib/Transforms/IPO/InlineAlways.cpp
llvm/trunk/lib/Transforms/IPO/InlineSimple.cpp
llvm/trunk/lib/Transforms/IPO/Inliner.cpp
llvm/trunk/lib/Transforms/IPO/LowerSetJmp.cpp
llvm/trunk/lib/Transforms/IPO/PruneEH.cpp
llvm/trunk/lib/Transforms/IPO/StructRetPromotion.cpp
llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp
llvm/trunk/lib/Transforms/Scalar/LoopUnswitch.cpp
llvm/trunk/lib/Transforms/Scalar/SimplifyCFGPass.cpp
llvm/trunk/lib/Transforms/Utils/InlineCost.cpp
llvm/trunk/lib/Transforms/Utils/InlineFunction.cpp
llvm/trunk/lib/Transforms/Utils/LowerInvoke.cpp
llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp
llvm/trunk/lib/VMCore/AsmWriter.cpp
llvm/trunk/lib/VMCore/Attributes.cpp
llvm/trunk/lib/VMCore/AutoUpgrade.cpp
llvm/trunk/lib/VMCore/Core.cpp
llvm/trunk/lib/VMCore/Function.cpp
llvm/trunk/lib/VMCore/Instructions.cpp
llvm/trunk/lib/VMCore/Verifier.cpp
llvm/trunk/utils/TableGen/IntrinsicEmitter.cpp
Modified: llvm/trunk/include/llvm-c/Core.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm-c/Core.h?rev=56622&r1=56621&r2=56622&view=diff
==============================================================================
--- llvm/trunk/include/llvm-c/Core.h (original)
+++ llvm/trunk/include/llvm-c/Core.h Thu Sep 25 16:00:45 2008
@@ -83,18 +83,18 @@
typedef struct LLVMOpaquePassManager *LLVMPassManagerRef;
typedef enum {
- LLVMZExtParamAttr = 1<<0,
- LLVMSExtParamAttr = 1<<1,
- LLVMNoReturnParamAttr = 1<<2,
- LLVMInRegParamAttr = 1<<3,
- LLVMStructRetParamAttr = 1<<4,
- LLVMNoUnwindParamAttr = 1<<5,
- LLVMNoAliasParamAttr = 1<<6,
- LLVMByValParamAttr = 1<<7,
- LLVMNestParamAttr = 1<<8,
- LLVMReadNoneParamAttr = 1<<9,
- LLVMReadOnlyParamAttr = 1<<10
-} LLVMParamAttr;
+ LLVMZExtAttribute = 1<<0,
+ LLVMSExtAttribute = 1<<1,
+ LLVMNoReturnAttribute = 1<<2,
+ LLVMInRegAttribute = 1<<3,
+ LLVMStructRetAttribute = 1<<4,
+ LLVMNoUnwindAttribute = 1<<5,
+ LLVMNoAliasAttribute = 1<<6,
+ LLVMByValAttribute = 1<<7,
+ LLVMNestAttribute = 1<<8,
+ LLVMReadNoneAttribute = 1<<9,
+ LLVMReadOnlyAttribute = 1<<10
+} LLVMAttribute;
typedef enum {
LLVMVoidTypeKind, /**< type with no size */
@@ -423,8 +423,8 @@
LLVMValueRef LLVMGetLastParam(LLVMValueRef Fn);
LLVMValueRef LLVMGetNextParam(LLVMValueRef Arg);
LLVMValueRef LLVMGetPreviousParam(LLVMValueRef Arg);
-void LLVMAddParamAttr(LLVMValueRef Arg, LLVMParamAttr PA);
-void LLVMRemoveParamAttr(LLVMValueRef Arg, LLVMParamAttr PA);
+void LLVMAddAttribute(LLVMValueRef Arg, LLVMAttribute PA);
+void LLVMRemoveAttribute(LLVMValueRef Arg, LLVMAttribute PA);
void LLVMSetParamAlignment(LLVMValueRef Arg, unsigned align);
/* Operations on basic blocks */
@@ -454,9 +454,9 @@
/* Operations on call sites */
void LLVMSetInstructionCallConv(LLVMValueRef Instr, unsigned CC);
unsigned LLVMGetInstructionCallConv(LLVMValueRef Instr);
-void LLVMAddInstrParamAttr(LLVMValueRef Instr, unsigned index, LLVMParamAttr);
-void LLVMRemoveInstrParamAttr(LLVMValueRef Instr, unsigned index,
- LLVMParamAttr);
+void LLVMAddInstrAttribute(LLVMValueRef Instr, unsigned index, LLVMAttribute);
+void LLVMRemoveInstrAttribute(LLVMValueRef Instr, unsigned index,
+ LLVMAttribute);
void LLVMSetInstrParamAlignment(LLVMValueRef Instr, unsigned index,
unsigned align);
Modified: llvm/trunk/include/llvm/Argument.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Argument.h?rev=56622&r1=56621&r2=56622&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Argument.h (original)
+++ llvm/trunk/include/llvm/Argument.h Thu Sep 25 16:00:45 2008
@@ -60,10 +60,10 @@
/// its containing function.
bool hasStructRetAttr() const;
- /// addAttr - Add a ParamAttr to an argument
+ /// addAttr - Add a Attribute to an argument
void addAttr(Attributes);
- /// removeAttr - Remove a ParamAttr from an argument
+ /// removeAttr - Remove a Attribute from an argument
void removeAttr(Attributes);
/// classof - Methods for support type inquiry through isa, cast, and
Modified: llvm/trunk/include/llvm/Attributes.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Attributes.h?rev=56622&r1=56621&r2=56622&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Attributes.h (original)
+++ llvm/trunk/include/llvm/Attributes.h Thu Sep 25 16:00:45 2008
@@ -1,4 +1,4 @@
-//===-- llvm/Attributes.h - Container for ParamAttrs ---*---------- C++ -*-===//
+//===-- llvm/Attributes.h - Container for Attributes ---*---------- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
@@ -7,29 +7,29 @@
//
//===----------------------------------------------------------------------===//
//
-// This file contains the simple types necessary to represent the parameter
+// This file contains the simple types necessary to represent the
// attributes associated with functions and their calls.
//
//===----------------------------------------------------------------------===//
-#ifndef LLVM_PARAMETER_ATTRIBUTES_H
-#define LLVM_PARAMETER_ATTRIBUTES_H
+#ifndef LLVM_ATTRIBUTES_H
+#define LLVM_ATTRIBUTES_H
#include <string>
namespace llvm {
class Type;
-/// Attributes - A bitset of attributes for a parameter.
+/// Attributes - A bitset of attributes.
typedef unsigned Attributes;
-namespace ParamAttr {
+namespace Attribute {
/// Function parameters and results can have attributes to indicate how they
/// should be treated by optimizations and code generation. This enumeration
-/// lists the attributes that can be associated with parameters or function
-/// results.
-/// @brief Function parameter attributes.
+/// lists the attributes that can be associated with parameters, function
+/// results or the function itself.
+/// @brief Function attributes.
const Attributes None = 0; ///< No attributes have been set
const Attributes ZExt = 1<<0; ///< Zero extended before/after call
@@ -43,6 +43,9 @@
const Attributes Nest = 1<<8; ///< Nested function static chain
const Attributes ReadNone = 1<<9; ///< Function does not access memory
const Attributes ReadOnly = 1<<10; ///< Function only reads from memory
+const Attributes NoInline = 1<<11; // inline=never
+const Attributes AlwaysInline = 1<<12; // inline=always
+const Attributes OptimizeForSize = 1<<13; // opt_size
const Attributes Alignment = 0xffff<<16; ///< Alignment of parameter (16 bits)
// 0 = unknown, else in clear (not log)
@@ -74,27 +77,23 @@
/// The set of Attributes set in Attributes is converted to a
/// string of equivalent mnemonics. This is, presumably, for writing out
/// the mnemonics for the assembly writer.
-/// @brief Convert parameter attribute bits to text
+/// @brief Convert attribute bits to text
std::string getAsString(Attributes Attrs);
-} // end namespace ParamAttr
+} // end namespace Attribute
-namespace FnAttr {
-/// Function notes are implemented as attributes stored at index ~0 in
-/// parameter attribute list.
-const Attributes None = 0;
-const Attributes NoInline = 1<<0; // inline=never
-const Attributes AlwaysInline = 1<<1; // inline=always
-const Attributes OptimizeForSize = 1<<2; // opt_size
-} // end namespace FnAttr
-
-/// This is just a pair of values to associate a set of parameter attributes
-/// with a parameter index.
-struct FnAttributeWithIndex {
+namespace Attribute {
+} // end namespace Attribute
+
+/// This is just a pair of values to associate a set of attributes
+/// with an index.
+struct AttributeWithIndex {
Attributes Attrs; ///< The attributes that are set, or'd together.
unsigned Index; ///< Index of the parameter for which the attributes apply.
+ ///< Index 0 is used for return value attributes.
+ ///< Index ~0U is used for function attributes.
- static FnAttributeWithIndex get(unsigned Idx, Attributes Attrs) {
- FnAttributeWithIndex P;
+ static AttributeWithIndex get(unsigned Idx, Attributes Attrs) {
+ AttributeWithIndex P;
P.Index = Idx;
P.Attrs = Attrs;
return P;
@@ -102,66 +101,66 @@
};
//===----------------------------------------------------------------------===//
-// PAListPtr Smart Pointer
+// AttrListPtr Smart Pointer
//===----------------------------------------------------------------------===//
class AttributeListImpl;
-/// PAListPtr - This class manages the ref count for the opaque
+/// AttrListPtr - This class manages the ref count for the opaque
/// AttributeListImpl object and provides accessors for it.
-class PAListPtr {
- /// PAList - The parameter attributes that we are managing. This can be null
- /// to represent the empty parameter attributes list.
- AttributeListImpl *PAList;
+class AttrListPtr {
+ /// AttrList - The attributes that we are managing. This can be null
+ /// to represent the empty attributes list.
+ AttributeListImpl *AttrList;
public:
- PAListPtr() : PAList(0) {}
- PAListPtr(const PAListPtr &P);
- const PAListPtr &operator=(const PAListPtr &RHS);
- ~PAListPtr();
+ AttrListPtr() : AttrList(0) {}
+ AttrListPtr(const AttrListPtr &P);
+ const AttrListPtr &operator=(const AttrListPtr &RHS);
+ ~AttrListPtr();
//===--------------------------------------------------------------------===//
- // Parameter Attribute List Construction and Mutation
+ // Attribute List Construction and Mutation
//===--------------------------------------------------------------------===//
- /// get - Return a ParamAttrs list with the specified parameter in it.
- static PAListPtr get(const FnAttributeWithIndex *Attr, unsigned NumAttrs);
+ /// get - Return a Attributes list with the specified parameter in it.
+ static AttrListPtr get(const AttributeWithIndex *Attr, unsigned NumAttrs);
- /// get - Return a ParamAttr list with the parameters specified by the
+ /// get - Return a Attribute list with the parameters specified by the
/// consecutive random access iterator range.
template <typename Iter>
- static PAListPtr get(const Iter &I, const Iter &E) {
- if (I == E) return PAListPtr(); // Empty list.
+ static AttrListPtr get(const Iter &I, const Iter &E) {
+ if (I == E) return AttrListPtr(); // Empty list.
return get(&*I, static_cast<unsigned>(E-I));
}
/// addAttr - Add the specified attribute at the specified index to this
- /// attribute list. Since parameter attribute lists are immutable, this
+ /// attribute list. Since attribute lists are immutable, this
/// returns the new list.
- PAListPtr addAttr(unsigned Idx, Attributes Attrs) const;
+ AttrListPtr addAttr(unsigned Idx, Attributes Attrs) const;
/// removeAttr - Remove the specified attribute at the specified index from
- /// this attribute list. Since parameter attribute lists are immutable, this
+ /// this attribute list. Since attribute lists are immutable, this
/// returns the new list.
- PAListPtr removeAttr(unsigned Idx, Attributes Attrs) const;
+ AttrListPtr removeAttr(unsigned Idx, Attributes Attrs) const;
//===--------------------------------------------------------------------===//
- // Parameter Attribute List Accessors
+ // Attribute List Accessors
//===--------------------------------------------------------------------===//
- /// getParamAttrs - The parameter attributes for the specified parameter are
- /// returned. Parameters for the result are denoted with Idx = 0.
- Attributes getParamAttrs(unsigned Idx) const;
+ /// getAttributes - The attributes for the specified index are
+ /// returned. Attributes for the result are denoted with Idx = 0.
+ Attributes getAttributes(unsigned Idx) const;
/// paramHasAttr - Return true if the specified parameter index has the
/// specified attribute set.
bool paramHasAttr(unsigned Idx, Attributes Attr) const {
- return getParamAttrs(Idx) & Attr;
+ return getAttributes(Idx) & Attr;
}
/// getParamAlignment - Return the alignment for the specified function
/// parameter.
unsigned getParamAlignment(unsigned Idx) const {
- return (getParamAttrs(Idx) & ParamAttr::Alignment) >> 16;
+ return (getAttributes(Idx) & Attribute::Alignment) >> 16;
}
/// hasAttrSomewhere - Return true if the specified attribute is set for at
@@ -169,29 +168,29 @@
bool hasAttrSomewhere(Attributes Attr) const;
/// operator==/!= - Provide equality predicates.
- bool operator==(const PAListPtr &RHS) const { return PAList == RHS.PAList; }
- bool operator!=(const PAListPtr &RHS) const { return PAList != RHS.PAList; }
+ bool operator==(const AttrListPtr &RHS) const { return AttrList == RHS.AttrList; }
+ bool operator!=(const AttrListPtr &RHS) const { return AttrList != RHS.AttrList; }
void dump() const;
//===--------------------------------------------------------------------===//
- // Parameter Attribute List Introspection
+ // Attribute List Introspection
//===--------------------------------------------------------------------===//
/// getRawPointer - Return a raw pointer that uniquely identifies this
- /// parameter attribute list.
+ /// attribute list.
void *getRawPointer() const {
- return PAList;
+ return AttrList;
}
- // Parameter attributes are stored as a dense set of slots, where there is one
+ // Attributes are stored as a dense set of slots, where there is one
// slot for each argument that has an attribute. This allows walking over the
// dense set instead of walking the sparse list of attributes.
- /// isEmpty - Return true if no parameters have an attribute.
+ /// isEmpty - Return true if there are no attributes.
///
bool isEmpty() const {
- return PAList == 0;
+ return AttrList == 0;
}
/// getNumSlots - Return the number of slots used in this attribute list.
@@ -199,12 +198,12 @@
/// (including the function itself).
unsigned getNumSlots() const;
- /// getSlot - Return the FnAttributeWithIndex at the specified slot. This
- /// holds a parameter number plus a set of attributes.
- const FnAttributeWithIndex &getSlot(unsigned Slot) const;
+ /// getSlot - Return the AttributeWithIndex at the specified slot. This
+ /// holds a index number plus a set of attributes.
+ const AttributeWithIndex &getSlot(unsigned Slot) const;
private:
- explicit PAListPtr(AttributeListImpl *L);
+ explicit AttrListPtr(AttributeListImpl *L);
};
} // End llvm namespace
Modified: llvm/trunk/include/llvm/Bitcode/LLVMBitCodes.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Bitcode/LLVMBitCodes.h?rev=56622&r1=56621&r2=56622&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Bitcode/LLVMBitCodes.h (original)
+++ llvm/trunk/include/llvm/Bitcode/LLVMBitCodes.h Thu Sep 25 16:00:45 2008
@@ -64,7 +64,7 @@
};
/// PARAMATTR blocks have code for defining a parameter attribute set.
- enum ParamAttrCodes {
+ enum AttributeCodes {
PARAMATTR_CODE_ENTRY = 1 // ENTRY: [paramidx0, attr0, paramidx1, attr1...]
};
Modified: llvm/trunk/include/llvm/Function.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Function.h?rev=56622&r1=56621&r2=56622&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Function.h (original)
+++ llvm/trunk/include/llvm/Function.h Thu Sep 25 16:00:45 2008
@@ -69,7 +69,7 @@
BasicBlockListType BasicBlocks; ///< The basic blocks
mutable ArgumentListType ArgumentList; ///< The formal arguments
ValueSymbolTable *SymTab; ///< Symbol table of args/instructions
- PAListPtr ParamAttrs; ///< Parameter attributes
+ AttrListPtr AttributeList; ///< Parameter attributes
// The Calling Convention is stored in Value::SubclassData.
/*unsigned CallingConvention;*/
@@ -140,13 +140,13 @@
SubclassData = (SubclassData & 1) | (CC << 1);
}
- /// getParamAttrs - Return the parameter attributes for this Function.
+ /// getAttributes - Return the parameter attributes for this Function.
///
- const PAListPtr &getParamAttrs() const { return ParamAttrs; }
+ const AttrListPtr &getAttributes() const { return AttributeList; }
- /// setParamAttrs - Set the parameter attributes for this Function.
+ /// setAttributes - Set the parameter attributes for this Function.
///
- void setParamAttrs(const PAListPtr &attrs) { ParamAttrs = attrs; }
+ void setAttributes(const AttrListPtr &attrs) { AttributeList = attrs; }
/// hasNote - Return true if this function has given note.
@@ -159,7 +159,7 @@
///
void setNotes(const Attributes N) {
// Notes are stored at ~0 index in parameter attribute list
- addParamAttr(~0, N);
+ addAttribute(~0, N);
}
/// hasGC/getGC/setGC/clearGC - The name of the garbage collection algorithm
@@ -171,60 +171,60 @@
/// @brief Determine whether the function has the given attribute.
bool paramHasAttr(unsigned i, Attributes attr) const {
- return ParamAttrs.paramHasAttr(i, attr);
+ return AttributeList.paramHasAttr(i, attr);
}
- /// addParamAttr - adds the attribute to the list of attributes.
- void addParamAttr(unsigned i, Attributes attr);
+ /// addAttribute - adds the attribute to the list of attributes.
+ void addAttribute(unsigned i, Attributes attr);
- /// removeParamAttr - removes the attribute from the list of attributes.
- void removeParamAttr(unsigned i, Attributes attr);
+ /// removeAttribute - removes the attribute from the list of attributes.
+ void removeAttribute(unsigned i, Attributes attr);
/// @brief Extract the alignment for a call or parameter (0=unknown).
unsigned getParamAlignment(unsigned i) const {
- return ParamAttrs.getParamAlignment(i);
+ return AttributeList.getParamAlignment(i);
}
/// @brief Determine if the function does not access memory.
bool doesNotAccessMemory() const {
- return paramHasAttr(0, ParamAttr::ReadNone);
+ return paramHasAttr(0, Attribute::ReadNone);
}
void setDoesNotAccessMemory(bool DoesNotAccessMemory = true) {
- if (DoesNotAccessMemory) addParamAttr(0, ParamAttr::ReadNone);
- else removeParamAttr(0, ParamAttr::ReadNone);
+ if (DoesNotAccessMemory) addAttribute(0, Attribute::ReadNone);
+ else removeAttribute(0, Attribute::ReadNone);
}
/// @brief Determine if the function does not access or only reads memory.
bool onlyReadsMemory() const {
- return doesNotAccessMemory() || paramHasAttr(0, ParamAttr::ReadOnly);
+ return doesNotAccessMemory() || paramHasAttr(0, Attribute::ReadOnly);
}
void setOnlyReadsMemory(bool OnlyReadsMemory = true) {
- if (OnlyReadsMemory) addParamAttr(0, ParamAttr::ReadOnly);
- else removeParamAttr(0, ParamAttr::ReadOnly | ParamAttr::ReadNone);
+ if (OnlyReadsMemory) addAttribute(0, Attribute::ReadOnly);
+ else removeAttribute(0, Attribute::ReadOnly | Attribute::ReadNone);
}
/// @brief Determine if the function cannot return.
bool doesNotReturn() const {
- return paramHasAttr(0, ParamAttr::NoReturn);
+ return paramHasAttr(0, Attribute::NoReturn);
}
void setDoesNotReturn(bool DoesNotReturn = true) {
- if (DoesNotReturn) addParamAttr(0, ParamAttr::NoReturn);
- else removeParamAttr(0, ParamAttr::NoReturn);
+ if (DoesNotReturn) addAttribute(0, Attribute::NoReturn);
+ else removeAttribute(0, Attribute::NoReturn);
}
/// @brief Determine if the function cannot unwind.
bool doesNotThrow() const {
- return paramHasAttr(0, ParamAttr::NoUnwind);
+ return paramHasAttr(0, Attribute::NoUnwind);
}
void setDoesNotThrow(bool DoesNotThrow = true) {
- if (DoesNotThrow) addParamAttr(0, ParamAttr::NoUnwind);
- else removeParamAttr(0, ParamAttr::NoUnwind);
+ if (DoesNotThrow) addAttribute(0, Attribute::NoUnwind);
+ else removeAttribute(0, Attribute::NoUnwind);
}
/// @brief Determine if the function returns a structure through first
/// pointer argument.
bool hasStructRetAttr() const {
- return paramHasAttr(1, ParamAttr::StructRet);
+ return paramHasAttr(1, Attribute::StructRet);
}
/// copyAttributesFrom - copy all additional attributes (those not needed to
Modified: llvm/trunk/include/llvm/Instructions.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Instructions.h?rev=56622&r1=56621&r2=56622&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Instructions.h (original)
+++ llvm/trunk/include/llvm/Instructions.h Thu Sep 25 16:00:45 2008
@@ -973,7 +973,7 @@
///
class CallInst : public Instruction {
- PAListPtr ParamAttrs; ///< parameter attributes for call
+ AttrListPtr AttributeList; ///< parameter attributes for call
CallInst(const CallInst &CI);
void init(Value *Func, Value* const *Params, unsigned NumParams);
void init(Value *Func, Value *Actual1, Value *Actual2);
@@ -1073,73 +1073,73 @@
SubclassData = (SubclassData & 1) | (CC << 1);
}
- /// getParamAttrs - Return the parameter attributes for this call.
+ /// getAttributes - Return the parameter attributes for this call.
///
- const PAListPtr &getParamAttrs() const { return ParamAttrs; }
+ const AttrListPtr &getAttributes() const { return AttributeList; }
- /// setParamAttrs - Sets the parameter attributes for this call.
- void setParamAttrs(const PAListPtr &Attrs) { ParamAttrs = Attrs; }
+ /// setAttributes - Sets the parameter attributes for this call.
+ void setAttributes(const AttrListPtr &Attrs) { AttributeList = Attrs; }
- /// addParamAttr - adds the attribute to the list of attributes.
- void addParamAttr(unsigned i, Attributes attr);
+ /// addAttribute - adds the attribute to the list of attributes.
+ void addAttribute(unsigned i, Attributes attr);
- /// removeParamAttr - removes the attribute from the list of attributes.
- void removeParamAttr(unsigned i, Attributes attr);
+ /// removeAttribute - removes the attribute from the list of attributes.
+ void removeAttribute(unsigned i, Attributes attr);
/// @brief Determine whether the call or the callee has the given attribute.
bool paramHasAttr(unsigned i, unsigned attr) const;
/// @brief Extract the alignment for a call or parameter (0=unknown).
unsigned getParamAlignment(unsigned i) const {
- return ParamAttrs.getParamAlignment(i);
+ return AttributeList.getParamAlignment(i);
}
/// @brief Determine if the call does not access memory.
bool doesNotAccessMemory() const {
- return paramHasAttr(0, ParamAttr::ReadNone);
+ return paramHasAttr(0, Attribute::ReadNone);
}
void setDoesNotAccessMemory(bool NotAccessMemory = true) {
- if (NotAccessMemory) addParamAttr(0, ParamAttr::ReadNone);
- else removeParamAttr(0, ParamAttr::ReadNone);
+ if (NotAccessMemory) addAttribute(0, Attribute::ReadNone);
+ else removeAttribute(0, Attribute::ReadNone);
}
/// @brief Determine if the call does not access or only reads memory.
bool onlyReadsMemory() const {
- return doesNotAccessMemory() || paramHasAttr(0, ParamAttr::ReadOnly);
+ return doesNotAccessMemory() || paramHasAttr(0, Attribute::ReadOnly);
}
void setOnlyReadsMemory(bool OnlyReadsMemory = true) {
- if (OnlyReadsMemory) addParamAttr(0, ParamAttr::ReadOnly);
- else removeParamAttr(0, ParamAttr::ReadOnly | ParamAttr::ReadNone);
+ if (OnlyReadsMemory) addAttribute(0, Attribute::ReadOnly);
+ else removeAttribute(0, Attribute::ReadOnly | Attribute::ReadNone);
}
/// @brief Determine if the call cannot return.
bool doesNotReturn() const {
- return paramHasAttr(0, ParamAttr::NoReturn);
+ return paramHasAttr(0, Attribute::NoReturn);
}
void setDoesNotReturn(bool DoesNotReturn = true) {
- if (DoesNotReturn) addParamAttr(0, ParamAttr::NoReturn);
- else removeParamAttr(0, ParamAttr::NoReturn);
+ if (DoesNotReturn) addAttribute(0, Attribute::NoReturn);
+ else removeAttribute(0, Attribute::NoReturn);
}
/// @brief Determine if the call cannot unwind.
bool doesNotThrow() const {
- return paramHasAttr(0, ParamAttr::NoUnwind);
+ return paramHasAttr(0, Attribute::NoUnwind);
}
void setDoesNotThrow(bool DoesNotThrow = true) {
- if (DoesNotThrow) addParamAttr(0, ParamAttr::NoUnwind);
- else removeParamAttr(0, ParamAttr::NoUnwind);
+ if (DoesNotThrow) addAttribute(0, Attribute::NoUnwind);
+ else removeAttribute(0, Attribute::NoUnwind);
}
/// @brief Determine if the call returns a structure through first
/// pointer argument.
bool hasStructRetAttr() const {
// Be friendly and also check the callee.
- return paramHasAttr(1, ParamAttr::StructRet);
+ return paramHasAttr(1, Attribute::StructRet);
}
/// @brief Determine if any call argument is an aggregate passed by value.
bool hasByValArgument() const {
- return ParamAttrs.hasAttrSomewhere(ParamAttr::ByVal);
+ return AttributeList.hasAttrSomewhere(Attribute::ByVal);
}
/// getCalledFunction - Return the function being called by this instruction
@@ -2353,7 +2353,7 @@
/// calling convention of the call.
///
class InvokeInst : public TerminatorInst {
- PAListPtr ParamAttrs;
+ AttrListPtr AttributeList;
InvokeInst(const InvokeInst &BI);
void init(Value *Fn, BasicBlock *IfNormal, BasicBlock *IfException,
Value* const *Args, unsigned NumArgs);
@@ -2431,69 +2431,69 @@
SubclassData = CC;
}
- /// getParamAttrs - Return the parameter attributes for this invoke.
+ /// getAttributes - Return the parameter attributes for this invoke.
///
- const PAListPtr &getParamAttrs() const { return ParamAttrs; }
+ const AttrListPtr &getAttributes() const { return AttributeList; }
- /// setParamAttrs - Set the parameter attributes for this invoke.
+ /// setAttributes - Set the parameter attributes for this invoke.
///
- void setParamAttrs(const PAListPtr &Attrs) { ParamAttrs = Attrs; }
+ void setAttributes(const AttrListPtr &Attrs) { AttributeList = Attrs; }
/// @brief Determine whether the call or the callee has the given attribute.
bool paramHasAttr(unsigned i, Attributes attr) const;
- /// addParamAttr - adds the attribute to the list of attributes.
- void addParamAttr(unsigned i, Attributes attr);
+ /// addAttribute - adds the attribute to the list of attributes.
+ void addAttribute(unsigned i, Attributes attr);
- /// removeParamAttr - removes the attribute from the list of attributes.
- void removeParamAttr(unsigned i, Attributes attr);
+ /// removeAttribute - removes the attribute from the list of attributes.
+ void removeAttribute(unsigned i, Attributes attr);
/// @brief Extract the alignment for a call or parameter (0=unknown).
unsigned getParamAlignment(unsigned i) const {
- return ParamAttrs.getParamAlignment(i);
+ return AttributeList.getParamAlignment(i);
}
/// @brief Determine if the call does not access memory.
bool doesNotAccessMemory() const {
- return paramHasAttr(0, ParamAttr::ReadNone);
+ return paramHasAttr(0, Attribute::ReadNone);
}
void setDoesNotAccessMemory(bool NotAccessMemory = true) {
- if (NotAccessMemory) addParamAttr(0, ParamAttr::ReadNone);
- else removeParamAttr(0, ParamAttr::ReadNone);
+ if (NotAccessMemory) addAttribute(0, Attribute::ReadNone);
+ else removeAttribute(0, Attribute::ReadNone);
}
/// @brief Determine if the call does not access or only reads memory.
bool onlyReadsMemory() const {
- return doesNotAccessMemory() || paramHasAttr(0, ParamAttr::ReadOnly);
+ return doesNotAccessMemory() || paramHasAttr(0, Attribute::ReadOnly);
}
void setOnlyReadsMemory(bool OnlyReadsMemory = true) {
- if (OnlyReadsMemory) addParamAttr(0, ParamAttr::ReadOnly);
- else removeParamAttr(0, ParamAttr::ReadOnly | ParamAttr::ReadNone);
+ if (OnlyReadsMemory) addAttribute(0, Attribute::ReadOnly);
+ else removeAttribute(0, Attribute::ReadOnly | Attribute::ReadNone);
}
/// @brief Determine if the call cannot return.
bool doesNotReturn() const {
- return paramHasAttr(0, ParamAttr::NoReturn);
+ return paramHasAttr(0, Attribute::NoReturn);
}
void setDoesNotReturn(bool DoesNotReturn = true) {
- if (DoesNotReturn) addParamAttr(0, ParamAttr::NoReturn);
- else removeParamAttr(0, ParamAttr::NoReturn);
+ if (DoesNotReturn) addAttribute(0, Attribute::NoReturn);
+ else removeAttribute(0, Attribute::NoReturn);
}
/// @brief Determine if the call cannot unwind.
bool doesNotThrow() const {
- return paramHasAttr(0, ParamAttr::NoUnwind);
+ return paramHasAttr(0, Attribute::NoUnwind);
}
void setDoesNotThrow(bool DoesNotThrow = true) {
- if (DoesNotThrow) addParamAttr(0, ParamAttr::NoUnwind);
- else removeParamAttr(0, ParamAttr::NoUnwind);
+ if (DoesNotThrow) addAttribute(0, Attribute::NoUnwind);
+ else removeAttribute(0, Attribute::NoUnwind);
}
/// @brief Determine if the call returns a structure through first
/// pointer argument.
bool hasStructRetAttr() const {
// Be friendly and also check the callee.
- return paramHasAttr(1, ParamAttr::StructRet);
+ return paramHasAttr(1, Attribute::StructRet);
}
/// getCalledFunction - Return the function called, or null if this is an
Modified: llvm/trunk/include/llvm/Intrinsics.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Intrinsics.h?rev=56622&r1=56621&r2=56622&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Intrinsics.h (original)
+++ llvm/trunk/include/llvm/Intrinsics.h Thu Sep 25 16:00:45 2008
@@ -24,7 +24,7 @@
class FunctionType;
class Function;
class Module;
-class PAListPtr;
+class AttrListPtr;
/// Intrinsic Namespace - This namespace contains an enum with a value for
/// every intrinsic/builtin function known by LLVM. These enum values are
@@ -49,9 +49,9 @@
///
const FunctionType *getType(ID id, const Type **Tys = 0, unsigned numTys = 0);
- /// Intrinsic::getParamAttrs(ID) - Return the attributes for an intrinsic.
+ /// Intrinsic::getAttributes(ID) - Return the attributes for an intrinsic.
///
- PAListPtr getParamAttrs(ID id);
+ AttrListPtr getAttributes(ID id);
/// Intrinsic::getDeclaration(M, ID) - Create or insert an LLVM Function
/// declaration for an intrinsic, and return it.
Modified: llvm/trunk/include/llvm/Support/CallSite.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/CallSite.h?rev=56622&r1=56621&r2=56622&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Support/CallSite.h (original)
+++ llvm/trunk/include/llvm/Support/CallSite.h Thu Sep 25 16:00:45 2008
@@ -62,10 +62,10 @@
unsigned getCallingConv() const;
void setCallingConv(unsigned CC);
- /// getParamAttrs/setParamAttrs - get or set the parameter attributes of
+ /// getAttributes/setAttributes - get or set the parameter attributes of
/// the call.
- const PAListPtr &getParamAttrs() const;
- void setParamAttrs(const PAListPtr &PAL);
+ const AttrListPtr &getAttributes() const;
+ void setAttributes(const AttrListPtr &PAL);
/// paramHasAttr - whether the call or the callee has the given attribute.
bool paramHasAttr(uint16_t i, Attributes attr) const;
Modified: llvm/trunk/lib/AsmParser/llvmAsmParser.cpp.cvs
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/AsmParser/llvmAsmParser.cpp.cvs?rev=56622&r1=56621&r2=56622&view=diff
==============================================================================
--- llvm/trunk/lib/AsmParser/llvmAsmParser.cpp.cvs (original)
+++ llvm/trunk/lib/AsmParser/llvmAsmParser.cpp.cvs Thu Sep 25 16:00:45 2008
@@ -400,7 +400,7 @@
/* Copy the first part of user declarations. */
-#line 14 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 14 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
#include "ParserInternals.h"
#include "llvm/CallingConv.h"
@@ -1377,7 +1377,7 @@
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
typedef union YYSTYPE
-#line 970 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 970 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
llvm::Module *ModuleVal;
llvm::Function *FunctionVal;
@@ -1405,7 +1405,7 @@
llvm::GlobalValue::LinkageTypes Linkage;
llvm::GlobalValue::VisibilityTypes Visibility;
- llvm::Attributes ParamAttrs;
+ llvm::Attributes Attributes;
llvm::APInt *APIntVal;
int64_t SInt64Val;
uint64_t UInt64Val;
@@ -1961,8 +1961,8 @@
"OptLocalName", "OptAddrSpace", "OptLocalAssign", "LocalNumber",
"GlobalName", "OptGlobalAssign", "GlobalAssign", "GVInternalLinkage",
"GVExternalLinkage", "GVVisibilityStyle", "FunctionDeclareLinkage",
- "FunctionDefineLinkage", "AliasLinkage", "OptCallingConv", "ParamAttr",
- "OptParamAttrs", "FuncAttr", "OptFuncAttrs", "FuncNoteList", "FuncNote",
+ "FunctionDefineLinkage", "AliasLinkage", "OptCallingConv", "Attribute",
+ "OptAttributes", "FuncAttr", "OptFuncAttrs", "FuncNoteList", "FuncNote",
"OptFuncNotes", "OptGC", "OptAlign", "OptCAlign", "SectionString",
"OptSection", "GlobalVarAttributes", "GlobalVarAttribute", "PrimType",
"Types", "ArgType", "ResultTypes", "ArgTypeList", "ArgTypeListI",
@@ -3657,152 +3657,152 @@
switch (yyn)
{
case 29:
-#line 1147 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1147 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.IPredicate) = ICmpInst::ICMP_EQ; ;}
break;
case 30:
-#line 1147 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1147 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.IPredicate) = ICmpInst::ICMP_NE; ;}
break;
case 31:
-#line 1148 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1148 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.IPredicate) = ICmpInst::ICMP_SLT; ;}
break;
case 32:
-#line 1148 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1148 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.IPredicate) = ICmpInst::ICMP_SGT; ;}
break;
case 33:
-#line 1149 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1149 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.IPredicate) = ICmpInst::ICMP_SLE; ;}
break;
case 34:
-#line 1149 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1149 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.IPredicate) = ICmpInst::ICMP_SGE; ;}
break;
case 35:
-#line 1150 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1150 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.IPredicate) = ICmpInst::ICMP_ULT; ;}
break;
case 36:
-#line 1150 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1150 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.IPredicate) = ICmpInst::ICMP_UGT; ;}
break;
case 37:
-#line 1151 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1151 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.IPredicate) = ICmpInst::ICMP_ULE; ;}
break;
case 38:
-#line 1151 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1151 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.IPredicate) = ICmpInst::ICMP_UGE; ;}
break;
case 39:
-#line 1155 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1155 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.FPredicate) = FCmpInst::FCMP_OEQ; ;}
break;
case 40:
-#line 1155 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1155 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.FPredicate) = FCmpInst::FCMP_ONE; ;}
break;
case 41:
-#line 1156 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1156 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.FPredicate) = FCmpInst::FCMP_OLT; ;}
break;
case 42:
-#line 1156 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1156 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.FPredicate) = FCmpInst::FCMP_OGT; ;}
break;
case 43:
-#line 1157 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1157 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.FPredicate) = FCmpInst::FCMP_OLE; ;}
break;
case 44:
-#line 1157 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1157 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.FPredicate) = FCmpInst::FCMP_OGE; ;}
break;
case 45:
-#line 1158 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1158 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.FPredicate) = FCmpInst::FCMP_ORD; ;}
break;
case 46:
-#line 1158 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1158 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.FPredicate) = FCmpInst::FCMP_UNO; ;}
break;
case 47:
-#line 1159 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1159 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.FPredicate) = FCmpInst::FCMP_UEQ; ;}
break;
case 48:
-#line 1159 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1159 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.FPredicate) = FCmpInst::FCMP_UNE; ;}
break;
case 49:
-#line 1160 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1160 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.FPredicate) = FCmpInst::FCMP_ULT; ;}
break;
case 50:
-#line 1160 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1160 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.FPredicate) = FCmpInst::FCMP_UGT; ;}
break;
case 51:
-#line 1161 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1161 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.FPredicate) = FCmpInst::FCMP_ULE; ;}
break;
case 52:
-#line 1161 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1161 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.FPredicate) = FCmpInst::FCMP_UGE; ;}
break;
case 53:
-#line 1162 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1162 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.FPredicate) = FCmpInst::FCMP_TRUE; ;}
break;
case 54:
-#line 1163 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1163 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.FPredicate) = FCmpInst::FCMP_FALSE; ;}
break;
case 65:
-#line 1172 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1172 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.StrVal) = 0; ;}
break;
case 66:
-#line 1174 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1174 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.UIntVal)=(yyvsp[(3) - (4)].UInt64Val); ;}
break;
case 67:
-#line 1175 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1175 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.UIntVal)=0; ;}
break;
case 68:
-#line 1179 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1179 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
(yyval.StrVal) = (yyvsp[(1) - (2)].StrVal);
CHECK_FOR_ERROR
@@ -3810,7 +3810,7 @@
break;
case 69:
-#line 1183 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1183 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
(yyval.StrVal) = 0;
CHECK_FOR_ERROR
@@ -3818,7 +3818,7 @@
break;
case 70:
-#line 1188 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1188 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
(yyval.UIntVal) = (yyvsp[(1) - (2)].UIntVal);
CHECK_FOR_ERROR
@@ -3826,7 +3826,7 @@
break;
case 74:
-#line 1197 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1197 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
(yyval.StrVal) = 0;
CHECK_FOR_ERROR
@@ -3834,7 +3834,7 @@
break;
case 75:
-#line 1202 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1202 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
(yyval.StrVal) = (yyvsp[(1) - (2)].StrVal);
CHECK_FOR_ERROR
@@ -3842,162 +3842,162 @@
break;
case 76:
-#line 1208 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1208 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.Linkage) = GlobalValue::InternalLinkage; ;}
break;
case 77:
-#line 1209 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1209 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.Linkage) = GlobalValue::WeakLinkage; ;}
break;
case 78:
-#line 1210 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1210 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.Linkage) = GlobalValue::LinkOnceLinkage; ;}
break;
case 79:
-#line 1211 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1211 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.Linkage) = GlobalValue::AppendingLinkage; ;}
break;
case 80:
-#line 1212 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1212 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.Linkage) = GlobalValue::DLLExportLinkage; ;}
break;
case 81:
-#line 1213 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1213 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.Linkage) = GlobalValue::CommonLinkage; ;}
break;
case 82:
-#line 1217 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1217 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.Linkage) = GlobalValue::DLLImportLinkage; ;}
break;
case 83:
-#line 1218 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1218 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.Linkage) = GlobalValue::ExternalWeakLinkage; ;}
break;
case 84:
-#line 1219 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1219 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.Linkage) = GlobalValue::ExternalLinkage; ;}
break;
case 85:
-#line 1223 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1223 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.Visibility) = GlobalValue::DefaultVisibility; ;}
break;
case 86:
-#line 1224 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1224 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.Visibility) = GlobalValue::DefaultVisibility; ;}
break;
case 87:
-#line 1225 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1225 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.Visibility) = GlobalValue::HiddenVisibility; ;}
break;
case 88:
-#line 1226 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1226 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.Visibility) = GlobalValue::ProtectedVisibility; ;}
break;
case 89:
-#line 1230 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1230 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.Linkage) = GlobalValue::ExternalLinkage; ;}
break;
case 90:
-#line 1231 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1231 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.Linkage) = GlobalValue::DLLImportLinkage; ;}
break;
case 91:
-#line 1232 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1232 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.Linkage) = GlobalValue::ExternalWeakLinkage; ;}
break;
case 92:
-#line 1236 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1236 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.Linkage) = GlobalValue::ExternalLinkage; ;}
break;
case 93:
-#line 1237 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1237 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.Linkage) = GlobalValue::InternalLinkage; ;}
break;
case 94:
-#line 1238 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1238 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.Linkage) = GlobalValue::LinkOnceLinkage; ;}
break;
case 95:
-#line 1239 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1239 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.Linkage) = GlobalValue::WeakLinkage; ;}
break;
case 96:
-#line 1240 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1240 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.Linkage) = GlobalValue::DLLExportLinkage; ;}
break;
case 97:
-#line 1244 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1244 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.Linkage) = GlobalValue::ExternalLinkage; ;}
break;
case 98:
-#line 1245 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1245 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.Linkage) = GlobalValue::WeakLinkage; ;}
break;
case 99:
-#line 1246 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1246 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.Linkage) = GlobalValue::InternalLinkage; ;}
break;
case 100:
-#line 1249 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1249 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.UIntVal) = CallingConv::C; ;}
break;
case 101:
-#line 1250 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1250 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.UIntVal) = CallingConv::C; ;}
break;
case 102:
-#line 1251 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1251 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.UIntVal) = CallingConv::Fast; ;}
break;
case 103:
-#line 1252 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1252 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.UIntVal) = CallingConv::Cold; ;}
break;
case 104:
-#line 1253 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1253 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.UIntVal) = CallingConv::X86_StdCall; ;}
break;
case 105:
-#line 1254 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1254 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.UIntVal) = CallingConv::X86_FastCall; ;}
break;
case 106:
-#line 1255 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1255 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.UIntVal) = CallingConv::X86_SSECall; ;}
break;
case 107:
-#line 1256 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1256 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
if ((unsigned)(yyvsp[(2) - (2)].UInt64Val) != (yyvsp[(2) - (2)].UInt64Val))
GEN_ERROR("Calling conv too large");
@@ -4007,181 +4007,181 @@
break;
case 108:
-#line 1263 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
- { (yyval.ParamAttrs) = ParamAttr::ZExt; ;}
+#line 1263 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
+ { (yyval.Attributes) = Attribute::ZExt; ;}
break;
case 109:
-#line 1264 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
- { (yyval.ParamAttrs) = ParamAttr::ZExt; ;}
+#line 1264 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
+ { (yyval.Attributes) = Attribute::ZExt; ;}
break;
case 110:
-#line 1265 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
- { (yyval.ParamAttrs) = ParamAttr::SExt; ;}
+#line 1265 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
+ { (yyval.Attributes) = Attribute::SExt; ;}
break;
case 111:
-#line 1266 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
- { (yyval.ParamAttrs) = ParamAttr::SExt; ;}
+#line 1266 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
+ { (yyval.Attributes) = Attribute::SExt; ;}
break;
case 112:
-#line 1267 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
- { (yyval.ParamAttrs) = ParamAttr::InReg; ;}
+#line 1267 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
+ { (yyval.Attributes) = Attribute::InReg; ;}
break;
case 113:
-#line 1268 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
- { (yyval.ParamAttrs) = ParamAttr::StructRet; ;}
+#line 1268 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
+ { (yyval.Attributes) = Attribute::StructRet; ;}
break;
case 114:
-#line 1269 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
- { (yyval.ParamAttrs) = ParamAttr::NoAlias; ;}
+#line 1269 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
+ { (yyval.Attributes) = Attribute::NoAlias; ;}
break;
case 115:
-#line 1270 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
- { (yyval.ParamAttrs) = ParamAttr::ByVal; ;}
+#line 1270 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
+ { (yyval.Attributes) = Attribute::ByVal; ;}
break;
case 116:
-#line 1271 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
- { (yyval.ParamAttrs) = ParamAttr::Nest; ;}
+#line 1271 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
+ { (yyval.Attributes) = Attribute::Nest; ;}
break;
case 117:
-#line 1272 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
- { (yyval.ParamAttrs) =
- ParamAttr::constructAlignmentFromInt((yyvsp[(2) - (2)].UInt64Val)); ;}
+#line 1272 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
+ { (yyval.Attributes) =
+ Attribute::constructAlignmentFromInt((yyvsp[(2) - (2)].UInt64Val)); ;}
break;
case 118:
-#line 1276 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
- { (yyval.ParamAttrs) = ParamAttr::None; ;}
+#line 1276 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
+ { (yyval.Attributes) = Attribute::None; ;}
break;
case 119:
-#line 1277 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1277 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
- (yyval.ParamAttrs) = (yyvsp[(1) - (2)].ParamAttrs) | (yyvsp[(2) - (2)].ParamAttrs);
+ (yyval.Attributes) = (yyvsp[(1) - (2)].Attributes) | (yyvsp[(2) - (2)].Attributes);
;}
break;
case 120:
-#line 1282 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
- { (yyval.ParamAttrs) = ParamAttr::NoReturn; ;}
+#line 1282 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
+ { (yyval.Attributes) = Attribute::NoReturn; ;}
break;
case 121:
-#line 1283 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
- { (yyval.ParamAttrs) = ParamAttr::NoUnwind; ;}
+#line 1283 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
+ { (yyval.Attributes) = Attribute::NoUnwind; ;}
break;
case 122:
-#line 1284 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
- { (yyval.ParamAttrs) = ParamAttr::InReg; ;}
+#line 1284 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
+ { (yyval.Attributes) = Attribute::InReg; ;}
break;
case 123:
-#line 1285 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
- { (yyval.ParamAttrs) = ParamAttr::ZExt; ;}
+#line 1285 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
+ { (yyval.Attributes) = Attribute::ZExt; ;}
break;
case 124:
-#line 1286 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
- { (yyval.ParamAttrs) = ParamAttr::SExt; ;}
+#line 1286 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
+ { (yyval.Attributes) = Attribute::SExt; ;}
break;
case 125:
-#line 1287 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
- { (yyval.ParamAttrs) = ParamAttr::ReadNone; ;}
+#line 1287 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
+ { (yyval.Attributes) = Attribute::ReadNone; ;}
break;
case 126:
-#line 1288 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
- { (yyval.ParamAttrs) = ParamAttr::ReadOnly; ;}
+#line 1288 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
+ { (yyval.Attributes) = Attribute::ReadOnly; ;}
break;
case 127:
-#line 1291 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
- { (yyval.ParamAttrs) = ParamAttr::None; ;}
+#line 1291 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
+ { (yyval.Attributes) = Attribute::None; ;}
break;
case 128:
-#line 1292 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1292 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
- (yyval.ParamAttrs) = (yyvsp[(1) - (2)].ParamAttrs) | (yyvsp[(2) - (2)].ParamAttrs);
+ (yyval.Attributes) = (yyvsp[(1) - (2)].Attributes) | (yyvsp[(2) - (2)].Attributes);
;}
break;
case 129:
-#line 1297 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
- { (yyval.ParamAttrs) = (yyvsp[(1) - (1)].ParamAttrs); ;}
+#line 1297 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
+ { (yyval.Attributes) = (yyvsp[(1) - (1)].Attributes); ;}
break;
case 130:
-#line 1298 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1298 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
- unsigned tmp = (yyvsp[(1) - (3)].ParamAttrs) | (yyvsp[(3) - (3)].ParamAttrs);
- if ((yyvsp[(3) - (3)].ParamAttrs) == FnAttr::NoInline
- && ((yyvsp[(1) - (3)].ParamAttrs) & FnAttr::AlwaysInline))
+ unsigned tmp = (yyvsp[(1) - (3)].Attributes) | (yyvsp[(3) - (3)].Attributes);
+ if ((yyvsp[(3) - (3)].Attributes) == Attribute::NoInline
+ && ((yyvsp[(1) - (3)].Attributes) & Attribute::AlwaysInline))
GEN_ERROR("Function Notes may include only one inline notes!")
- if ((yyvsp[(3) - (3)].ParamAttrs) == FnAttr::AlwaysInline
- && ((yyvsp[(1) - (3)].ParamAttrs) & FnAttr::NoInline))
+ if ((yyvsp[(3) - (3)].Attributes) == Attribute::AlwaysInline
+ && ((yyvsp[(1) - (3)].Attributes) & Attribute::NoInline))
GEN_ERROR("Function Notes may include only one inline notes!")
- (yyval.ParamAttrs) = tmp;
+ (yyval.Attributes) = tmp;
CHECK_FOR_ERROR
;}
break;
case 131:
-#line 1311 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
- { (yyval.ParamAttrs) = FnAttr::NoInline; ;}
+#line 1311 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
+ { (yyval.Attributes) = Attribute::NoInline; ;}
break;
case 132:
-#line 1312 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
- { (yyval.ParamAttrs) = FnAttr::AlwaysInline; ;}
+#line 1312 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
+ { (yyval.Attributes) = Attribute::AlwaysInline; ;}
break;
case 133:
-#line 1313 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
- { (yyval.ParamAttrs) = FnAttr::OptimizeForSize; ;}
+#line 1313 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
+ { (yyval.Attributes) = Attribute::OptimizeForSize; ;}
break;
case 134:
-#line 1316 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
- { (yyval.ParamAttrs) = FnAttr::None; ;}
+#line 1316 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
+ { (yyval.Attributes) = Attribute::None; ;}
break;
case 135:
-#line 1317 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1317 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
- (yyval.ParamAttrs) = (yyvsp[(3) - (4)].ParamAttrs);
+ (yyval.Attributes) = (yyvsp[(3) - (4)].Attributes);
;}
break;
case 136:
-#line 1322 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1322 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.StrVal) = 0; ;}
break;
case 137:
-#line 1323 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1323 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
(yyval.StrVal) = (yyvsp[(2) - (2)].StrVal);
;}
break;
case 138:
-#line 1330 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1330 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.UIntVal) = 0; ;}
break;
case 139:
-#line 1331 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1331 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
(yyval.UIntVal) = (yyvsp[(2) - (2)].UInt64Val);
if ((yyval.UIntVal) != 0 && !isPowerOf2_32((yyval.UIntVal)))
@@ -4191,12 +4191,12 @@
break;
case 140:
-#line 1337 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1337 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.UIntVal) = 0; ;}
break;
case 141:
-#line 1338 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1338 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
(yyval.UIntVal) = (yyvsp[(3) - (3)].UInt64Val);
if ((yyval.UIntVal) != 0 && !isPowerOf2_32((yyval.UIntVal)))
@@ -4206,7 +4206,7 @@
break;
case 142:
-#line 1347 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1347 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
for (unsigned i = 0, e = (yyvsp[(2) - (2)].StrVal)->length(); i != e; ++i)
if ((*(yyvsp[(2) - (2)].StrVal))[i] == '"' || (*(yyvsp[(2) - (2)].StrVal))[i] == '\\')
@@ -4217,27 +4217,27 @@
break;
case 143:
-#line 1355 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1355 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.StrVal) = 0; ;}
break;
case 144:
-#line 1356 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1356 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.StrVal) = (yyvsp[(1) - (1)].StrVal); ;}
break;
case 145:
-#line 1361 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1361 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{;}
break;
case 146:
-#line 1362 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1362 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{;}
break;
case 147:
-#line 1363 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1363 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
CurGV->setSection(*(yyvsp[(1) - (1)].StrVal));
delete (yyvsp[(1) - (1)].StrVal);
@@ -4246,7 +4246,7 @@
break;
case 148:
-#line 1368 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1368 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
if ((yyvsp[(2) - (2)].UInt64Val) != 0 && !isPowerOf2_32((yyvsp[(2) - (2)].UInt64Val)))
GEN_ERROR("Alignment must be a power of two");
@@ -4256,7 +4256,7 @@
break;
case 156:
-#line 1384 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1384 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
(yyval.TypeVal) = new PATypeHolder(OpaqueType::get());
CHECK_FOR_ERROR
@@ -4264,7 +4264,7 @@
break;
case 157:
-#line 1388 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1388 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
(yyval.TypeVal) = new PATypeHolder((yyvsp[(1) - (1)].PrimType));
CHECK_FOR_ERROR
@@ -4272,7 +4272,7 @@
break;
case 158:
-#line 1392 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1392 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ // Pointer type?
if (*(yyvsp[(1) - (3)].TypeVal) == Type::LabelTy)
GEN_ERROR("Cannot form a pointer to a basic block");
@@ -4283,7 +4283,7 @@
break;
case 159:
-#line 1399 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1399 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ // Named types are also simple types...
const Type* tmp = getTypeVal((yyvsp[(1) - (1)].ValIDVal));
CHECK_FOR_ERROR
@@ -4292,7 +4292,7 @@
break;
case 160:
-#line 1404 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1404 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ // Type UpReference
if ((yyvsp[(2) - (2)].UInt64Val) > (uint64_t)~0U) GEN_ERROR("Value out of range");
OpaqueType *OT = OpaqueType::get(); // Use temporary placeholder
@@ -4304,7 +4304,7 @@
break;
case 161:
-#line 1412 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1412 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
// Allow but ignore attributes on function types; this permits auto-upgrade.
// FIXME: remove in LLVM 3.0.
@@ -4337,7 +4337,7 @@
break;
case 162:
-#line 1441 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1441 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
// Allow but ignore attributes on function types; this permits auto-upgrade.
// FIXME: remove in LLVM 3.0.
@@ -4365,7 +4365,7 @@
break;
case 163:
-#line 1466 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1466 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ // Sized array type?
(yyval.TypeVal) = new PATypeHolder(HandleUpRefs(ArrayType::get(*(yyvsp[(4) - (5)].TypeVal), (yyvsp[(2) - (5)].UInt64Val))));
delete (yyvsp[(4) - (5)].TypeVal);
@@ -4374,7 +4374,7 @@
break;
case 164:
-#line 1471 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1471 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ // Vector type?
const llvm::Type* ElemTy = (yyvsp[(4) - (5)].TypeVal)->get();
if ((unsigned)(yyvsp[(2) - (5)].UInt64Val) != (yyvsp[(2) - (5)].UInt64Val))
@@ -4388,7 +4388,7 @@
break;
case 165:
-#line 1481 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1481 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ // Structure type?
std::vector<const Type*> Elements;
for (std::list<llvm::PATypeHolder>::iterator I = (yyvsp[(2) - (3)].TypeList)->begin(),
@@ -4402,7 +4402,7 @@
break;
case 166:
-#line 1491 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1491 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ // Empty structure type?
(yyval.TypeVal) = new PATypeHolder(StructType::get(std::vector<const Type*>()));
CHECK_FOR_ERROR
@@ -4410,7 +4410,7 @@
break;
case 167:
-#line 1495 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1495 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
std::vector<const Type*> Elements;
for (std::list<llvm::PATypeHolder>::iterator I = (yyvsp[(3) - (5)].TypeList)->begin(),
@@ -4424,7 +4424,7 @@
break;
case 168:
-#line 1505 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1505 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ // Empty structure type?
(yyval.TypeVal) = new PATypeHolder(StructType::get(std::vector<const Type*>(), true));
CHECK_FOR_ERROR
@@ -4432,17 +4432,17 @@
break;
case 169:
-#line 1512 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1512 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
// Allow but ignore attributes on function types; this permits auto-upgrade.
// FIXME: remove in LLVM 3.0.
(yyval.TypeWithAttrs).Ty = (yyvsp[(1) - (2)].TypeVal);
- (yyval.TypeWithAttrs).Attrs = ParamAttr::None;
+ (yyval.TypeWithAttrs).Attrs = Attribute::None;
;}
break;
case 170:
-#line 1521 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1521 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
if (!UpRefs.empty())
GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (1)].TypeVal))->getDescription());
@@ -4453,14 +4453,14 @@
break;
case 171:
-#line 1528 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1528 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
(yyval.TypeVal) = new PATypeHolder(Type::VoidTy);
;}
break;
case 172:
-#line 1533 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1533 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
(yyval.TypeWithAttrsList) = new TypeWithAttrsList();
(yyval.TypeWithAttrsList)->push_back((yyvsp[(1) - (1)].TypeWithAttrs));
@@ -4469,7 +4469,7 @@
break;
case 173:
-#line 1538 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1538 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
((yyval.TypeWithAttrsList)=(yyvsp[(1) - (3)].TypeWithAttrsList))->push_back((yyvsp[(3) - (3)].TypeWithAttrs));
CHECK_FOR_ERROR
@@ -4477,10 +4477,10 @@
break;
case 175:
-#line 1546 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1546 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
(yyval.TypeWithAttrsList)=(yyvsp[(1) - (3)].TypeWithAttrsList);
- TypeWithAttrs TWA; TWA.Attrs = ParamAttr::None;
+ TypeWithAttrs TWA; TWA.Attrs = Attribute::None;
TWA.Ty = new PATypeHolder(Type::VoidTy);
(yyval.TypeWithAttrsList)->push_back(TWA);
CHECK_FOR_ERROR
@@ -4488,10 +4488,10 @@
break;
case 176:
-#line 1553 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1553 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
(yyval.TypeWithAttrsList) = new TypeWithAttrsList;
- TypeWithAttrs TWA; TWA.Attrs = ParamAttr::None;
+ TypeWithAttrs TWA; TWA.Attrs = Attribute::None;
TWA.Ty = new PATypeHolder(Type::VoidTy);
(yyval.TypeWithAttrsList)->push_back(TWA);
CHECK_FOR_ERROR
@@ -4499,7 +4499,7 @@
break;
case 177:
-#line 1560 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1560 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
(yyval.TypeWithAttrsList) = new TypeWithAttrsList();
CHECK_FOR_ERROR
@@ -4507,7 +4507,7 @@
break;
case 178:
-#line 1568 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1568 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
(yyval.TypeList) = new std::list<PATypeHolder>();
(yyval.TypeList)->push_back(*(yyvsp[(1) - (1)].TypeVal));
@@ -4517,7 +4517,7 @@
break;
case 179:
-#line 1574 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1574 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
((yyval.TypeList)=(yyvsp[(1) - (3)].TypeList))->push_back(*(yyvsp[(3) - (3)].TypeVal));
delete (yyvsp[(3) - (3)].TypeVal);
@@ -4526,7 +4526,7 @@
break;
case 180:
-#line 1586 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1586 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ // Nonempty unsized arr
if (!UpRefs.empty())
GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (4)].TypeVal))->getDescription());
@@ -4558,7 +4558,7 @@
break;
case 181:
-#line 1614 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1614 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
if (!UpRefs.empty())
GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (3)].TypeVal))->getDescription());
@@ -4578,7 +4578,7 @@
break;
case 182:
-#line 1630 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1630 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
if (!UpRefs.empty())
GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (3)].TypeVal))->getDescription());
@@ -4609,7 +4609,7 @@
break;
case 183:
-#line 1657 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1657 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ // Nonempty unsized arr
if (!UpRefs.empty())
GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (4)].TypeVal))->getDescription());
@@ -4641,7 +4641,7 @@
break;
case 184:
-#line 1685 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1685 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
const StructType *STy = dyn_cast<StructType>((yyvsp[(1) - (4)].TypeVal)->get());
if (STy == 0)
@@ -4671,7 +4671,7 @@
break;
case 185:
-#line 1711 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1711 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
if (!UpRefs.empty())
GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (3)].TypeVal))->getDescription());
@@ -4695,7 +4695,7 @@
break;
case 186:
-#line 1731 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1731 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
const StructType *STy = dyn_cast<StructType>((yyvsp[(1) - (6)].TypeVal)->get());
if (STy == 0)
@@ -4725,7 +4725,7 @@
break;
case 187:
-#line 1757 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1757 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
if (!UpRefs.empty())
GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (5)].TypeVal))->getDescription());
@@ -4749,7 +4749,7 @@
break;
case 188:
-#line 1777 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1777 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
if (!UpRefs.empty())
GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (2)].TypeVal))->getDescription());
@@ -4765,7 +4765,7 @@
break;
case 189:
-#line 1789 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1789 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
if (!UpRefs.empty())
GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (2)].TypeVal))->getDescription());
@@ -4776,7 +4776,7 @@
break;
case 190:
-#line 1796 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1796 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
if (!UpRefs.empty())
GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (2)].TypeVal))->getDescription());
@@ -4846,7 +4846,7 @@
break;
case 191:
-#line 1862 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1862 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
if (!UpRefs.empty())
GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (2)].TypeVal))->getDescription());
@@ -4860,7 +4860,7 @@
break;
case 192:
-#line 1872 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1872 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
if (!UpRefs.empty())
GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (2)].TypeVal))->getDescription());
@@ -4874,7 +4874,7 @@
break;
case 193:
-#line 1882 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1882 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ // integral constants
if (!ConstantInt::isValueValidForType((yyvsp[(1) - (2)].PrimType), (yyvsp[(2) - (2)].SInt64Val)))
GEN_ERROR("Constant value doesn't fit in type");
@@ -4884,7 +4884,7 @@
break;
case 194:
-#line 1888 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1888 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ // arbitrary precision integer constants
uint32_t BitWidth = cast<IntegerType>((yyvsp[(1) - (2)].PrimType))->getBitWidth();
if ((yyvsp[(2) - (2)].APIntVal)->getBitWidth() > BitWidth) {
@@ -4898,7 +4898,7 @@
break;
case 195:
-#line 1898 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1898 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ // integral constants
if (!ConstantInt::isValueValidForType((yyvsp[(1) - (2)].PrimType), (yyvsp[(2) - (2)].UInt64Val)))
GEN_ERROR("Constant value doesn't fit in type");
@@ -4908,7 +4908,7 @@
break;
case 196:
-#line 1904 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1904 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ // arbitrary precision integer constants
uint32_t BitWidth = cast<IntegerType>((yyvsp[(1) - (2)].PrimType))->getBitWidth();
if ((yyvsp[(2) - (2)].APIntVal)->getBitWidth() > BitWidth) {
@@ -4922,7 +4922,7 @@
break;
case 197:
-#line 1914 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1914 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ // Boolean constants
if (cast<IntegerType>((yyvsp[(1) - (2)].PrimType))->getBitWidth() != 1)
GEN_ERROR("Constant true must have type i1");
@@ -4932,7 +4932,7 @@
break;
case 198:
-#line 1920 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1920 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ // Boolean constants
if (cast<IntegerType>((yyvsp[(1) - (2)].PrimType))->getBitWidth() != 1)
GEN_ERROR("Constant false must have type i1");
@@ -4942,7 +4942,7 @@
break;
case 199:
-#line 1926 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1926 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ // Floating point constants
if (!ConstantFP::isValueValidForType((yyvsp[(1) - (2)].PrimType), *(yyvsp[(2) - (2)].FPVal)))
GEN_ERROR("Floating point constant invalid for type");
@@ -4957,7 +4957,7 @@
break;
case 200:
-#line 1939 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1939 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
if (!UpRefs.empty())
GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(5) - (6)].TypeVal))->getDescription());
@@ -4973,7 +4973,7 @@
break;
case 201:
-#line 1951 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1951 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
if (!isa<PointerType>((yyvsp[(3) - (5)].ConstVal)->getType()))
GEN_ERROR("GetElementPtr requires a pointer operand");
@@ -4998,7 +4998,7 @@
break;
case 202:
-#line 1972 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1972 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
if ((yyvsp[(3) - (8)].ConstVal)->getType() != Type::Int1Ty)
GEN_ERROR("Select condition must be of boolean type");
@@ -5010,7 +5010,7 @@
break;
case 203:
-#line 1980 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1980 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
if ((yyvsp[(3) - (6)].ConstVal)->getType() != (yyvsp[(5) - (6)].ConstVal)->getType())
GEN_ERROR("Binary operator types must match");
@@ -5020,7 +5020,7 @@
break;
case 204:
-#line 1986 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1986 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
if ((yyvsp[(3) - (6)].ConstVal)->getType() != (yyvsp[(5) - (6)].ConstVal)->getType())
GEN_ERROR("Logical operator types must match");
@@ -5035,7 +5035,7 @@
break;
case 205:
-#line 1997 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1997 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
if ((yyvsp[(4) - (7)].ConstVal)->getType() != (yyvsp[(6) - (7)].ConstVal)->getType())
GEN_ERROR("icmp operand types must match");
@@ -5044,7 +5044,7 @@
break;
case 206:
-#line 2002 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2002 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
if ((yyvsp[(4) - (7)].ConstVal)->getType() != (yyvsp[(6) - (7)].ConstVal)->getType())
GEN_ERROR("fcmp operand types must match");
@@ -5053,7 +5053,7 @@
break;
case 207:
-#line 2007 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2007 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
if ((yyvsp[(4) - (7)].ConstVal)->getType() != (yyvsp[(6) - (7)].ConstVal)->getType())
GEN_ERROR("vicmp operand types must match");
@@ -5062,7 +5062,7 @@
break;
case 208:
-#line 2012 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2012 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
if ((yyvsp[(4) - (7)].ConstVal)->getType() != (yyvsp[(6) - (7)].ConstVal)->getType())
GEN_ERROR("vfcmp operand types must match");
@@ -5071,7 +5071,7 @@
break;
case 209:
-#line 2017 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2017 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
if (!ExtractElementInst::isValidOperands((yyvsp[(3) - (6)].ConstVal), (yyvsp[(5) - (6)].ConstVal)))
GEN_ERROR("Invalid extractelement operands");
@@ -5081,7 +5081,7 @@
break;
case 210:
-#line 2023 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2023 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
if (!InsertElementInst::isValidOperands((yyvsp[(3) - (8)].ConstVal), (yyvsp[(5) - (8)].ConstVal), (yyvsp[(7) - (8)].ConstVal)))
GEN_ERROR("Invalid insertelement operands");
@@ -5091,7 +5091,7 @@
break;
case 211:
-#line 2029 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2029 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
if (!ShuffleVectorInst::isValidOperands((yyvsp[(3) - (8)].ConstVal), (yyvsp[(5) - (8)].ConstVal), (yyvsp[(7) - (8)].ConstVal)))
GEN_ERROR("Invalid shufflevector operands");
@@ -5101,7 +5101,7 @@
break;
case 212:
-#line 2035 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2035 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
if (!isa<StructType>((yyvsp[(3) - (5)].ConstVal)->getType()) && !isa<ArrayType>((yyvsp[(3) - (5)].ConstVal)->getType()))
GEN_ERROR("ExtractValue requires an aggregate operand");
@@ -5113,7 +5113,7 @@
break;
case 213:
-#line 2043 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2043 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
if (!isa<StructType>((yyvsp[(3) - (7)].ConstVal)->getType()) && !isa<ArrayType>((yyvsp[(3) - (7)].ConstVal)->getType()))
GEN_ERROR("InsertValue requires an aggregate operand");
@@ -5125,7 +5125,7 @@
break;
case 214:
-#line 2054 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2054 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
((yyval.ConstVector) = (yyvsp[(1) - (3)].ConstVector))->push_back((yyvsp[(3) - (3)].ConstVal));
CHECK_FOR_ERROR
@@ -5133,7 +5133,7 @@
break;
case 215:
-#line 2058 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2058 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
(yyval.ConstVector) = new std::vector<Constant*>();
(yyval.ConstVector)->push_back((yyvsp[(1) - (1)].ConstVal));
@@ -5142,27 +5142,27 @@
break;
case 216:
-#line 2066 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2066 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.BoolVal) = false; ;}
break;
case 217:
-#line 2066 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2066 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.BoolVal) = true; ;}
break;
case 218:
-#line 2069 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2069 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.BoolVal) = true; ;}
break;
case 219:
-#line 2069 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2069 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.BoolVal) = false; ;}
break;
case 220:
-#line 2072 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2072 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
const Type* VTy = (yyvsp[(1) - (2)].TypeVal)->get();
Value *V = getVal(VTy, (yyvsp[(2) - (2)].ValIDVal));
@@ -5178,7 +5178,7 @@
break;
case 221:
-#line 2084 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2084 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
Constant *Val = (yyvsp[(3) - (6)].ConstVal);
const Type *DestTy = (yyvsp[(5) - (6)].TypeVal)->get();
@@ -5194,7 +5194,7 @@
break;
case 222:
-#line 2105 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2105 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
(yyval.ModuleVal) = ParserResult = CurModule.CurrentModule;
CurModule.ModuleDone();
@@ -5203,7 +5203,7 @@
break;
case 223:
-#line 2110 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2110 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
(yyval.ModuleVal) = ParserResult = CurModule.CurrentModule;
CurModule.ModuleDone();
@@ -5212,12 +5212,12 @@
break;
case 226:
-#line 2123 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2123 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ CurFun.isDeclare = false; ;}
break;
case 227:
-#line 2123 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2123 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
CurFun.FunctionDone();
CHECK_FOR_ERROR
@@ -5225,26 +5225,26 @@
break;
case 228:
-#line 2127 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2127 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ CurFun.isDeclare = true; ;}
break;
case 229:
-#line 2127 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2127 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
CHECK_FOR_ERROR
;}
break;
case 230:
-#line 2130 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2130 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
CHECK_FOR_ERROR
;}
break;
case 231:
-#line 2133 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2133 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
if (!UpRefs.empty())
GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(3) - (3)].TypeVal))->getDescription());
@@ -5272,7 +5272,7 @@
break;
case 232:
-#line 2157 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2157 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
ResolveTypeTo((yyvsp[(1) - (3)].StrVal), (yyvsp[(3) - (3)].PrimType));
@@ -5287,7 +5287,7 @@
break;
case 233:
-#line 2169 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2169 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
/* "Externally Visible" Linkage */
if ((yyvsp[(5) - (6)].ConstVal) == 0)
@@ -5299,14 +5299,14 @@
break;
case 234:
-#line 2176 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2176 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
CurGV = 0;
;}
break;
case 235:
-#line 2180 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2180 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
if ((yyvsp[(6) - (7)].ConstVal) == 0)
GEN_ERROR("Global value initializer is not a constant");
@@ -5316,14 +5316,14 @@
break;
case 236:
-#line 2185 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2185 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
CurGV = 0;
;}
break;
case 237:
-#line 2189 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2189 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
if (!UpRefs.empty())
GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(6) - (7)].TypeVal))->getDescription());
@@ -5334,7 +5334,7 @@
break;
case 238:
-#line 2195 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2195 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
CurGV = 0;
CHECK_FOR_ERROR
@@ -5342,7 +5342,7 @@
break;
case 239:
-#line 2199 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2199 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
std::string Name;
if ((yyvsp[(1) - (5)].StrVal)) {
@@ -5386,21 +5386,21 @@
break;
case 240:
-#line 2239 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2239 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
CHECK_FOR_ERROR
;}
break;
case 241:
-#line 2242 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2242 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
CHECK_FOR_ERROR
;}
break;
case 242:
-#line 2248 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2248 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
const std::string &AsmSoFar = CurModule.CurrentModule->getModuleInlineAsm();
if (AsmSoFar.empty())
@@ -5413,7 +5413,7 @@
break;
case 243:
-#line 2258 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2258 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
CurModule.CurrentModule->setTargetTriple(*(yyvsp[(3) - (3)].StrVal));
delete (yyvsp[(3) - (3)].StrVal);
@@ -5421,7 +5421,7 @@
break;
case 244:
-#line 2262 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2262 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
CurModule.CurrentModule->setDataLayout(*(yyvsp[(3) - (3)].StrVal));
delete (yyvsp[(3) - (3)].StrVal);
@@ -5429,7 +5429,7 @@
break;
case 246:
-#line 2269 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2269 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
CurModule.CurrentModule->addLibrary(*(yyvsp[(3) - (3)].StrVal));
delete (yyvsp[(3) - (3)].StrVal);
@@ -5438,7 +5438,7 @@
break;
case 247:
-#line 2274 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2274 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
CurModule.CurrentModule->addLibrary(*(yyvsp[(1) - (1)].StrVal));
delete (yyvsp[(1) - (1)].StrVal);
@@ -5447,20 +5447,20 @@
break;
case 248:
-#line 2279 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2279 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
CHECK_FOR_ERROR
;}
break;
case 249:
-#line 2288 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2288 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
if (!UpRefs.empty())
GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(3) - (5)].TypeVal))->getDescription());
if (!(*(yyvsp[(3) - (5)].TypeVal))->isFirstClassType())
GEN_ERROR("Argument types must be first-class");
- ArgListEntry E; E.Attrs = (yyvsp[(4) - (5)].ParamAttrs); E.Ty = (yyvsp[(3) - (5)].TypeVal); E.Name = (yyvsp[(5) - (5)].StrVal);
+ ArgListEntry E; E.Attrs = (yyvsp[(4) - (5)].Attributes); E.Ty = (yyvsp[(3) - (5)].TypeVal); E.Name = (yyvsp[(5) - (5)].StrVal);
(yyval.ArgList) = (yyvsp[(1) - (5)].ArgList);
(yyvsp[(1) - (5)].ArgList)->push_back(E);
CHECK_FOR_ERROR
@@ -5468,13 +5468,13 @@
break;
case 250:
-#line 2298 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2298 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
if (!UpRefs.empty())
GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (3)].TypeVal))->getDescription());
if (!(*(yyvsp[(1) - (3)].TypeVal))->isFirstClassType())
GEN_ERROR("Argument types must be first-class");
- ArgListEntry E; E.Attrs = (yyvsp[(2) - (3)].ParamAttrs); E.Ty = (yyvsp[(1) - (3)].TypeVal); E.Name = (yyvsp[(3) - (3)].StrVal);
+ ArgListEntry E; E.Attrs = (yyvsp[(2) - (3)].Attributes); E.Ty = (yyvsp[(1) - (3)].TypeVal); E.Name = (yyvsp[(3) - (3)].StrVal);
(yyval.ArgList) = new ArgListType;
(yyval.ArgList)->push_back(E);
CHECK_FOR_ERROR
@@ -5482,7 +5482,7 @@
break;
case 251:
-#line 2309 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2309 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
(yyval.ArgList) = (yyvsp[(1) - (1)].ArgList);
CHECK_FOR_ERROR
@@ -5490,33 +5490,33 @@
break;
case 252:
-#line 2313 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2313 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
(yyval.ArgList) = (yyvsp[(1) - (3)].ArgList);
struct ArgListEntry E;
E.Ty = new PATypeHolder(Type::VoidTy);
E.Name = 0;
- E.Attrs = ParamAttr::None;
+ E.Attrs = Attribute::None;
(yyval.ArgList)->push_back(E);
CHECK_FOR_ERROR
;}
break;
case 253:
-#line 2322 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2322 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
(yyval.ArgList) = new ArgListType;
struct ArgListEntry E;
E.Ty = new PATypeHolder(Type::VoidTy);
E.Name = 0;
- E.Attrs = ParamAttr::None;
+ E.Attrs = Attribute::None;
(yyval.ArgList)->push_back(E);
CHECK_FOR_ERROR
;}
break;
case 254:
-#line 2331 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2331 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
(yyval.ArgList) = 0;
CHECK_FOR_ERROR
@@ -5524,7 +5524,7 @@
break;
case 255:
-#line 2337 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2337 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
std::string FunctionName(*(yyvsp[(3) - (11)].StrVal));
delete (yyvsp[(3) - (11)].StrVal); // Free strdup'd memory!
@@ -5538,9 +5538,9 @@
GEN_ERROR("Invalid result type for LLVM function");
std::vector<const Type*> ParamTypeList;
- SmallVector<FnAttributeWithIndex, 8> Attrs;
- if ((yyvsp[(7) - (11)].ParamAttrs) != ParamAttr::None)
- Attrs.push_back(FnAttributeWithIndex::get(0, (yyvsp[(7) - (11)].ParamAttrs)));
+ SmallVector<AttributeWithIndex, 8> Attrs;
+ if ((yyvsp[(7) - (11)].Attributes) != Attribute::None)
+ Attrs.push_back(AttributeWithIndex::get(0, (yyvsp[(7) - (11)].Attributes)));
if ((yyvsp[(5) - (11)].ArgList)) { // If there are arguments...
unsigned index = 1;
for (ArgListType::iterator I = (yyvsp[(5) - (11)].ArgList)->begin(); I != (yyvsp[(5) - (11)].ArgList)->end(); ++I, ++index) {
@@ -5548,17 +5548,17 @@
if (!CurFun.isDeclare && CurModule.TypeIsUnresolved(I->Ty))
GEN_ERROR("Reference to abstract argument: " + Ty->getDescription());
ParamTypeList.push_back(Ty);
- if (Ty != Type::VoidTy && I->Attrs != ParamAttr::None)
- Attrs.push_back(FnAttributeWithIndex::get(index, I->Attrs));
+ if (Ty != Type::VoidTy && I->Attrs != Attribute::None)
+ Attrs.push_back(AttributeWithIndex::get(index, I->Attrs));
}
}
bool isVarArg = ParamTypeList.size() && ParamTypeList.back() == Type::VoidTy;
if (isVarArg) ParamTypeList.pop_back();
- PAListPtr PAL;
+ AttrListPtr PAL;
if (!Attrs.empty())
- PAL = PAListPtr::get(Attrs.begin(), Attrs.end());
+ PAL = AttrListPtr::get(Attrs.begin(), Attrs.end());
FunctionType *FT = FunctionType::get(*(yyvsp[(2) - (11)].TypeVal), ParamTypeList, isVarArg);
const PointerType *PFT = PointerType::getUnqual(FT);
@@ -5577,7 +5577,7 @@
// Move the function to the end of the list, from whereever it was
// previously inserted.
Fn = cast<Function>(FWRef);
- assert(Fn->getParamAttrs().isEmpty() &&
+ assert(Fn->getAttributes().isEmpty() &&
"Forward reference has parameter attributes!");
CurModule.CurrentModule->getFunctionList().remove(Fn);
CurModule.CurrentModule->getFunctionList().push_back(Fn);
@@ -5587,7 +5587,7 @@
// The existing function doesn't have the same type. This is an overload
// error.
GEN_ERROR("Overload of function '" + FunctionName + "' not permitted.");
- } else if (Fn->getParamAttrs() != PAL) {
+ } else if (Fn->getAttributes() != PAL) {
// The existing function doesn't have the same parameter attributes.
// This is an overload error.
GEN_ERROR("Overload of function '" + FunctionName + "' not permitted.");
@@ -5617,7 +5617,7 @@
Fn->setVisibility(CurFun.Visibility);
}
Fn->setCallingConv((yyvsp[(1) - (11)].UIntVal));
- Fn->setParamAttrs(PAL);
+ Fn->setAttributes(PAL);
Fn->setAlignment((yyvsp[(9) - (11)].UIntVal));
if ((yyvsp[(8) - (11)].StrVal)) {
Fn->setSection(*(yyvsp[(8) - (11)].StrVal));
@@ -5627,8 +5627,8 @@
Fn->setGC((yyvsp[(10) - (11)].StrVal)->c_str());
delete (yyvsp[(10) - (11)].StrVal);
}
- if ((yyvsp[(11) - (11)].ParamAttrs)) {
- Fn->setNotes((yyvsp[(11) - (11)].ParamAttrs));
+ if ((yyvsp[(11) - (11)].Attributes)) {
+ Fn->setNotes((yyvsp[(11) - (11)].Attributes));
}
// Add all of the arguments we parsed to the function...
@@ -5658,7 +5658,7 @@
break;
case 258:
-#line 2470 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2470 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
(yyval.FunctionVal) = CurFun.CurrentFunction;
@@ -5670,7 +5670,7 @@
break;
case 261:
-#line 2481 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2481 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
(yyval.FunctionVal) = (yyvsp[(1) - (2)].FunctionVal);
CHECK_FOR_ERROR
@@ -5678,7 +5678,7 @@
break;
case 262:
-#line 2486 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2486 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
CurFun.CurrentFunction->setLinkage((yyvsp[(1) - (3)].Linkage));
CurFun.CurrentFunction->setVisibility((yyvsp[(2) - (3)].Visibility));
@@ -5689,7 +5689,7 @@
break;
case 263:
-#line 2498 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2498 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
(yyval.BoolVal) = false;
CHECK_FOR_ERROR
@@ -5697,7 +5697,7 @@
break;
case 264:
-#line 2502 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2502 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
(yyval.BoolVal) = true;
CHECK_FOR_ERROR
@@ -5705,7 +5705,7 @@
break;
case 265:
-#line 2507 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2507 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ // A reference to a direct constant
(yyval.ValIDVal) = ValID::create((yyvsp[(1) - (1)].SInt64Val));
CHECK_FOR_ERROR
@@ -5713,7 +5713,7 @@
break;
case 266:
-#line 2511 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2511 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
(yyval.ValIDVal) = ValID::create((yyvsp[(1) - (1)].UInt64Val));
CHECK_FOR_ERROR
@@ -5721,7 +5721,7 @@
break;
case 267:
-#line 2515 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2515 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ // arbitrary precision integer constants
(yyval.ValIDVal) = ValID::create(*(yyvsp[(1) - (1)].APIntVal), true);
delete (yyvsp[(1) - (1)].APIntVal);
@@ -5730,7 +5730,7 @@
break;
case 268:
-#line 2520 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2520 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ // arbitrary precision integer constants
(yyval.ValIDVal) = ValID::create(*(yyvsp[(1) - (1)].APIntVal), false);
delete (yyvsp[(1) - (1)].APIntVal);
@@ -5739,7 +5739,7 @@
break;
case 269:
-#line 2525 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2525 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ // Perhaps it's an FP constant?
(yyval.ValIDVal) = ValID::create((yyvsp[(1) - (1)].FPVal));
CHECK_FOR_ERROR
@@ -5747,7 +5747,7 @@
break;
case 270:
-#line 2529 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2529 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
(yyval.ValIDVal) = ValID::create(ConstantInt::getTrue());
CHECK_FOR_ERROR
@@ -5755,7 +5755,7 @@
break;
case 271:
-#line 2533 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2533 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
(yyval.ValIDVal) = ValID::create(ConstantInt::getFalse());
CHECK_FOR_ERROR
@@ -5763,7 +5763,7 @@
break;
case 272:
-#line 2537 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2537 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
(yyval.ValIDVal) = ValID::createNull();
CHECK_FOR_ERROR
@@ -5771,7 +5771,7 @@
break;
case 273:
-#line 2541 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2541 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
(yyval.ValIDVal) = ValID::createUndef();
CHECK_FOR_ERROR
@@ -5779,7 +5779,7 @@
break;
case 274:
-#line 2545 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2545 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ // A vector zero constant.
(yyval.ValIDVal) = ValID::createZeroInit();
CHECK_FOR_ERROR
@@ -5787,7 +5787,7 @@
break;
case 275:
-#line 2549 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2549 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ // Nonempty unsized packed vector
const Type *ETy = (*(yyvsp[(2) - (3)].ConstVector))[0]->getType();
unsigned NumElements = (yyvsp[(2) - (3)].ConstVector)->size();
@@ -5813,7 +5813,7 @@
break;
case 276:
-#line 2571 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2571 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ // Nonempty unsized arr
const Type *ETy = (*(yyvsp[(2) - (3)].ConstVector))[0]->getType();
uint64_t NumElements = (yyvsp[(2) - (3)].ConstVector)->size();
@@ -5839,7 +5839,7 @@
break;
case 277:
-#line 2593 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2593 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
// Use undef instead of an array because it's inconvenient to determine
// the element type at this point, there being no elements to examine.
@@ -5849,7 +5849,7 @@
break;
case 278:
-#line 2599 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2599 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
uint64_t NumElements = (yyvsp[(2) - (2)].StrVal)->length();
const Type *ETy = Type::Int8Ty;
@@ -5866,7 +5866,7 @@
break;
case 279:
-#line 2612 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2612 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
std::vector<const Type*> Elements((yyvsp[(2) - (3)].ConstVector)->size());
for (unsigned i = 0, e = (yyvsp[(2) - (3)].ConstVector)->size(); i != e; ++i)
@@ -5882,7 +5882,7 @@
break;
case 280:
-#line 2624 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2624 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
const StructType *STy = StructType::get(std::vector<const Type*>());
(yyval.ValIDVal) = ValID::create(ConstantStruct::get(STy, std::vector<Constant*>()));
@@ -5891,7 +5891,7 @@
break;
case 281:
-#line 2629 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2629 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
std::vector<const Type*> Elements((yyvsp[(3) - (5)].ConstVector)->size());
for (unsigned i = 0, e = (yyvsp[(3) - (5)].ConstVector)->size(); i != e; ++i)
@@ -5907,7 +5907,7 @@
break;
case 282:
-#line 2641 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2641 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
const StructType *STy = StructType::get(std::vector<const Type*>(),
/*isPacked=*/true);
@@ -5917,7 +5917,7 @@
break;
case 283:
-#line 2647 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2647 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
(yyval.ValIDVal) = ValID::create((yyvsp[(1) - (1)].ConstVal));
CHECK_FOR_ERROR
@@ -5925,7 +5925,7 @@
break;
case 284:
-#line 2651 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2651 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
(yyval.ValIDVal) = ValID::createInlineAsm(*(yyvsp[(3) - (5)].StrVal), *(yyvsp[(5) - (5)].StrVal), (yyvsp[(2) - (5)].BoolVal));
delete (yyvsp[(3) - (5)].StrVal);
@@ -5935,7 +5935,7 @@
break;
case 285:
-#line 2661 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2661 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ // Is it an integer reference...?
(yyval.ValIDVal) = ValID::createLocalID((yyvsp[(1) - (1)].UIntVal));
CHECK_FOR_ERROR
@@ -5943,7 +5943,7 @@
break;
case 286:
-#line 2665 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2665 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
(yyval.ValIDVal) = ValID::createGlobalID((yyvsp[(1) - (1)].UIntVal));
CHECK_FOR_ERROR
@@ -5951,7 +5951,7 @@
break;
case 287:
-#line 2669 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2669 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ // Is it a named reference...?
(yyval.ValIDVal) = ValID::createLocalName(*(yyvsp[(1) - (1)].StrVal));
delete (yyvsp[(1) - (1)].StrVal);
@@ -5960,7 +5960,7 @@
break;
case 288:
-#line 2674 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2674 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ // Is it a named reference...?
(yyval.ValIDVal) = ValID::createGlobalName(*(yyvsp[(1) - (1)].StrVal));
delete (yyvsp[(1) - (1)].StrVal);
@@ -5969,7 +5969,7 @@
break;
case 291:
-#line 2687 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2687 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
if (!UpRefs.empty())
GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (2)].TypeVal))->getDescription());
@@ -5980,7 +5980,7 @@
break;
case 292:
-#line 2696 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2696 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
(yyval.ValueList) = new std::vector<Value *>();
(yyval.ValueList)->push_back((yyvsp[(1) - (1)].ValueVal));
@@ -5989,7 +5989,7 @@
break;
case 293:
-#line 2701 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2701 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
((yyval.ValueList)=(yyvsp[(1) - (3)].ValueList))->push_back((yyvsp[(3) - (3)].ValueVal));
CHECK_FOR_ERROR
@@ -5997,7 +5997,7 @@
break;
case 294:
-#line 2706 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2706 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
(yyval.FunctionVal) = (yyvsp[(1) - (2)].FunctionVal);
CHECK_FOR_ERROR
@@ -6005,7 +6005,7 @@
break;
case 295:
-#line 2710 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2710 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ // Do not allow functions with 0 basic blocks
(yyval.FunctionVal) = (yyvsp[(1) - (2)].FunctionVal);
CHECK_FOR_ERROR
@@ -6013,7 +6013,7 @@
break;
case 296:
-#line 2719 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2719 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
setValueName((yyvsp[(3) - (3)].TermInstVal), (yyvsp[(2) - (3)].StrVal));
CHECK_FOR_ERROR
@@ -6025,7 +6025,7 @@
break;
case 297:
-#line 2728 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2728 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
CHECK_FOR_ERROR
int ValNum = InsertValue((yyvsp[(3) - (3)].TermInstVal));
@@ -6040,7 +6040,7 @@
break;
case 298:
-#line 2741 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2741 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
if (CastInst *CI1 = dyn_cast<CastInst>((yyvsp[(2) - (2)].InstVal)))
if (CastInst *CI2 = dyn_cast<CastInst>(CI1->getOperand(0)))
@@ -6053,7 +6053,7 @@
break;
case 299:
-#line 2750 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2750 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ // Empty space between instruction lists
(yyval.BasicBlockVal) = defineBBVal(ValID::createLocalID(CurFun.NextValNum));
CHECK_FOR_ERROR
@@ -6061,7 +6061,7 @@
break;
case 300:
-#line 2754 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2754 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ // Labelled (named) basic block
(yyval.BasicBlockVal) = defineBBVal(ValID::createLocalName(*(yyvsp[(1) - (1)].StrVal)));
delete (yyvsp[(1) - (1)].StrVal);
@@ -6071,7 +6071,7 @@
break;
case 301:
-#line 2762 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2762 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ // Return with a result...
ValueList &VL = *(yyvsp[(2) - (2)].ValueList);
assert(!VL.empty() && "Invalid ret operands!");
@@ -6095,7 +6095,7 @@
break;
case 302:
-#line 2782 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2782 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ // Return with no result...
(yyval.TermInstVal) = ReturnInst::Create();
CHECK_FOR_ERROR
@@ -6103,7 +6103,7 @@
break;
case 303:
-#line 2786 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2786 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ // Unconditional Branch...
BasicBlock* tmpBB = getBBVal((yyvsp[(3) - (3)].ValIDVal));
CHECK_FOR_ERROR
@@ -6112,7 +6112,7 @@
break;
case 304:
-#line 2791 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2791 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
if (cast<IntegerType>((yyvsp[(2) - (9)].PrimType))->getBitWidth() != 1)
GEN_ERROR("Branch condition must have type i1");
@@ -6127,7 +6127,7 @@
break;
case 305:
-#line 2802 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2802 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
Value* tmpVal = getVal((yyvsp[(2) - (9)].PrimType), (yyvsp[(3) - (9)].ValIDVal));
CHECK_FOR_ERROR
@@ -6150,7 +6150,7 @@
break;
case 306:
-#line 2821 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2821 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
Value* tmpVal = getVal((yyvsp[(2) - (8)].PrimType), (yyvsp[(3) - (8)].ValIDVal));
CHECK_FOR_ERROR
@@ -6163,7 +6163,7 @@
break;
case 307:
-#line 2831 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2831 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
// Handle the short syntax
@@ -6197,9 +6197,9 @@
BasicBlock *Except = getBBVal((yyvsp[(14) - (14)].ValIDVal));
CHECK_FOR_ERROR
- SmallVector<FnAttributeWithIndex, 8> Attrs;
- if ((yyvsp[(8) - (14)].ParamAttrs) != ParamAttr::None)
- Attrs.push_back(FnAttributeWithIndex::get(0, (yyvsp[(8) - (14)].ParamAttrs)));
+ SmallVector<AttributeWithIndex, 8> Attrs;
+ if ((yyvsp[(8) - (14)].Attributes) != Attribute::None)
+ Attrs.push_back(AttributeWithIndex::get(0, (yyvsp[(8) - (14)].Attributes)));
// Check the arguments
ValueList Args;
@@ -6221,30 +6221,30 @@
GEN_ERROR("Parameter " + ArgI->Val->getName()+ " is not of type '" +
(*I)->getDescription() + "'");
Args.push_back(ArgI->Val);
- if (ArgI->Attrs != ParamAttr::None)
- Attrs.push_back(FnAttributeWithIndex::get(index, ArgI->Attrs));
+ if (ArgI->Attrs != Attribute::None)
+ Attrs.push_back(AttributeWithIndex::get(index, ArgI->Attrs));
}
if (Ty->isVarArg()) {
if (I == E)
for (; ArgI != ArgE; ++ArgI, ++index) {
Args.push_back(ArgI->Val); // push the remaining varargs
- if (ArgI->Attrs != ParamAttr::None)
- Attrs.push_back(FnAttributeWithIndex::get(index, ArgI->Attrs));
+ if (ArgI->Attrs != Attribute::None)
+ Attrs.push_back(AttributeWithIndex::get(index, ArgI->Attrs));
}
} else if (I != E || ArgI != ArgE)
GEN_ERROR("Invalid number of parameters detected");
}
- PAListPtr PAL;
+ AttrListPtr PAL;
if (!Attrs.empty())
- PAL = PAListPtr::get(Attrs.begin(), Attrs.end());
+ PAL = AttrListPtr::get(Attrs.begin(), Attrs.end());
// Create the InvokeInst
InvokeInst *II = InvokeInst::Create(V, Normal, Except,
Args.begin(), Args.end());
II->setCallingConv((yyvsp[(2) - (14)].UIntVal));
- II->setParamAttrs(PAL);
+ II->setAttributes(PAL);
(yyval.TermInstVal) = II;
delete (yyvsp[(6) - (14)].ParamList);
CHECK_FOR_ERROR
@@ -6252,7 +6252,7 @@
break;
case 308:
-#line 2916 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2916 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
(yyval.TermInstVal) = new UnwindInst();
CHECK_FOR_ERROR
@@ -6260,7 +6260,7 @@
break;
case 309:
-#line 2920 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2920 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
(yyval.TermInstVal) = new UnreachableInst();
CHECK_FOR_ERROR
@@ -6268,7 +6268,7 @@
break;
case 310:
-#line 2927 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2927 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
(yyval.JumpTable) = (yyvsp[(1) - (6)].JumpTable);
Constant *V = cast<Constant>(getExistingVal((yyvsp[(2) - (6)].PrimType), (yyvsp[(3) - (6)].ValIDVal)));
@@ -6283,7 +6283,7 @@
break;
case 311:
-#line 2938 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2938 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
(yyval.JumpTable) = new std::vector<std::pair<Constant*, BasicBlock*> >();
Constant *V = cast<Constant>(getExistingVal((yyvsp[(1) - (5)].PrimType), (yyvsp[(2) - (5)].ValIDVal)));
@@ -6299,7 +6299,7 @@
break;
case 312:
-#line 2951 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2951 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
// Is this definition named?? if so, assign the name...
setValueName((yyvsp[(2) - (2)].InstVal), (yyvsp[(1) - (2)].StrVal));
@@ -6311,7 +6311,7 @@
break;
case 313:
-#line 2960 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2960 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
CHECK_FOR_ERROR
int ValNum = InsertValue((yyvsp[(2) - (2)].InstVal));
@@ -6326,7 +6326,7 @@
break;
case 314:
-#line 2973 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2973 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ // Used for PHI nodes
if (!UpRefs.empty())
GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (6)].TypeVal))->getDescription());
@@ -6341,7 +6341,7 @@
break;
case 315:
-#line 2984 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2984 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
(yyval.PHIList) = (yyvsp[(1) - (7)].PHIList);
Value* tmpVal = getVal((yyvsp[(1) - (7)].PHIList)->front().first->getType(), (yyvsp[(4) - (7)].ValIDVal));
@@ -6353,14 +6353,14 @@
break;
case 316:
-#line 2994 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2994 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
- // FIXME: Remove trailing OptParamAttrs in LLVM 3.0, it was a mistake in 2.0
+ // FIXME: Remove trailing OptAttributes in LLVM 3.0, it was a mistake in 2.0
if (!UpRefs.empty())
GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (4)].TypeVal))->getDescription());
// Used for call and invoke instructions
(yyval.ParamList) = new ParamList();
- ParamListEntry E; E.Attrs = (yyvsp[(2) - (4)].ParamAttrs) | (yyvsp[(4) - (4)].ParamAttrs); E.Val = getVal((yyvsp[(1) - (4)].TypeVal)->get(), (yyvsp[(3) - (4)].ValIDVal));
+ ParamListEntry E; E.Attrs = (yyvsp[(2) - (4)].Attributes) | (yyvsp[(4) - (4)].Attributes); E.Val = getVal((yyvsp[(1) - (4)].TypeVal)->get(), (yyvsp[(3) - (4)].ValIDVal));
(yyval.ParamList)->push_back(E);
delete (yyvsp[(1) - (4)].TypeVal);
CHECK_FOR_ERROR
@@ -6368,25 +6368,25 @@
break;
case 317:
-#line 3005 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 3005 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
- // FIXME: Remove trailing OptParamAttrs in LLVM 3.0, it was a mistake in 2.0
+ // FIXME: Remove trailing OptAttributes in LLVM 3.0, it was a mistake in 2.0
// Labels are only valid in ASMs
(yyval.ParamList) = new ParamList();
- ParamListEntry E; E.Attrs = (yyvsp[(2) - (4)].ParamAttrs) | (yyvsp[(4) - (4)].ParamAttrs); E.Val = getBBVal((yyvsp[(3) - (4)].ValIDVal));
+ ParamListEntry E; E.Attrs = (yyvsp[(2) - (4)].Attributes) | (yyvsp[(4) - (4)].Attributes); E.Val = getBBVal((yyvsp[(3) - (4)].ValIDVal));
(yyval.ParamList)->push_back(E);
CHECK_FOR_ERROR
;}
break;
case 318:
-#line 3013 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 3013 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
- // FIXME: Remove trailing OptParamAttrs in LLVM 3.0, it was a mistake in 2.0
+ // FIXME: Remove trailing OptAttributes in LLVM 3.0, it was a mistake in 2.0
if (!UpRefs.empty())
GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(3) - (6)].TypeVal))->getDescription());
(yyval.ParamList) = (yyvsp[(1) - (6)].ParamList);
- ParamListEntry E; E.Attrs = (yyvsp[(4) - (6)].ParamAttrs) | (yyvsp[(6) - (6)].ParamAttrs); E.Val = getVal((yyvsp[(3) - (6)].TypeVal)->get(), (yyvsp[(5) - (6)].ValIDVal));
+ ParamListEntry E; E.Attrs = (yyvsp[(4) - (6)].Attributes) | (yyvsp[(6) - (6)].Attributes); E.Val = getVal((yyvsp[(3) - (6)].TypeVal)->get(), (yyvsp[(5) - (6)].ValIDVal));
(yyval.ParamList)->push_back(E);
delete (yyvsp[(3) - (6)].TypeVal);
CHECK_FOR_ERROR
@@ -6394,28 +6394,28 @@
break;
case 319:
-#line 3023 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 3023 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
- // FIXME: Remove trailing OptParamAttrs in LLVM 3.0, it was a mistake in 2.0
+ // FIXME: Remove trailing OptAttributes in LLVM 3.0, it was a mistake in 2.0
(yyval.ParamList) = (yyvsp[(1) - (6)].ParamList);
- ParamListEntry E; E.Attrs = (yyvsp[(4) - (6)].ParamAttrs) | (yyvsp[(6) - (6)].ParamAttrs); E.Val = getBBVal((yyvsp[(5) - (6)].ValIDVal));
+ ParamListEntry E; E.Attrs = (yyvsp[(4) - (6)].Attributes) | (yyvsp[(6) - (6)].Attributes); E.Val = getBBVal((yyvsp[(5) - (6)].ValIDVal));
(yyval.ParamList)->push_back(E);
CHECK_FOR_ERROR
;}
break;
case 320:
-#line 3030 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 3030 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.ParamList) = new ParamList(); ;}
break;
case 321:
-#line 3033 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 3033 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.ValueList) = new std::vector<Value*>(); ;}
break;
case 322:
-#line 3034 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 3034 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
(yyval.ValueList) = (yyvsp[(1) - (3)].ValueList);
(yyval.ValueList)->push_back((yyvsp[(3) - (3)].ValueVal));
@@ -6424,7 +6424,7 @@
break;
case 323:
-#line 3042 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 3042 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
(yyval.ConstantList) = new std::vector<unsigned>();
if ((unsigned)(yyvsp[(2) - (2)].UInt64Val) != (yyvsp[(2) - (2)].UInt64Val))
@@ -6434,7 +6434,7 @@
break;
case 324:
-#line 3048 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 3048 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
(yyval.ConstantList) = (yyvsp[(1) - (3)].ConstantList);
if ((unsigned)(yyvsp[(3) - (3)].UInt64Val) != (yyvsp[(3) - (3)].UInt64Val))
@@ -6445,7 +6445,7 @@
break;
case 325:
-#line 3057 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 3057 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
(yyval.BoolVal) = true;
CHECK_FOR_ERROR
@@ -6453,7 +6453,7 @@
break;
case 326:
-#line 3061 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 3061 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
(yyval.BoolVal) = false;
CHECK_FOR_ERROR
@@ -6461,7 +6461,7 @@
break;
case 327:
-#line 3066 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 3066 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
if (!UpRefs.empty())
GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(2) - (5)].TypeVal))->getDescription());
@@ -6481,7 +6481,7 @@
break;
case 328:
-#line 3082 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 3082 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
if (!UpRefs.empty())
GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(2) - (5)].TypeVal))->getDescription());
@@ -6502,7 +6502,7 @@
break;
case 329:
-#line 3099 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 3099 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
if (!UpRefs.empty())
GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(3) - (6)].TypeVal))->getDescription());
@@ -6518,7 +6518,7 @@
break;
case 330:
-#line 3111 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 3111 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
if (!UpRefs.empty())
GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(3) - (6)].TypeVal))->getDescription());
@@ -6534,7 +6534,7 @@
break;
case 331:
-#line 3123 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 3123 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
if (!UpRefs.empty())
GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(3) - (6)].TypeVal))->getDescription());
@@ -6552,7 +6552,7 @@
break;
case 332:
-#line 3137 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 3137 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
if (!UpRefs.empty())
GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(3) - (6)].TypeVal))->getDescription());
@@ -6570,7 +6570,7 @@
break;
case 333:
-#line 3151 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 3151 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
if (!UpRefs.empty())
GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(4) - (4)].TypeVal))->getDescription());
@@ -6586,7 +6586,7 @@
break;
case 334:
-#line 3163 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 3163 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
if (isa<VectorType>((yyvsp[(2) - (6)].ValueVal)->getType())) {
// vector select
@@ -6611,7 +6611,7 @@
break;
case 335:
-#line 3184 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 3184 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
if (!UpRefs.empty())
GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(4) - (4)].TypeVal))->getDescription());
@@ -6622,7 +6622,7 @@
break;
case 336:
-#line 3191 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 3191 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
if (!ExtractElementInst::isValidOperands((yyvsp[(2) - (4)].ValueVal), (yyvsp[(4) - (4)].ValueVal)))
GEN_ERROR("Invalid extractelement operands");
@@ -6632,7 +6632,7 @@
break;
case 337:
-#line 3197 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 3197 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
if (!InsertElementInst::isValidOperands((yyvsp[(2) - (6)].ValueVal), (yyvsp[(4) - (6)].ValueVal), (yyvsp[(6) - (6)].ValueVal)))
GEN_ERROR("Invalid insertelement operands");
@@ -6642,7 +6642,7 @@
break;
case 338:
-#line 3203 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 3203 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
if (!ShuffleVectorInst::isValidOperands((yyvsp[(2) - (6)].ValueVal), (yyvsp[(4) - (6)].ValueVal), (yyvsp[(6) - (6)].ValueVal)))
GEN_ERROR("Invalid shufflevector operands");
@@ -6652,7 +6652,7 @@
break;
case 339:
-#line 3209 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 3209 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
const Type *Ty = (yyvsp[(2) - (2)].PHIList)->front().first->getType();
if (!Ty->isFirstClassType())
@@ -6671,7 +6671,7 @@
break;
case 340:
-#line 3225 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 3225 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
// Handle the short syntax
@@ -6708,10 +6708,10 @@
theF->getName() + "'");
}
- // Set up the ParamAttrs for the function
- SmallVector<FnAttributeWithIndex, 8> Attrs;
- if ((yyvsp[(8) - (8)].ParamAttrs) != ParamAttr::None)
- Attrs.push_back(FnAttributeWithIndex::get(0, (yyvsp[(8) - (8)].ParamAttrs)));
+ // Set up the Attributes for the function
+ SmallVector<AttributeWithIndex, 8> Attrs;
+ if ((yyvsp[(8) - (8)].Attributes) != Attribute::None)
+ Attrs.push_back(AttributeWithIndex::get(0, (yyvsp[(8) - (8)].Attributes)));
// Check the arguments
ValueList Args;
if ((yyvsp[(6) - (8)].ParamList)->empty()) { // Has no arguments?
@@ -6732,30 +6732,30 @@
GEN_ERROR("Parameter " + ArgI->Val->getName()+ " is not of type '" +
(*I)->getDescription() + "'");
Args.push_back(ArgI->Val);
- if (ArgI->Attrs != ParamAttr::None)
- Attrs.push_back(FnAttributeWithIndex::get(index, ArgI->Attrs));
+ if (ArgI->Attrs != Attribute::None)
+ Attrs.push_back(AttributeWithIndex::get(index, ArgI->Attrs));
}
if (Ty->isVarArg()) {
if (I == E)
for (; ArgI != ArgE; ++ArgI, ++index) {
Args.push_back(ArgI->Val); // push the remaining varargs
- if (ArgI->Attrs != ParamAttr::None)
- Attrs.push_back(FnAttributeWithIndex::get(index, ArgI->Attrs));
+ if (ArgI->Attrs != Attribute::None)
+ Attrs.push_back(AttributeWithIndex::get(index, ArgI->Attrs));
}
} else if (I != E || ArgI != ArgE)
GEN_ERROR("Invalid number of parameters detected");
}
- // Finish off the ParamAttrs and check them
- PAListPtr PAL;
+ // Finish off the Attributes and check them
+ AttrListPtr PAL;
if (!Attrs.empty())
- PAL = PAListPtr::get(Attrs.begin(), Attrs.end());
+ PAL = AttrListPtr::get(Attrs.begin(), Attrs.end());
// Create the call node
CallInst *CI = CallInst::Create(V, Args.begin(), Args.end());
CI->setTailCall((yyvsp[(1) - (8)].BoolVal));
CI->setCallingConv((yyvsp[(2) - (8)].UIntVal));
- CI->setParamAttrs(PAL);
+ CI->setAttributes(PAL);
(yyval.InstVal) = CI;
delete (yyvsp[(6) - (8)].ParamList);
delete (yyvsp[(3) - (8)].TypeVal);
@@ -6764,7 +6764,7 @@
break;
case 341:
-#line 3314 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 3314 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
(yyval.InstVal) = (yyvsp[(1) - (1)].InstVal);
CHECK_FOR_ERROR
@@ -6772,7 +6772,7 @@
break;
case 342:
-#line 3319 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 3319 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
(yyval.BoolVal) = true;
CHECK_FOR_ERROR
@@ -6780,7 +6780,7 @@
break;
case 343:
-#line 3323 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 3323 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
(yyval.BoolVal) = false;
CHECK_FOR_ERROR
@@ -6788,7 +6788,7 @@
break;
case 344:
-#line 3330 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 3330 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
if (!UpRefs.empty())
GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(2) - (3)].TypeVal))->getDescription());
@@ -6799,7 +6799,7 @@
break;
case 345:
-#line 3337 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 3337 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
if (!UpRefs.empty())
GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(2) - (6)].TypeVal))->getDescription());
@@ -6813,7 +6813,7 @@
break;
case 346:
-#line 3347 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 3347 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
if (!UpRefs.empty())
GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(2) - (3)].TypeVal))->getDescription());
@@ -6824,7 +6824,7 @@
break;
case 347:
-#line 3354 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 3354 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
if (!UpRefs.empty())
GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(2) - (6)].TypeVal))->getDescription());
@@ -6838,7 +6838,7 @@
break;
case 348:
-#line 3364 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 3364 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
if (!isa<PointerType>((yyvsp[(2) - (2)].ValueVal)->getType()))
GEN_ERROR("Trying to free nonpointer type " +
@@ -6849,7 +6849,7 @@
break;
case 349:
-#line 3372 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 3372 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
if (!UpRefs.empty())
GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(3) - (5)].TypeVal))->getDescription());
@@ -6867,7 +6867,7 @@
break;
case 350:
-#line 3386 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 3386 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
if (!UpRefs.empty())
GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(5) - (7)].TypeVal))->getDescription());
@@ -6888,7 +6888,7 @@
break;
case 351:
-#line 3403 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 3403 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
if (!UpRefs.empty())
GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(2) - (5)].TypeVal))->getDescription());
@@ -6906,7 +6906,7 @@
break;
case 352:
-#line 3417 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 3417 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
if (!UpRefs.empty())
GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(2) - (4)].TypeVal))->getDescription());
@@ -6925,7 +6925,7 @@
break;
case 353:
-#line 3432 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 3432 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
if (!UpRefs.empty())
GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(2) - (4)].TypeVal))->getDescription());
@@ -6944,7 +6944,7 @@
break;
case 354:
-#line 3447 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 3447 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
if (!UpRefs.empty())
GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(2) - (7)].TypeVal))->getDescription());
@@ -7180,7 +7180,7 @@
}
-#line 3466 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 3466 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
// common code from the two 'RunVMAsmParser' functions
Modified: llvm/trunk/lib/AsmParser/llvmAsmParser.h.cvs
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/AsmParser/llvmAsmParser.h.cvs?rev=56622&r1=56621&r2=56622&view=diff
==============================================================================
--- llvm/trunk/lib/AsmParser/llvmAsmParser.h.cvs (original)
+++ llvm/trunk/lib/AsmParser/llvmAsmParser.h.cvs Thu Sep 25 16:00:45 2008
@@ -366,7 +366,7 @@
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
typedef union YYSTYPE
-#line 970 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 970 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
{
llvm::Module *ModuleVal;
llvm::Function *FunctionVal;
@@ -394,7 +394,7 @@
llvm::GlobalValue::LinkageTypes Linkage;
llvm::GlobalValue::VisibilityTypes Visibility;
- llvm::Attributes ParamAttrs;
+ llvm::Attributes Attributes;
llvm::APInt *APIntVal;
int64_t SInt64Val;
uint64_t UInt64Val;
Modified: llvm/trunk/lib/AsmParser/llvmAsmParser.y
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/AsmParser/llvmAsmParser.y?rev=56622&r1=56621&r2=56622&view=diff
==============================================================================
--- llvm/trunk/lib/AsmParser/llvmAsmParser.y (original)
+++ llvm/trunk/lib/AsmParser/llvmAsmParser.y Thu Sep 25 16:00:45 2008
@@ -994,7 +994,7 @@
llvm::GlobalValue::LinkageTypes Linkage;
llvm::GlobalValue::VisibilityTypes Visibility;
- llvm::Attributes ParamAttrs;
+ llvm::Attributes Attributes;
llvm::APInt *APIntVal;
int64_t SInt64Val;
uint64_t UInt64Val;
@@ -1088,10 +1088,10 @@
%token X86_SSECALLCC_TOK
%token DATALAYOUT
%type <UIntVal> OptCallingConv LocalNumber
-%type <ParamAttrs> OptParamAttrs ParamAttr
-%type <ParamAttrs> OptFuncAttrs FuncAttr
-%type <ParamAttrs> OptFuncNotes FuncNote
-%type <ParamAttrs> FuncNoteList
+%type <Attributes> OptAttributes Attribute
+%type <Attributes> OptFuncAttrs FuncAttr
+%type <Attributes> OptFuncNotes FuncNote
+%type <Attributes> FuncNoteList
// Basic Block Terminating Operators
%token <TermOpVal> RET BR SWITCH INVOKE UNWIND UNREACHABLE
@@ -1260,35 +1260,35 @@
CHECK_FOR_ERROR
};
-ParamAttr : ZEROEXT { $$ = ParamAttr::ZExt; }
- | ZEXT { $$ = ParamAttr::ZExt; }
- | SIGNEXT { $$ = ParamAttr::SExt; }
- | SEXT { $$ = ParamAttr::SExt; }
- | INREG { $$ = ParamAttr::InReg; }
- | SRET { $$ = ParamAttr::StructRet; }
- | NOALIAS { $$ = ParamAttr::NoAlias; }
- | BYVAL { $$ = ParamAttr::ByVal; }
- | NEST { $$ = ParamAttr::Nest; }
+Attribute : ZEROEXT { $$ = Attribute::ZExt; }
+ | ZEXT { $$ = Attribute::ZExt; }
+ | SIGNEXT { $$ = Attribute::SExt; }
+ | SEXT { $$ = Attribute::SExt; }
+ | INREG { $$ = Attribute::InReg; }
+ | SRET { $$ = Attribute::StructRet; }
+ | NOALIAS { $$ = Attribute::NoAlias; }
+ | BYVAL { $$ = Attribute::ByVal; }
+ | NEST { $$ = Attribute::Nest; }
| ALIGN EUINT64VAL { $$ =
- ParamAttr::constructAlignmentFromInt($2); }
+ Attribute::constructAlignmentFromInt($2); }
;
-OptParamAttrs : /* empty */ { $$ = ParamAttr::None; }
- | OptParamAttrs ParamAttr {
+OptAttributes : /* empty */ { $$ = Attribute::None; }
+ | OptAttributes Attribute {
$$ = $1 | $2;
}
;
-FuncAttr : NORETURN { $$ = ParamAttr::NoReturn; }
- | NOUNWIND { $$ = ParamAttr::NoUnwind; }
- | INREG { $$ = ParamAttr::InReg; }
- | ZEROEXT { $$ = ParamAttr::ZExt; }
- | SIGNEXT { $$ = ParamAttr::SExt; }
- | READNONE { $$ = ParamAttr::ReadNone; }
- | READONLY { $$ = ParamAttr::ReadOnly; }
+FuncAttr : NORETURN { $$ = Attribute::NoReturn; }
+ | NOUNWIND { $$ = Attribute::NoUnwind; }
+ | INREG { $$ = Attribute::InReg; }
+ | ZEROEXT { $$ = Attribute::ZExt; }
+ | SIGNEXT { $$ = Attribute::SExt; }
+ | READNONE { $$ = Attribute::ReadNone; }
+ | READONLY { $$ = Attribute::ReadOnly; }
;
-OptFuncAttrs : /* empty */ { $$ = ParamAttr::None; }
+OptFuncAttrs : /* empty */ { $$ = Attribute::None; }
| OptFuncAttrs FuncAttr {
$$ = $1 | $2;
}
@@ -1297,23 +1297,23 @@
FuncNoteList : FuncNote { $$ = $1; }
| FuncNoteList ',' FuncNote {
unsigned tmp = $1 | $3;
- if ($3 == FnAttr::NoInline
- && ($1 & FnAttr::AlwaysInline))
+ if ($3 == Attribute::NoInline
+ && ($1 & Attribute::AlwaysInline))
GEN_ERROR("Function Notes may include only one inline notes!")
- if ($3 == FnAttr::AlwaysInline
- && ($1 & FnAttr::NoInline))
+ if ($3 == Attribute::AlwaysInline
+ && ($1 & Attribute::NoInline))
GEN_ERROR("Function Notes may include only one inline notes!")
$$ = tmp;
CHECK_FOR_ERROR
}
;
-FuncNote : INLINE '=' NEVER { $$ = FnAttr::NoInline; }
- | INLINE '=' ALWAYS { $$ = FnAttr::AlwaysInline; }
- | OPTIMIZEFORSIZE { $$ = FnAttr::OptimizeForSize; }
+FuncNote : INLINE '=' NEVER { $$ = Attribute::NoInline; }
+ | INLINE '=' ALWAYS { $$ = Attribute::AlwaysInline; }
+ | OPTIMIZEFORSIZE { $$ = Attribute::OptimizeForSize; }
;
-OptFuncNotes : /* empty */ { $$ = FnAttr::None; }
+OptFuncNotes : /* empty */ { $$ = Attribute::None; }
| FNNOTE '(' FuncNoteList ')' {
$$ = $3;
}
@@ -1509,11 +1509,11 @@
;
ArgType
- : Types OptParamAttrs {
+ : Types OptAttributes {
// Allow but ignore attributes on function types; this permits auto-upgrade.
// FIXME: remove in LLVM 3.0.
$$.Ty = $1;
- $$.Attrs = ParamAttr::None;
+ $$.Attrs = Attribute::None;
}
;
@@ -1545,14 +1545,14 @@
: ArgTypeList
| ArgTypeList ',' DOTDOTDOT {
$$=$1;
- TypeWithAttrs TWA; TWA.Attrs = ParamAttr::None;
+ TypeWithAttrs TWA; TWA.Attrs = Attribute::None;
TWA.Ty = new PATypeHolder(Type::VoidTy);
$$->push_back(TWA);
CHECK_FOR_ERROR
}
| DOTDOTDOT {
$$ = new TypeWithAttrsList;
- TypeWithAttrs TWA; TWA.Attrs = ParamAttr::None;
+ TypeWithAttrs TWA; TWA.Attrs = Attribute::None;
TWA.Ty = new PATypeHolder(Type::VoidTy);
$$->push_back(TWA);
CHECK_FOR_ERROR
@@ -2285,7 +2285,7 @@
// Rules to match Function Headers
//===----------------------------------------------------------------------===//
-ArgListH : ArgListH ',' Types OptParamAttrs OptLocalName {
+ArgListH : ArgListH ',' Types OptAttributes OptLocalName {
if (!UpRefs.empty())
GEN_ERROR("Invalid upreference in type: " + (*$3)->getDescription());
if (!(*$3)->isFirstClassType())
@@ -2295,7 +2295,7 @@
$1->push_back(E);
CHECK_FOR_ERROR
}
- | Types OptParamAttrs OptLocalName {
+ | Types OptAttributes OptLocalName {
if (!UpRefs.empty())
GEN_ERROR("Invalid upreference in type: " + (*$1)->getDescription());
if (!(*$1)->isFirstClassType())
@@ -2315,7 +2315,7 @@
struct ArgListEntry E;
E.Ty = new PATypeHolder(Type::VoidTy);
E.Name = 0;
- E.Attrs = ParamAttr::None;
+ E.Attrs = Attribute::None;
$$->push_back(E);
CHECK_FOR_ERROR
}
@@ -2324,7 +2324,7 @@
struct ArgListEntry E;
E.Ty = new PATypeHolder(Type::VoidTy);
E.Name = 0;
- E.Attrs = ParamAttr::None;
+ E.Attrs = Attribute::None;
$$->push_back(E);
CHECK_FOR_ERROR
}
@@ -2347,9 +2347,9 @@
GEN_ERROR("Invalid result type for LLVM function");
std::vector<const Type*> ParamTypeList;
- SmallVector<FnAttributeWithIndex, 8> Attrs;
- if ($7 != ParamAttr::None)
- Attrs.push_back(FnAttributeWithIndex::get(0, $7));
+ SmallVector<AttributeWithIndex, 8> Attrs;
+ if ($7 != Attribute::None)
+ Attrs.push_back(AttributeWithIndex::get(0, $7));
if ($5) { // If there are arguments...
unsigned index = 1;
for (ArgListType::iterator I = $5->begin(); I != $5->end(); ++I, ++index) {
@@ -2357,17 +2357,17 @@
if (!CurFun.isDeclare && CurModule.TypeIsUnresolved(I->Ty))
GEN_ERROR("Reference to abstract argument: " + Ty->getDescription());
ParamTypeList.push_back(Ty);
- if (Ty != Type::VoidTy && I->Attrs != ParamAttr::None)
- Attrs.push_back(FnAttributeWithIndex::get(index, I->Attrs));
+ if (Ty != Type::VoidTy && I->Attrs != Attribute::None)
+ Attrs.push_back(AttributeWithIndex::get(index, I->Attrs));
}
}
bool isVarArg = ParamTypeList.size() && ParamTypeList.back() == Type::VoidTy;
if (isVarArg) ParamTypeList.pop_back();
- PAListPtr PAL;
+ AttrListPtr PAL;
if (!Attrs.empty())
- PAL = PAListPtr::get(Attrs.begin(), Attrs.end());
+ PAL = AttrListPtr::get(Attrs.begin(), Attrs.end());
FunctionType *FT = FunctionType::get(*$2, ParamTypeList, isVarArg);
const PointerType *PFT = PointerType::getUnqual(FT);
@@ -2386,7 +2386,7 @@
// Move the function to the end of the list, from whereever it was
// previously inserted.
Fn = cast<Function>(FWRef);
- assert(Fn->getParamAttrs().isEmpty() &&
+ assert(Fn->getAttributes().isEmpty() &&
"Forward reference has parameter attributes!");
CurModule.CurrentModule->getFunctionList().remove(Fn);
CurModule.CurrentModule->getFunctionList().push_back(Fn);
@@ -2396,7 +2396,7 @@
// The existing function doesn't have the same type. This is an overload
// error.
GEN_ERROR("Overload of function '" + FunctionName + "' not permitted.");
- } else if (Fn->getParamAttrs() != PAL) {
+ } else if (Fn->getAttributes() != PAL) {
// The existing function doesn't have the same parameter attributes.
// This is an overload error.
GEN_ERROR("Overload of function '" + FunctionName + "' not permitted.");
@@ -2426,7 +2426,7 @@
Fn->setVisibility(CurFun.Visibility);
}
Fn->setCallingConv($1);
- Fn->setParamAttrs(PAL);
+ Fn->setAttributes(PAL);
Fn->setAlignment($9);
if ($8) {
Fn->setSection(*$8);
@@ -2861,9 +2861,9 @@
BasicBlock *Except = getBBVal($14);
CHECK_FOR_ERROR
- SmallVector<FnAttributeWithIndex, 8> Attrs;
- if ($8 != ParamAttr::None)
- Attrs.push_back(FnAttributeWithIndex::get(0, $8));
+ SmallVector<AttributeWithIndex, 8> Attrs;
+ if ($8 != Attribute::None)
+ Attrs.push_back(AttributeWithIndex::get(0, $8));
// Check the arguments
ValueList Args;
@@ -2885,30 +2885,30 @@
GEN_ERROR("Parameter " + ArgI->Val->getName()+ " is not of type '" +
(*I)->getDescription() + "'");
Args.push_back(ArgI->Val);
- if (ArgI->Attrs != ParamAttr::None)
- Attrs.push_back(FnAttributeWithIndex::get(index, ArgI->Attrs));
+ if (ArgI->Attrs != Attribute::None)
+ Attrs.push_back(AttributeWithIndex::get(index, ArgI->Attrs));
}
if (Ty->isVarArg()) {
if (I == E)
for (; ArgI != ArgE; ++ArgI, ++index) {
Args.push_back(ArgI->Val); // push the remaining varargs
- if (ArgI->Attrs != ParamAttr::None)
- Attrs.push_back(FnAttributeWithIndex::get(index, ArgI->Attrs));
+ if (ArgI->Attrs != Attribute::None)
+ Attrs.push_back(AttributeWithIndex::get(index, ArgI->Attrs));
}
} else if (I != E || ArgI != ArgE)
GEN_ERROR("Invalid number of parameters detected");
}
- PAListPtr PAL;
+ AttrListPtr PAL;
if (!Attrs.empty())
- PAL = PAListPtr::get(Attrs.begin(), Attrs.end());
+ PAL = AttrListPtr::get(Attrs.begin(), Attrs.end());
// Create the InvokeInst
InvokeInst *II = InvokeInst::Create(V, Normal, Except,
Args.begin(), Args.end());
II->setCallingConv($2);
- II->setParamAttrs(PAL);
+ II->setAttributes(PAL);
$$ = II;
delete $6;
CHECK_FOR_ERROR
@@ -2991,8 +2991,8 @@
};
-ParamList : Types OptParamAttrs ValueRef OptParamAttrs {
- // FIXME: Remove trailing OptParamAttrs in LLVM 3.0, it was a mistake in 2.0
+ParamList : Types OptAttributes ValueRef OptAttributes {
+ // FIXME: Remove trailing OptAttributes in LLVM 3.0, it was a mistake in 2.0
if (!UpRefs.empty())
GEN_ERROR("Invalid upreference in type: " + (*$1)->getDescription());
// Used for call and invoke instructions
@@ -3002,16 +3002,16 @@
delete $1;
CHECK_FOR_ERROR
}
- | LABEL OptParamAttrs ValueRef OptParamAttrs {
- // FIXME: Remove trailing OptParamAttrs in LLVM 3.0, it was a mistake in 2.0
+ | LABEL OptAttributes ValueRef OptAttributes {
+ // FIXME: Remove trailing OptAttributes in LLVM 3.0, it was a mistake in 2.0
// Labels are only valid in ASMs
$$ = new ParamList();
ParamListEntry E; E.Attrs = $2 | $4; E.Val = getBBVal($3);
$$->push_back(E);
CHECK_FOR_ERROR
}
- | ParamList ',' Types OptParamAttrs ValueRef OptParamAttrs {
- // FIXME: Remove trailing OptParamAttrs in LLVM 3.0, it was a mistake in 2.0
+ | ParamList ',' Types OptAttributes ValueRef OptAttributes {
+ // FIXME: Remove trailing OptAttributes in LLVM 3.0, it was a mistake in 2.0
if (!UpRefs.empty())
GEN_ERROR("Invalid upreference in type: " + (*$3)->getDescription());
$$ = $1;
@@ -3020,8 +3020,8 @@
delete $3;
CHECK_FOR_ERROR
}
- | ParamList ',' LABEL OptParamAttrs ValueRef OptParamAttrs {
- // FIXME: Remove trailing OptParamAttrs in LLVM 3.0, it was a mistake in 2.0
+ | ParamList ',' LABEL OptAttributes ValueRef OptAttributes {
+ // FIXME: Remove trailing OptAttributes in LLVM 3.0, it was a mistake in 2.0
$$ = $1;
ParamListEntry E; E.Attrs = $4 | $6; E.Val = getBBVal($5);
$$->push_back(E);
@@ -3258,10 +3258,10 @@
theF->getName() + "'");
}
- // Set up the ParamAttrs for the function
- SmallVector<FnAttributeWithIndex, 8> Attrs;
- if ($8 != ParamAttr::None)
- Attrs.push_back(FnAttributeWithIndex::get(0, $8));
+ // Set up the Attributes for the function
+ SmallVector<AttributeWithIndex, 8> Attrs;
+ if ($8 != Attribute::None)
+ Attrs.push_back(AttributeWithIndex::get(0, $8));
// Check the arguments
ValueList Args;
if ($6->empty()) { // Has no arguments?
@@ -3282,30 +3282,30 @@
GEN_ERROR("Parameter " + ArgI->Val->getName()+ " is not of type '" +
(*I)->getDescription() + "'");
Args.push_back(ArgI->Val);
- if (ArgI->Attrs != ParamAttr::None)
- Attrs.push_back(FnAttributeWithIndex::get(index, ArgI->Attrs));
+ if (ArgI->Attrs != Attribute::None)
+ Attrs.push_back(AttributeWithIndex::get(index, ArgI->Attrs));
}
if (Ty->isVarArg()) {
if (I == E)
for (; ArgI != ArgE; ++ArgI, ++index) {
Args.push_back(ArgI->Val); // push the remaining varargs
- if (ArgI->Attrs != ParamAttr::None)
- Attrs.push_back(FnAttributeWithIndex::get(index, ArgI->Attrs));
+ if (ArgI->Attrs != Attribute::None)
+ Attrs.push_back(AttributeWithIndex::get(index, ArgI->Attrs));
}
} else if (I != E || ArgI != ArgE)
GEN_ERROR("Invalid number of parameters detected");
}
- // Finish off the ParamAttrs and check them
- PAListPtr PAL;
+ // Finish off the Attributes and check them
+ AttrListPtr PAL;
if (!Attrs.empty())
- PAL = PAListPtr::get(Attrs.begin(), Attrs.end());
+ PAL = AttrListPtr::get(Attrs.begin(), Attrs.end());
// Create the call node
CallInst *CI = CallInst::Create(V, Args.begin(), Args.end());
CI->setTailCall($1);
CI->setCallingConv($2);
- CI->setParamAttrs(PAL);
+ CI->setAttributes(PAL);
$$ = CI;
delete $6;
delete $3;
Modified: llvm/trunk/lib/AsmParser/llvmAsmParser.y.cvs
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/AsmParser/llvmAsmParser.y.cvs?rev=56622&r1=56621&r2=56622&view=diff
==============================================================================
--- llvm/trunk/lib/AsmParser/llvmAsmParser.y.cvs (original)
+++ llvm/trunk/lib/AsmParser/llvmAsmParser.y.cvs Thu Sep 25 16:00:45 2008
@@ -994,7 +994,7 @@
llvm::GlobalValue::LinkageTypes Linkage;
llvm::GlobalValue::VisibilityTypes Visibility;
- llvm::Attributes ParamAttrs;
+ llvm::Attributes Attributes;
llvm::APInt *APIntVal;
int64_t SInt64Val;
uint64_t UInt64Val;
@@ -1088,10 +1088,10 @@
%token X86_SSECALLCC_TOK
%token DATALAYOUT
%type <UIntVal> OptCallingConv LocalNumber
-%type <ParamAttrs> OptParamAttrs ParamAttr
-%type <ParamAttrs> OptFuncAttrs FuncAttr
-%type <ParamAttrs> OptFuncNotes FuncNote
-%type <ParamAttrs> FuncNoteList
+%type <Attributes> OptAttributes Attribute
+%type <Attributes> OptFuncAttrs FuncAttr
+%type <Attributes> OptFuncNotes FuncNote
+%type <Attributes> FuncNoteList
// Basic Block Terminating Operators
%token <TermOpVal> RET BR SWITCH INVOKE UNWIND UNREACHABLE
@@ -1260,35 +1260,35 @@
CHECK_FOR_ERROR
};
-ParamAttr : ZEROEXT { $$ = ParamAttr::ZExt; }
- | ZEXT { $$ = ParamAttr::ZExt; }
- | SIGNEXT { $$ = ParamAttr::SExt; }
- | SEXT { $$ = ParamAttr::SExt; }
- | INREG { $$ = ParamAttr::InReg; }
- | SRET { $$ = ParamAttr::StructRet; }
- | NOALIAS { $$ = ParamAttr::NoAlias; }
- | BYVAL { $$ = ParamAttr::ByVal; }
- | NEST { $$ = ParamAttr::Nest; }
+Attribute : ZEROEXT { $$ = Attribute::ZExt; }
+ | ZEXT { $$ = Attribute::ZExt; }
+ | SIGNEXT { $$ = Attribute::SExt; }
+ | SEXT { $$ = Attribute::SExt; }
+ | INREG { $$ = Attribute::InReg; }
+ | SRET { $$ = Attribute::StructRet; }
+ | NOALIAS { $$ = Attribute::NoAlias; }
+ | BYVAL { $$ = Attribute::ByVal; }
+ | NEST { $$ = Attribute::Nest; }
| ALIGN EUINT64VAL { $$ =
- ParamAttr::constructAlignmentFromInt($2); }
+ Attribute::constructAlignmentFromInt($2); }
;
-OptParamAttrs : /* empty */ { $$ = ParamAttr::None; }
- | OptParamAttrs ParamAttr {
+OptAttributes : /* empty */ { $$ = Attribute::None; }
+ | OptAttributes Attribute {
$$ = $1 | $2;
}
;
-FuncAttr : NORETURN { $$ = ParamAttr::NoReturn; }
- | NOUNWIND { $$ = ParamAttr::NoUnwind; }
- | INREG { $$ = ParamAttr::InReg; }
- | ZEROEXT { $$ = ParamAttr::ZExt; }
- | SIGNEXT { $$ = ParamAttr::SExt; }
- | READNONE { $$ = ParamAttr::ReadNone; }
- | READONLY { $$ = ParamAttr::ReadOnly; }
+FuncAttr : NORETURN { $$ = Attribute::NoReturn; }
+ | NOUNWIND { $$ = Attribute::NoUnwind; }
+ | INREG { $$ = Attribute::InReg; }
+ | ZEROEXT { $$ = Attribute::ZExt; }
+ | SIGNEXT { $$ = Attribute::SExt; }
+ | READNONE { $$ = Attribute::ReadNone; }
+ | READONLY { $$ = Attribute::ReadOnly; }
;
-OptFuncAttrs : /* empty */ { $$ = ParamAttr::None; }
+OptFuncAttrs : /* empty */ { $$ = Attribute::None; }
| OptFuncAttrs FuncAttr {
$$ = $1 | $2;
}
@@ -1297,23 +1297,23 @@
FuncNoteList : FuncNote { $$ = $1; }
| FuncNoteList ',' FuncNote {
unsigned tmp = $1 | $3;
- if ($3 == FnAttr::NoInline
- && ($1 & FnAttr::AlwaysInline))
+ if ($3 == Attribute::NoInline
+ && ($1 & Attribute::AlwaysInline))
GEN_ERROR("Function Notes may include only one inline notes!")
- if ($3 == FnAttr::AlwaysInline
- && ($1 & FnAttr::NoInline))
+ if ($3 == Attribute::AlwaysInline
+ && ($1 & Attribute::NoInline))
GEN_ERROR("Function Notes may include only one inline notes!")
$$ = tmp;
CHECK_FOR_ERROR
}
;
-FuncNote : INLINE '=' NEVER { $$ = FnAttr::NoInline; }
- | INLINE '=' ALWAYS { $$ = FnAttr::AlwaysInline; }
- | OPTIMIZEFORSIZE { $$ = FnAttr::OptimizeForSize; }
+FuncNote : INLINE '=' NEVER { $$ = Attribute::NoInline; }
+ | INLINE '=' ALWAYS { $$ = Attribute::AlwaysInline; }
+ | OPTIMIZEFORSIZE { $$ = Attribute::OptimizeForSize; }
;
-OptFuncNotes : /* empty */ { $$ = FnAttr::None; }
+OptFuncNotes : /* empty */ { $$ = Attribute::None; }
| FNNOTE '(' FuncNoteList ')' {
$$ = $3;
}
@@ -1509,11 +1509,11 @@
;
ArgType
- : Types OptParamAttrs {
+ : Types OptAttributes {
// Allow but ignore attributes on function types; this permits auto-upgrade.
// FIXME: remove in LLVM 3.0.
$$.Ty = $1;
- $$.Attrs = ParamAttr::None;
+ $$.Attrs = Attribute::None;
}
;
@@ -1545,14 +1545,14 @@
: ArgTypeList
| ArgTypeList ',' DOTDOTDOT {
$$=$1;
- TypeWithAttrs TWA; TWA.Attrs = ParamAttr::None;
+ TypeWithAttrs TWA; TWA.Attrs = Attribute::None;
TWA.Ty = new PATypeHolder(Type::VoidTy);
$$->push_back(TWA);
CHECK_FOR_ERROR
}
| DOTDOTDOT {
$$ = new TypeWithAttrsList;
- TypeWithAttrs TWA; TWA.Attrs = ParamAttr::None;
+ TypeWithAttrs TWA; TWA.Attrs = Attribute::None;
TWA.Ty = new PATypeHolder(Type::VoidTy);
$$->push_back(TWA);
CHECK_FOR_ERROR
@@ -2285,7 +2285,7 @@
// Rules to match Function Headers
//===----------------------------------------------------------------------===//
-ArgListH : ArgListH ',' Types OptParamAttrs OptLocalName {
+ArgListH : ArgListH ',' Types OptAttributes OptLocalName {
if (!UpRefs.empty())
GEN_ERROR("Invalid upreference in type: " + (*$3)->getDescription());
if (!(*$3)->isFirstClassType())
@@ -2295,7 +2295,7 @@
$1->push_back(E);
CHECK_FOR_ERROR
}
- | Types OptParamAttrs OptLocalName {
+ | Types OptAttributes OptLocalName {
if (!UpRefs.empty())
GEN_ERROR("Invalid upreference in type: " + (*$1)->getDescription());
if (!(*$1)->isFirstClassType())
@@ -2315,7 +2315,7 @@
struct ArgListEntry E;
E.Ty = new PATypeHolder(Type::VoidTy);
E.Name = 0;
- E.Attrs = ParamAttr::None;
+ E.Attrs = Attribute::None;
$$->push_back(E);
CHECK_FOR_ERROR
}
@@ -2324,7 +2324,7 @@
struct ArgListEntry E;
E.Ty = new PATypeHolder(Type::VoidTy);
E.Name = 0;
- E.Attrs = ParamAttr::None;
+ E.Attrs = Attribute::None;
$$->push_back(E);
CHECK_FOR_ERROR
}
@@ -2347,9 +2347,9 @@
GEN_ERROR("Invalid result type for LLVM function");
std::vector<const Type*> ParamTypeList;
- SmallVector<FnAttributeWithIndex, 8> Attrs;
- if ($7 != ParamAttr::None)
- Attrs.push_back(FnAttributeWithIndex::get(0, $7));
+ SmallVector<AttributeWithIndex, 8> Attrs;
+ if ($7 != Attribute::None)
+ Attrs.push_back(AttributeWithIndex::get(0, $7));
if ($5) { // If there are arguments...
unsigned index = 1;
for (ArgListType::iterator I = $5->begin(); I != $5->end(); ++I, ++index) {
@@ -2357,17 +2357,17 @@
if (!CurFun.isDeclare && CurModule.TypeIsUnresolved(I->Ty))
GEN_ERROR("Reference to abstract argument: " + Ty->getDescription());
ParamTypeList.push_back(Ty);
- if (Ty != Type::VoidTy && I->Attrs != ParamAttr::None)
- Attrs.push_back(FnAttributeWithIndex::get(index, I->Attrs));
+ if (Ty != Type::VoidTy && I->Attrs != Attribute::None)
+ Attrs.push_back(AttributeWithIndex::get(index, I->Attrs));
}
}
bool isVarArg = ParamTypeList.size() && ParamTypeList.back() == Type::VoidTy;
if (isVarArg) ParamTypeList.pop_back();
- PAListPtr PAL;
+ AttrListPtr PAL;
if (!Attrs.empty())
- PAL = PAListPtr::get(Attrs.begin(), Attrs.end());
+ PAL = AttrListPtr::get(Attrs.begin(), Attrs.end());
FunctionType *FT = FunctionType::get(*$2, ParamTypeList, isVarArg);
const PointerType *PFT = PointerType::getUnqual(FT);
@@ -2386,7 +2386,7 @@
// Move the function to the end of the list, from whereever it was
// previously inserted.
Fn = cast<Function>(FWRef);
- assert(Fn->getParamAttrs().isEmpty() &&
+ assert(Fn->getAttributes().isEmpty() &&
"Forward reference has parameter attributes!");
CurModule.CurrentModule->getFunctionList().remove(Fn);
CurModule.CurrentModule->getFunctionList().push_back(Fn);
@@ -2396,7 +2396,7 @@
// The existing function doesn't have the same type. This is an overload
// error.
GEN_ERROR("Overload of function '" + FunctionName + "' not permitted.");
- } else if (Fn->getParamAttrs() != PAL) {
+ } else if (Fn->getAttributes() != PAL) {
// The existing function doesn't have the same parameter attributes.
// This is an overload error.
GEN_ERROR("Overload of function '" + FunctionName + "' not permitted.");
@@ -2426,7 +2426,7 @@
Fn->setVisibility(CurFun.Visibility);
}
Fn->setCallingConv($1);
- Fn->setParamAttrs(PAL);
+ Fn->setAttributes(PAL);
Fn->setAlignment($9);
if ($8) {
Fn->setSection(*$8);
@@ -2861,9 +2861,9 @@
BasicBlock *Except = getBBVal($14);
CHECK_FOR_ERROR
- SmallVector<FnAttributeWithIndex, 8> Attrs;
- if ($8 != ParamAttr::None)
- Attrs.push_back(FnAttributeWithIndex::get(0, $8));
+ SmallVector<AttributeWithIndex, 8> Attrs;
+ if ($8 != Attribute::None)
+ Attrs.push_back(AttributeWithIndex::get(0, $8));
// Check the arguments
ValueList Args;
@@ -2885,30 +2885,30 @@
GEN_ERROR("Parameter " + ArgI->Val->getName()+ " is not of type '" +
(*I)->getDescription() + "'");
Args.push_back(ArgI->Val);
- if (ArgI->Attrs != ParamAttr::None)
- Attrs.push_back(FnAttributeWithIndex::get(index, ArgI->Attrs));
+ if (ArgI->Attrs != Attribute::None)
+ Attrs.push_back(AttributeWithIndex::get(index, ArgI->Attrs));
}
if (Ty->isVarArg()) {
if (I == E)
for (; ArgI != ArgE; ++ArgI, ++index) {
Args.push_back(ArgI->Val); // push the remaining varargs
- if (ArgI->Attrs != ParamAttr::None)
- Attrs.push_back(FnAttributeWithIndex::get(index, ArgI->Attrs));
+ if (ArgI->Attrs != Attribute::None)
+ Attrs.push_back(AttributeWithIndex::get(index, ArgI->Attrs));
}
} else if (I != E || ArgI != ArgE)
GEN_ERROR("Invalid number of parameters detected");
}
- PAListPtr PAL;
+ AttrListPtr PAL;
if (!Attrs.empty())
- PAL = PAListPtr::get(Attrs.begin(), Attrs.end());
+ PAL = AttrListPtr::get(Attrs.begin(), Attrs.end());
// Create the InvokeInst
InvokeInst *II = InvokeInst::Create(V, Normal, Except,
Args.begin(), Args.end());
II->setCallingConv($2);
- II->setParamAttrs(PAL);
+ II->setAttributes(PAL);
$$ = II;
delete $6;
CHECK_FOR_ERROR
@@ -2991,8 +2991,8 @@
};
-ParamList : Types OptParamAttrs ValueRef OptParamAttrs {
- // FIXME: Remove trailing OptParamAttrs in LLVM 3.0, it was a mistake in 2.0
+ParamList : Types OptAttributes ValueRef OptAttributes {
+ // FIXME: Remove trailing OptAttributes in LLVM 3.0, it was a mistake in 2.0
if (!UpRefs.empty())
GEN_ERROR("Invalid upreference in type: " + (*$1)->getDescription());
// Used for call and invoke instructions
@@ -3002,16 +3002,16 @@
delete $1;
CHECK_FOR_ERROR
}
- | LABEL OptParamAttrs ValueRef OptParamAttrs {
- // FIXME: Remove trailing OptParamAttrs in LLVM 3.0, it was a mistake in 2.0
+ | LABEL OptAttributes ValueRef OptAttributes {
+ // FIXME: Remove trailing OptAttributes in LLVM 3.0, it was a mistake in 2.0
// Labels are only valid in ASMs
$$ = new ParamList();
ParamListEntry E; E.Attrs = $2 | $4; E.Val = getBBVal($3);
$$->push_back(E);
CHECK_FOR_ERROR
}
- | ParamList ',' Types OptParamAttrs ValueRef OptParamAttrs {
- // FIXME: Remove trailing OptParamAttrs in LLVM 3.0, it was a mistake in 2.0
+ | ParamList ',' Types OptAttributes ValueRef OptAttributes {
+ // FIXME: Remove trailing OptAttributes in LLVM 3.0, it was a mistake in 2.0
if (!UpRefs.empty())
GEN_ERROR("Invalid upreference in type: " + (*$3)->getDescription());
$$ = $1;
@@ -3020,8 +3020,8 @@
delete $3;
CHECK_FOR_ERROR
}
- | ParamList ',' LABEL OptParamAttrs ValueRef OptParamAttrs {
- // FIXME: Remove trailing OptParamAttrs in LLVM 3.0, it was a mistake in 2.0
+ | ParamList ',' LABEL OptAttributes ValueRef OptAttributes {
+ // FIXME: Remove trailing OptAttributes in LLVM 3.0, it was a mistake in 2.0
$$ = $1;
ParamListEntry E; E.Attrs = $4 | $6; E.Val = getBBVal($5);
$$->push_back(E);
@@ -3258,10 +3258,10 @@
theF->getName() + "'");
}
- // Set up the ParamAttrs for the function
- SmallVector<FnAttributeWithIndex, 8> Attrs;
- if ($8 != ParamAttr::None)
- Attrs.push_back(FnAttributeWithIndex::get(0, $8));
+ // Set up the Attributes for the function
+ SmallVector<AttributeWithIndex, 8> Attrs;
+ if ($8 != Attribute::None)
+ Attrs.push_back(AttributeWithIndex::get(0, $8));
// Check the arguments
ValueList Args;
if ($6->empty()) { // Has no arguments?
@@ -3282,30 +3282,30 @@
GEN_ERROR("Parameter " + ArgI->Val->getName()+ " is not of type '" +
(*I)->getDescription() + "'");
Args.push_back(ArgI->Val);
- if (ArgI->Attrs != ParamAttr::None)
- Attrs.push_back(FnAttributeWithIndex::get(index, ArgI->Attrs));
+ if (ArgI->Attrs != Attribute::None)
+ Attrs.push_back(AttributeWithIndex::get(index, ArgI->Attrs));
}
if (Ty->isVarArg()) {
if (I == E)
for (; ArgI != ArgE; ++ArgI, ++index) {
Args.push_back(ArgI->Val); // push the remaining varargs
- if (ArgI->Attrs != ParamAttr::None)
- Attrs.push_back(FnAttributeWithIndex::get(index, ArgI->Attrs));
+ if (ArgI->Attrs != Attribute::None)
+ Attrs.push_back(AttributeWithIndex::get(index, ArgI->Attrs));
}
} else if (I != E || ArgI != ArgE)
GEN_ERROR("Invalid number of parameters detected");
}
- // Finish off the ParamAttrs and check them
- PAListPtr PAL;
+ // Finish off the Attributes and check them
+ AttrListPtr PAL;
if (!Attrs.empty())
- PAL = PAListPtr::get(Attrs.begin(), Attrs.end());
+ PAL = AttrListPtr::get(Attrs.begin(), Attrs.end());
// Create the call node
CallInst *CI = CallInst::Create(V, Args.begin(), Args.end());
CI->setTailCall($1);
CI->setCallingConv($2);
- CI->setParamAttrs(PAL);
+ CI->setAttributes(PAL);
$$ = CI;
delete $6;
delete $3;
Modified: llvm/trunk/lib/Bitcode/Reader/BitcodeReader.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Bitcode/Reader/BitcodeReader.cpp?rev=56622&r1=56621&r2=56622&view=diff
==============================================================================
--- llvm/trunk/lib/Bitcode/Reader/BitcodeReader.cpp (original)
+++ llvm/trunk/lib/Bitcode/Reader/BitcodeReader.cpp Thu Sep 25 16:00:45 2008
@@ -32,7 +32,7 @@
std::vector<PATypeHolder>().swap(TypeList);
ValueList.clear();
- std::vector<PAListPtr>().swap(ParamAttrs);
+ std::vector<AttrListPtr>().swap(Attributes);
std::vector<BasicBlock*>().swap(FunctionBBs);
std::vector<Function*>().swap(FunctionsWithBodies);
DeferredFunctionInfo.clear();
@@ -313,16 +313,16 @@
// Functions for parsing blocks from the bitcode file
//===----------------------------------------------------------------------===//
-bool BitcodeReader::ParseParamAttrBlock() {
+bool BitcodeReader::ParseAttributeBlock() {
if (Stream.EnterSubBlock(bitc::PARAMATTR_BLOCK_ID))
return Error("Malformed block record");
- if (!ParamAttrs.empty())
+ if (!Attributes.empty())
return Error("Multiple PARAMATTR blocks found!");
SmallVector<uint64_t, 64> Record;
- SmallVector<FnAttributeWithIndex, 8> Attrs;
+ SmallVector<AttributeWithIndex, 8> Attrs;
// Read all the records.
while (1) {
@@ -356,11 +356,11 @@
return Error("Invalid ENTRY record");
for (unsigned i = 0, e = Record.size(); i != e; i += 2) {
- if (Record[i+1] != ParamAttr::None)
- Attrs.push_back(FnAttributeWithIndex::get(Record[i], Record[i+1]));
+ if (Record[i+1] != Attribute::None)
+ Attrs.push_back(AttributeWithIndex::get(Record[i], Record[i+1]));
}
- ParamAttrs.push_back(PAListPtr::get(Attrs.begin(), Attrs.end()));
+ Attributes.push_back(AttrListPtr::get(Attrs.begin(), Attrs.end()));
Attrs.clear();
break;
}
@@ -1030,7 +1030,7 @@
return Error("Malformed BlockInfoBlock");
break;
case bitc::PARAMATTR_BLOCK_ID:
- if (ParseParamAttrBlock())
+ if (ParseAttributeBlock())
return true;
break;
case bitc::TYPE_BLOCK_ID:
@@ -1183,7 +1183,7 @@
Func->setCallingConv(Record[1]);
bool isProto = Record[2];
Func->setLinkage(GetDecodedLinkage(Record[3]));
- Func->setParamAttrs(getParamAttrs(Record[4]));
+ Func->setAttributes(getAttributes(Record[4]));
Func->setAlignment((1 << Record[5]) >> 1);
if (Record[6]) {
@@ -1695,7 +1695,7 @@
case bitc::FUNC_CODE_INST_INVOKE: {
// INVOKE: [attrs, cc, normBB, unwindBB, fnty, op0,op1,op2, ...]
if (Record.size() < 4) return Error("Invalid INVOKE record");
- PAListPtr PAL = getParamAttrs(Record[0]);
+ AttrListPtr PAL = getAttributes(Record[0]);
unsigned CCInfo = Record[1];
BasicBlock *NormalBB = getBasicBlock(Record[2]);
BasicBlock *UnwindBB = getBasicBlock(Record[3]);
@@ -1736,7 +1736,7 @@
I = InvokeInst::Create(Callee, NormalBB, UnwindBB,
Ops.begin(), Ops.end());
cast<InvokeInst>(I)->setCallingConv(CCInfo);
- cast<InvokeInst>(I)->setParamAttrs(PAL);
+ cast<InvokeInst>(I)->setAttributes(PAL);
break;
}
case bitc::FUNC_CODE_INST_UNWIND: // UNWIND
@@ -1834,7 +1834,7 @@
if (Record.size() < 3)
return Error("Invalid CALL record");
- PAListPtr PAL = getParamAttrs(Record[0]);
+ AttrListPtr PAL = getAttributes(Record[0]);
unsigned CCInfo = Record[1];
unsigned OpNum = 2;
@@ -1874,7 +1874,7 @@
I = CallInst::Create(Callee, Args.begin(), Args.end());
cast<CallInst>(I)->setCallingConv(CCInfo>>1);
cast<CallInst>(I)->setTailCall(CCInfo & 1);
- cast<CallInst>(I)->setParamAttrs(PAL);
+ cast<CallInst>(I)->setAttributes(PAL);
break;
}
case bitc::FUNC_CODE_INST_VAARG: { // VAARG: [valistty, valist, instty]
Modified: llvm/trunk/lib/Bitcode/Reader/BitcodeReader.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Bitcode/Reader/BitcodeReader.h?rev=56622&r1=56621&r2=56622&view=diff
==============================================================================
--- llvm/trunk/lib/Bitcode/Reader/BitcodeReader.h (original)
+++ llvm/trunk/lib/Bitcode/Reader/BitcodeReader.h Thu Sep 25 16:00:45 2008
@@ -136,10 +136,10 @@
std::vector<std::pair<GlobalVariable*, unsigned> > GlobalInits;
std::vector<std::pair<GlobalAlias*, unsigned> > AliasInits;
- /// ParamAttrs - The set of parameter attributes by index. Index zero in the
+ /// Attributes - The set of parameter attributes by index. Index zero in the
/// file is for null, and is thus not represented here. As such all indices
/// are off by one.
- std::vector<PAListPtr> ParamAttrs;
+ std::vector<AttrListPtr> Attributes;
/// FunctionBBs - While parsing a function body, this is a list of the basic
/// blocks for the function.
@@ -203,10 +203,10 @@
if (ID >= FunctionBBs.size()) return 0; // Invalid ID
return FunctionBBs[ID];
}
- PAListPtr getParamAttrs(unsigned i) const {
- if (i-1 < ParamAttrs.size())
- return ParamAttrs[i-1];
- return PAListPtr();
+ AttrListPtr getAttributes(unsigned i) const {
+ if (i-1 < Attributes.size())
+ return Attributes[i-1];
+ return AttrListPtr();
}
/// getValueTypePair - Read a value/type pair out of the specified record from
@@ -239,7 +239,7 @@
bool ParseModule(const std::string &ModuleID);
- bool ParseParamAttrBlock();
+ bool ParseAttributeBlock();
bool ParseTypeTable();
bool ParseTypeSymbolTable();
bool ParseValueSymbolTable();
Modified: llvm/trunk/lib/Bitcode/Writer/BitcodeWriter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Bitcode/Writer/BitcodeWriter.cpp?rev=56622&r1=56621&r2=56622&view=diff
==============================================================================
--- llvm/trunk/lib/Bitcode/Writer/BitcodeWriter.cpp (original)
+++ llvm/trunk/lib/Bitcode/Writer/BitcodeWriter.cpp Thu Sep 25 16:00:45 2008
@@ -108,18 +108,18 @@
}
// Emit information about parameter attributes.
-static void WriteParamAttrTable(const ValueEnumerator &VE,
+static void WriteAttributeTable(const ValueEnumerator &VE,
BitstreamWriter &Stream) {
- const std::vector<PAListPtr> &Attrs = VE.getParamAttrs();
+ const std::vector<AttrListPtr> &Attrs = VE.getAttributes();
if (Attrs.empty()) return;
Stream.EnterSubblock(bitc::PARAMATTR_BLOCK_ID, 3);
SmallVector<uint64_t, 64> Record;
for (unsigned i = 0, e = Attrs.size(); i != e; ++i) {
- const PAListPtr &A = Attrs[i];
+ const AttrListPtr &A = Attrs[i];
for (unsigned i = 0, e = A.getNumSlots(); i != e; ++i) {
- const FnAttributeWithIndex &PAWI = A.getSlot(i);
+ const AttributeWithIndex &PAWI = A.getSlot(i);
Record.push_back(PAWI.Index);
Record.push_back(PAWI.Attrs);
}
@@ -407,7 +407,7 @@
Vals.push_back(F->getCallingConv());
Vals.push_back(F->isDeclaration());
Vals.push_back(getEncodedLinkage(F));
- Vals.push_back(VE.getParamAttrID(F->getParamAttrs()));
+ Vals.push_back(VE.getAttributeID(F->getAttributes()));
Vals.push_back(Log2_32(F->getAlignment())+1);
Vals.push_back(F->hasSection() ? SectionMap[F->getSection()] : 0);
Vals.push_back(getEncodedVisibility(F));
@@ -818,7 +818,7 @@
Code = bitc::FUNC_CODE_INST_INVOKE;
const InvokeInst *II = cast<InvokeInst>(&I);
- Vals.push_back(VE.getParamAttrID(II->getParamAttrs()));
+ Vals.push_back(VE.getAttributeID(II->getAttributes()));
Vals.push_back(II->getCallingConv());
Vals.push_back(VE.getValueID(I.getOperand(1))); // normal dest
Vals.push_back(VE.getValueID(I.getOperand(2))); // unwind dest
@@ -892,7 +892,7 @@
Code = bitc::FUNC_CODE_INST_CALL;
const CallInst *CI = cast<CallInst>(&I);
- Vals.push_back(VE.getParamAttrID(CI->getParamAttrs()));
+ Vals.push_back(VE.getAttributeID(CI->getAttributes()));
Vals.push_back((CI->getCallingConv() << 1) | unsigned(CI->isTailCall()));
PushValueAndType(CI->getOperand(0), InstID, Vals, VE); // Callee
@@ -1226,7 +1226,7 @@
WriteBlockInfo(VE, Stream);
// Emit information about parameter attributes.
- WriteParamAttrTable(VE, Stream);
+ WriteAttributeTable(VE, Stream);
// Emit information describing all of the types in the module.
WriteTypeTable(VE, Stream);
Modified: llvm/trunk/lib/Bitcode/Writer/ValueEnumerator.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Bitcode/Writer/ValueEnumerator.cpp?rev=56622&r1=56621&r2=56622&view=diff
==============================================================================
--- llvm/trunk/lib/Bitcode/Writer/ValueEnumerator.cpp (original)
+++ llvm/trunk/lib/Bitcode/Writer/ValueEnumerator.cpp Thu Sep 25 16:00:45 2008
@@ -47,7 +47,7 @@
// Enumerate the functions.
for (Module::const_iterator I = M->begin(), E = M->end(); I != E; ++I) {
EnumerateValue(I);
- EnumerateParamAttrs(cast<Function>(I)->getParamAttrs());
+ EnumerateAttributes(cast<Function>(I)->getAttributes());
}
// Enumerate the aliases.
@@ -90,9 +90,9 @@
EnumerateOperandType(*OI);
EnumerateType(I->getType());
if (const CallInst *CI = dyn_cast<CallInst>(I))
- EnumerateParamAttrs(CI->getParamAttrs());
+ EnumerateAttributes(CI->getAttributes());
else if (const InvokeInst *II = dyn_cast<InvokeInst>(I))
- EnumerateParamAttrs(II->getParamAttrs());
+ EnumerateAttributes(II->getAttributes());
}
}
@@ -247,14 +247,14 @@
}
}
-void ValueEnumerator::EnumerateParamAttrs(const PAListPtr &PAL) {
+void ValueEnumerator::EnumerateAttributes(const AttrListPtr &PAL) {
if (PAL.isEmpty()) return; // null is always 0.
// Do a lookup.
- unsigned &Entry = ParamAttrMap[PAL.getRawPointer()];
+ unsigned &Entry = AttributeMap[PAL.getRawPointer()];
if (Entry == 0) {
// Never saw this before, add it.
- ParamAttrs.push_back(PAL);
- Entry = ParamAttrs.size();
+ Attributes.push_back(PAL);
+ Entry = Attributes.size();
}
}
@@ -303,7 +303,7 @@
// Add the function's parameter attributes so they are available for use in
// the function's instruction.
- EnumerateParamAttrs(F.getParamAttrs());
+ EnumerateAttributes(F.getAttributes());
FirstInstID = Values.size();
Modified: llvm/trunk/lib/Bitcode/Writer/ValueEnumerator.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Bitcode/Writer/ValueEnumerator.h?rev=56622&r1=56621&r2=56622&view=diff
==============================================================================
--- llvm/trunk/lib/Bitcode/Writer/ValueEnumerator.h (original)
+++ llvm/trunk/lib/Bitcode/Writer/ValueEnumerator.h Thu Sep 25 16:00:45 2008
@@ -25,7 +25,7 @@
class BasicBlock;
class Function;
class Module;
-class PAListPtr;
+class AttrListPtr;
class TypeSymbolTable;
class ValueSymbolTable;
@@ -45,9 +45,9 @@
ValueMapType ValueMap;
ValueList Values;
- typedef DenseMap<void*, unsigned> ParamAttrMapType;
- ParamAttrMapType ParamAttrMap;
- std::vector<PAListPtr> ParamAttrs;
+ typedef DenseMap<void*, unsigned> AttributeMapType;
+ AttributeMapType AttributeMap;
+ std::vector<AttrListPtr> Attributes;
/// BasicBlocks - This contains all the basic blocks for the currently
/// incorporated function. Their reverse mapping is stored in ValueMap.
@@ -76,10 +76,10 @@
return I->second-1;
}
- unsigned getParamAttrID(const PAListPtr &PAL) const {
+ unsigned getAttributeID(const AttrListPtr &PAL) const {
if (PAL.isEmpty()) return 0; // Null maps to zero.
- ParamAttrMapType::const_iterator I = ParamAttrMap.find(PAL.getRawPointer());
- assert(I != ParamAttrMap.end() && "ParamAttr not in ValueEnumerator!");
+ AttributeMapType::const_iterator I = AttributeMap.find(PAL.getRawPointer());
+ assert(I != AttributeMap.end() && "Attribute not in ValueEnumerator!");
return I->second;
}
@@ -95,8 +95,8 @@
const std::vector<const BasicBlock*> &getBasicBlocks() const {
return BasicBlocks;
}
- const std::vector<PAListPtr> &getParamAttrs() const {
- return ParamAttrs;
+ const std::vector<AttrListPtr> &getAttributes() const {
+ return Attributes;
}
/// PurgeAggregateValues - If there are any aggregate values at the end of the
@@ -116,7 +116,7 @@
void EnumerateValue(const Value *V);
void EnumerateType(const Type *T);
void EnumerateOperandType(const Value *V);
- void EnumerateParamAttrs(const PAListPtr &PAL);
+ void EnumerateAttributes(const AttrListPtr &PAL);
void EnumerateTypeSymbolTable(const TypeSymbolTable &ST);
void EnumerateValueSymbolTable(const ValueSymbolTable &ST);
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp?rev=56622&r1=56621&r2=56622&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp Thu Sep 25 16:00:45 2008
@@ -927,9 +927,9 @@
ISD::NodeType ExtendKind = ISD::ANY_EXTEND;
const Function *F = I.getParent()->getParent();
- if (F->paramHasAttr(0, ParamAttr::SExt))
+ if (F->paramHasAttr(0, Attribute::SExt))
ExtendKind = ISD::SIGN_EXTEND;
- else if (F->paramHasAttr(0, ParamAttr::ZExt))
+ else if (F->paramHasAttr(0, Attribute::ZExt))
ExtendKind = ISD::ZERO_EXTEND;
getCopyToParts(DAG, SDValue(RetOp.getNode(), RetOp.getResNo() + j),
@@ -937,7 +937,7 @@
// 'inreg' on function refers to return value
ISD::ArgFlagsTy Flags = ISD::ArgFlagsTy();
- if (F->paramHasAttr(0, ParamAttr::InReg))
+ if (F->paramHasAttr(0, Attribute::InReg))
Flags.setInReg();
for (unsigned i = 0; i < NumParts; ++i) {
NewValues.push_back(Parts[i]);
@@ -4100,12 +4100,12 @@
Entry.Node = ArgNode; Entry.Ty = (*i)->getType();
unsigned attrInd = i - CS.arg_begin() + 1;
- Entry.isSExt = CS.paramHasAttr(attrInd, ParamAttr::SExt);
- Entry.isZExt = CS.paramHasAttr(attrInd, ParamAttr::ZExt);
- Entry.isInReg = CS.paramHasAttr(attrInd, ParamAttr::InReg);
- Entry.isSRet = CS.paramHasAttr(attrInd, ParamAttr::StructRet);
- Entry.isNest = CS.paramHasAttr(attrInd, ParamAttr::Nest);
- Entry.isByVal = CS.paramHasAttr(attrInd, ParamAttr::ByVal);
+ Entry.isSExt = CS.paramHasAttr(attrInd, Attribute::SExt);
+ Entry.isZExt = CS.paramHasAttr(attrInd, Attribute::ZExt);
+ Entry.isInReg = CS.paramHasAttr(attrInd, Attribute::InReg);
+ Entry.isSRet = CS.paramHasAttr(attrInd, Attribute::StructRet);
+ Entry.isNest = CS.paramHasAttr(attrInd, Attribute::Nest);
+ Entry.isByVal = CS.paramHasAttr(attrInd, Attribute::ByVal);
Entry.Alignment = CS.getParamAlignment(attrInd);
Args.push_back(Entry);
}
@@ -4122,8 +4122,8 @@
std::pair<SDValue,SDValue> Result =
TLI.LowerCallTo(getRoot(), CS.getType(),
- CS.paramHasAttr(0, ParamAttr::SExt),
- CS.paramHasAttr(0, ParamAttr::ZExt),
+ CS.paramHasAttr(0, Attribute::SExt),
+ CS.paramHasAttr(0, Attribute::ZExt),
FTy->isVarArg(), CS.getCallingConv(),
IsTailCall && PerformTailCallOpt,
Callee, Args, DAG);
@@ -5126,15 +5126,15 @@
unsigned OriginalAlignment =
getTargetData()->getABITypeAlignment(ArgTy);
- if (F.paramHasAttr(j, ParamAttr::ZExt))
+ if (F.paramHasAttr(j, Attribute::ZExt))
Flags.setZExt();
- if (F.paramHasAttr(j, ParamAttr::SExt))
+ if (F.paramHasAttr(j, Attribute::SExt))
Flags.setSExt();
- if (F.paramHasAttr(j, ParamAttr::InReg))
+ if (F.paramHasAttr(j, Attribute::InReg))
Flags.setInReg();
- if (F.paramHasAttr(j, ParamAttr::StructRet))
+ if (F.paramHasAttr(j, Attribute::StructRet))
Flags.setSRet();
- if (F.paramHasAttr(j, ParamAttr::ByVal)) {
+ if (F.paramHasAttr(j, Attribute::ByVal)) {
Flags.setByVal();
const PointerType *Ty = cast<PointerType>(I->getType());
const Type *ElementTy = Ty->getElementType();
@@ -5147,7 +5147,7 @@
Flags.setByValAlign(FrameAlign);
Flags.setByValSize(FrameSize);
}
- if (F.paramHasAttr(j, ParamAttr::Nest))
+ if (F.paramHasAttr(j, Attribute::Nest))
Flags.setNest();
Flags.setOrigAlign(OriginalAlignment);
@@ -5214,9 +5214,9 @@
Parts[j] = SDValue(Result, i++);
ISD::NodeType AssertOp = ISD::DELETED_NODE;
- if (F.paramHasAttr(Idx, ParamAttr::SExt))
+ if (F.paramHasAttr(Idx, Attribute::SExt))
AssertOp = ISD::AssertSext;
- else if (F.paramHasAttr(Idx, ParamAttr::ZExt))
+ else if (F.paramHasAttr(Idx, Attribute::ZExt))
AssertOp = ISD::AssertZext;
ArgValues.push_back(getCopyFromParts(DAG, &Parts[0], NumParts, PartVT, VT,
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp?rev=56622&r1=56621&r2=56622&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Thu Sep 25 16:00:45 2008
@@ -728,7 +728,7 @@
unsigned j = 1;
for (Function::arg_iterator I = Fn.arg_begin(), E = Fn.arg_end();
I != E; ++I, ++j)
- if (Fn.paramHasAttr(j, ParamAttr::ByVal)) {
+ if (Fn.paramHasAttr(j, Attribute::ByVal)) {
if (EnableFastISelVerbose || EnableFastISelAbort)
cerr << "FastISel skips entry block due to byval argument\n";
SuppressFastISel = true;
Modified: llvm/trunk/lib/CodeGen/ShadowStackGC.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/ShadowStackGC.cpp?rev=56622&r1=56621&r2=56622&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/ShadowStackGC.cpp (original)
+++ llvm/trunk/lib/CodeGen/ShadowStackGC.cpp Thu Sep 25 16:00:45 2008
@@ -162,7 +162,7 @@
Args.begin(), Args.end(),
CI->getName(), CallBB);
II->setCallingConv(CI->getCallingConv());
- II->setParamAttrs(CI->getParamAttrs());
+ II->setAttributes(CI->getAttributes());
CI->replaceAllUsesWith(II);
delete CI;
}
Modified: llvm/trunk/lib/ExecutionEngine/Interpreter/Execution.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/Interpreter/Execution.cpp?rev=56622&r1=56621&r2=56622&view=diff
==============================================================================
--- llvm/trunk/lib/ExecutionEngine/Interpreter/Execution.cpp (original)
+++ llvm/trunk/lib/ExecutionEngine/Interpreter/Execution.cpp Thu Sep 25 16:00:45 2008
@@ -909,9 +909,9 @@
// according to the parameter attributes
const Type *Ty = V->getType();
if (Ty->isInteger() && (ArgVals.back().IntVal.getBitWidth() < 32)) {
- if (CS.paramHasAttr(pNum, ParamAttr::ZExt))
+ if (CS.paramHasAttr(pNum, Attribute::ZExt))
ArgVals.back().IntVal = ArgVals.back().IntVal.zext(32);
- else if (CS.paramHasAttr(pNum, ParamAttr::SExt))
+ else if (CS.paramHasAttr(pNum, Attribute::SExt))
ArgVals.back().IntVal = ArgVals.back().IntVal.sext(32);
}
}
Modified: llvm/trunk/lib/Target/CBackend/CBackend.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/CBackend/CBackend.cpp?rev=56622&r1=56621&r2=56622&view=diff
==============================================================================
--- llvm/trunk/lib/Target/CBackend/CBackend.cpp (original)
+++ llvm/trunk/lib/Target/CBackend/CBackend.cpp Thu Sep 25 16:00:45 2008
@@ -131,12 +131,12 @@
bool isSigned = false,
const std::string &VariableName = "",
bool IgnoreName = false,
- const PAListPtr &PAL = PAListPtr());
+ const AttrListPtr &PAL = AttrListPtr());
std::ostream &printType(std::ostream &Out, const Type *Ty,
bool isSigned = false,
const std::string &VariableName = "",
bool IgnoreName = false,
- const PAListPtr &PAL = PAListPtr());
+ const AttrListPtr &PAL = AttrListPtr());
raw_ostream &printSimpleType(raw_ostream &Out, const Type *Ty,
bool isSigned,
const std::string &NameSoFar = "");
@@ -145,7 +145,7 @@
const std::string &NameSoFar = "");
void printStructReturnPointerFunctionType(raw_ostream &Out,
- const PAListPtr &PAL,
+ const AttrListPtr &PAL,
const PointerType *Ty);
/// writeOperandDeref - Print the result of dereferencing the specified
@@ -408,7 +408,7 @@
/// return type, except, instead of printing the type as void (*)(Struct*, ...)
/// print it as "Struct (*)(...)", for struct return functions.
void CWriter::printStructReturnPointerFunctionType(raw_ostream &Out,
- const PAListPtr &PAL,
+ const AttrListPtr &PAL,
const PointerType *TheTy) {
const FunctionType *FTy = cast<FunctionType>(TheTy->getElementType());
std::stringstream FunctionInnards;
@@ -422,12 +422,12 @@
if (PrintedType)
FunctionInnards << ", ";
const Type *ArgTy = *I;
- if (PAL.paramHasAttr(Idx, ParamAttr::ByVal)) {
+ if (PAL.paramHasAttr(Idx, Attribute::ByVal)) {
assert(isa<PointerType>(ArgTy));
ArgTy = cast<PointerType>(ArgTy)->getElementType();
}
printType(FunctionInnards, ArgTy,
- /*isSigned=*/PAL.paramHasAttr(Idx, ParamAttr::SExt), "");
+ /*isSigned=*/PAL.paramHasAttr(Idx, Attribute::SExt), "");
PrintedType = true;
}
if (FTy->isVarArg()) {
@@ -439,7 +439,7 @@
FunctionInnards << ')';
std::string tstr = FunctionInnards.str();
printType(Out, RetTy,
- /*isSigned=*/PAL.paramHasAttr(0, ParamAttr::SExt), tstr);
+ /*isSigned=*/PAL.paramHasAttr(0, Attribute::SExt), tstr);
}
raw_ostream &
@@ -537,7 +537,7 @@
//
raw_ostream &CWriter::printType(raw_ostream &Out, const Type *Ty,
bool isSigned, const std::string &NameSoFar,
- bool IgnoreName, const PAListPtr &PAL) {
+ bool IgnoreName, const AttrListPtr &PAL) {
if (Ty->isPrimitiveType() || Ty->isInteger() || isa<VectorType>(Ty)) {
printSimpleType(Out, Ty, isSigned, NameSoFar);
return Out;
@@ -558,14 +558,14 @@
for (FunctionType::param_iterator I = FTy->param_begin(),
E = FTy->param_end(); I != E; ++I) {
const Type *ArgTy = *I;
- if (PAL.paramHasAttr(Idx, ParamAttr::ByVal)) {
+ if (PAL.paramHasAttr(Idx, Attribute::ByVal)) {
assert(isa<PointerType>(ArgTy));
ArgTy = cast<PointerType>(ArgTy)->getElementType();
}
if (I != FTy->param_begin())
FunctionInnards << ", ";
printType(FunctionInnards, ArgTy,
- /*isSigned=*/PAL.paramHasAttr(Idx, ParamAttr::SExt), "");
+ /*isSigned=*/PAL.paramHasAttr(Idx, Attribute::SExt), "");
++Idx;
}
if (FTy->isVarArg()) {
@@ -577,7 +577,7 @@
FunctionInnards << ')';
std::string tstr = FunctionInnards.str();
printType(Out, FTy->getReturnType(),
- /*isSigned=*/PAL.paramHasAttr(0, ParamAttr::SExt), tstr);
+ /*isSigned=*/PAL.paramHasAttr(0, Attribute::SExt), tstr);
return Out;
}
case Type::StructTyID: {
@@ -642,7 +642,7 @@
//
std::ostream &CWriter::printType(std::ostream &Out, const Type *Ty,
bool isSigned, const std::string &NameSoFar,
- bool IgnoreName, const PAListPtr &PAL) {
+ bool IgnoreName, const AttrListPtr &PAL) {
if (Ty->isPrimitiveType() || Ty->isInteger() || isa<VectorType>(Ty)) {
printSimpleType(Out, Ty, isSigned, NameSoFar);
return Out;
@@ -663,14 +663,14 @@
for (FunctionType::param_iterator I = FTy->param_begin(),
E = FTy->param_end(); I != E; ++I) {
const Type *ArgTy = *I;
- if (PAL.paramHasAttr(Idx, ParamAttr::ByVal)) {
+ if (PAL.paramHasAttr(Idx, Attribute::ByVal)) {
assert(isa<PointerType>(ArgTy));
ArgTy = cast<PointerType>(ArgTy)->getElementType();
}
if (I != FTy->param_begin())
FunctionInnards << ", ";
printType(FunctionInnards, ArgTy,
- /*isSigned=*/PAL.paramHasAttr(Idx, ParamAttr::SExt), "");
+ /*isSigned=*/PAL.paramHasAttr(Idx, Attribute::SExt), "");
++Idx;
}
if (FTy->isVarArg()) {
@@ -682,7 +682,7 @@
FunctionInnards << ')';
std::string tstr = FunctionInnards.str();
printType(Out, FTy->getReturnType(),
- /*isSigned=*/PAL.paramHasAttr(0, ParamAttr::SExt), tstr);
+ /*isSigned=*/PAL.paramHasAttr(0, Attribute::SExt), tstr);
return Out;
}
case Type::StructTyID: {
@@ -2162,7 +2162,7 @@
// Loop over the arguments, printing them...
const FunctionType *FT = cast<FunctionType>(F->getFunctionType());
- const PAListPtr &PAL = F->getParamAttrs();
+ const AttrListPtr &PAL = F->getAttributes();
std::stringstream FunctionInnards;
@@ -2191,12 +2191,12 @@
else
ArgName = "";
const Type *ArgTy = I->getType();
- if (PAL.paramHasAttr(Idx, ParamAttr::ByVal)) {
+ if (PAL.paramHasAttr(Idx, Attribute::ByVal)) {
ArgTy = cast<PointerType>(ArgTy)->getElementType();
ByValParams.insert(I);
}
printType(FunctionInnards, ArgTy,
- /*isSigned=*/PAL.paramHasAttr(Idx, ParamAttr::SExt),
+ /*isSigned=*/PAL.paramHasAttr(Idx, Attribute::SExt),
ArgName);
PrintedArg = true;
++Idx;
@@ -2218,12 +2218,12 @@
for (; I != E; ++I) {
if (PrintedArg) FunctionInnards << ", ";
const Type *ArgTy = *I;
- if (PAL.paramHasAttr(Idx, ParamAttr::ByVal)) {
+ if (PAL.paramHasAttr(Idx, Attribute::ByVal)) {
assert(isa<PointerType>(ArgTy));
ArgTy = cast<PointerType>(ArgTy)->getElementType();
}
printType(FunctionInnards, ArgTy,
- /*isSigned=*/PAL.paramHasAttr(Idx, ParamAttr::SExt));
+ /*isSigned=*/PAL.paramHasAttr(Idx, Attribute::SExt));
PrintedArg = true;
++Idx;
}
@@ -2251,7 +2251,7 @@
// Print out the return type and the signature built above.
printType(Out, RetTy,
- /*isSigned=*/PAL.paramHasAttr(0, ParamAttr::SExt),
+ /*isSigned=*/PAL.paramHasAttr(0, Attribute::SExt),
FunctionInnards.str());
}
@@ -2844,7 +2844,7 @@
// If this is a call to a struct-return function, assign to the first
// parameter instead of passing it to the call.
- const PAListPtr &PAL = I.getParamAttrs();
+ const AttrListPtr &PAL = I.getAttributes();
bool hasByVal = I.hasByValArgument();
bool isStructRet = I.hasStructRetAttr();
if (isStructRet) {
@@ -2912,11 +2912,11 @@
(*AI)->getType() != FTy->getParamType(ArgNo)) {
Out << '(';
printType(Out, FTy->getParamType(ArgNo),
- /*isSigned=*/PAL.paramHasAttr(ArgNo+1, ParamAttr::SExt));
+ /*isSigned=*/PAL.paramHasAttr(ArgNo+1, Attribute::SExt));
Out << ')';
}
// Check if the argument is expected to be passed by value.
- if (I.paramHasAttr(ArgNo+1, ParamAttr::ByVal))
+ if (I.paramHasAttr(ArgNo+1, Attribute::ByVal))
writeOperandDeref(*AI);
else
writeOperand(*AI);
Modified: llvm/trunk/lib/Target/CppBackend/CPPBackend.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/CppBackend/CPPBackend.cpp?rev=56622&r1=56621&r2=56622&view=diff
==============================================================================
--- llvm/trunk/lib/Target/CppBackend/CPPBackend.cpp (original)
+++ llvm/trunk/lib/Target/CppBackend/CPPBackend.cpp Thu Sep 25 16:00:45 2008
@@ -133,7 +133,7 @@
std::string getCppName(const Value* val);
inline void printCppName(const Value* val);
- void printParamAttrs(const PAListPtr &PAL, const std::string &name);
+ void printAttributes(const AttrListPtr &PAL, const std::string &name);
bool printTypeInternal(const Type* Ty);
inline void printType(const Type* Ty);
void printTypes(const Module* M);
@@ -428,46 +428,46 @@
printEscapedString(getCppName(val));
}
- void CppWriter::printParamAttrs(const PAListPtr &PAL,
+ void CppWriter::printAttributes(const AttrListPtr &PAL,
const std::string &name) {
- Out << "PAListPtr " << name << "_PAL;";
+ Out << "AttrListPtr " << name << "_PAL;";
nl(Out);
if (!PAL.isEmpty()) {
Out << '{'; in(); nl(Out);
- Out << "SmallVector<FnAttributeWithIndex, 4> Attrs;"; nl(Out);
- Out << "FnAttributeWithIndex PAWI;"; nl(Out);
+ Out << "SmallVector<AttributeWithIndex, 4> Attrs;"; nl(Out);
+ Out << "AttributeWithIndex PAWI;"; nl(Out);
for (unsigned i = 0; i < PAL.getNumSlots(); ++i) {
uint16_t index = PAL.getSlot(i).Index;
Attributes attrs = PAL.getSlot(i).Attrs;
Out << "PAWI.Index = " << index << "; PAWI.Attrs = 0 ";
- if (attrs & ParamAttr::SExt)
- Out << " | ParamAttr::SExt";
- if (attrs & ParamAttr::ZExt)
- Out << " | ParamAttr::ZExt";
- if (attrs & ParamAttr::StructRet)
- Out << " | ParamAttr::StructRet";
- if (attrs & ParamAttr::InReg)
- Out << " | ParamAttr::InReg";
- if (attrs & ParamAttr::NoReturn)
- Out << " | ParamAttr::NoReturn";
- if (attrs & ParamAttr::NoUnwind)
- Out << " | ParamAttr::NoUnwind";
- if (attrs & ParamAttr::ByVal)
- Out << " | ParamAttr::ByVal";
- if (attrs & ParamAttr::NoAlias)
- Out << " | ParamAttr::NoAlias";
- if (attrs & ParamAttr::Nest)
- Out << " | ParamAttr::Nest";
- if (attrs & ParamAttr::ReadNone)
- Out << " | ParamAttr::ReadNone";
- if (attrs & ParamAttr::ReadOnly)
- Out << " | ParamAttr::ReadOnly";
+ if (attrs & Attribute::SExt)
+ Out << " | Attribute::SExt";
+ if (attrs & Attribute::ZExt)
+ Out << " | Attribute::ZExt";
+ if (attrs & Attribute::StructRet)
+ Out << " | Attribute::StructRet";
+ if (attrs & Attribute::InReg)
+ Out << " | Attribute::InReg";
+ if (attrs & Attribute::NoReturn)
+ Out << " | Attribute::NoReturn";
+ if (attrs & Attribute::NoUnwind)
+ Out << " | Attribute::NoUnwind";
+ if (attrs & Attribute::ByVal)
+ Out << " | Attribute::ByVal";
+ if (attrs & Attribute::NoAlias)
+ Out << " | Attribute::NoAlias";
+ if (attrs & Attribute::Nest)
+ Out << " | Attribute::Nest";
+ if (attrs & Attribute::ReadNone)
+ Out << " | Attribute::ReadNone";
+ if (attrs & Attribute::ReadOnly)
+ Out << " | Attribute::ReadOnly";
Out << ";";
nl(Out);
Out << "Attrs.push_back(PAWI);";
nl(Out);
}
- Out << name << "_PAL = PAListPtr::get(Attrs.begin(), Attrs.end());";
+ Out << name << "_PAL = AttrListPtr::get(Attrs.begin(), Attrs.end());";
nl(Out);
out(); nl(Out);
Out << '}'; nl(Out);
@@ -1127,8 +1127,8 @@
nl(Out) << iName << "->setCallingConv(";
printCallingConv(inv->getCallingConv());
Out << ");";
- printParamAttrs(inv->getParamAttrs(), iName);
- Out << iName << "->setParamAttrs(" << iName << "_PAL);";
+ printAttributes(inv->getAttributes(), iName);
+ Out << iName << "->setAttributes(" << iName << "_PAL);";
nl(Out);
break;
}
@@ -1390,8 +1390,8 @@
nl(Out) << iName << "->setTailCall("
<< (call->isTailCall() ? "true":"false");
Out << ");";
- printParamAttrs(call->getParamAttrs(), iName);
- Out << iName << "->setParamAttrs(" << iName << "_PAL);";
+ printAttributes(call->getAttributes(), iName);
+ Out << iName << "->setAttributes(" << iName << "_PAL);";
nl(Out);
break;
}
@@ -1614,9 +1614,9 @@
Out << "}";
nl(Out);
}
- printParamAttrs(F->getParamAttrs(), getCppName(F));
+ printAttributes(F->getAttributes(), getCppName(F));
printCppName(F);
- Out << "->setParamAttrs(" << getCppName(F) << "_PAL);";
+ Out << "->setAttributes(" << getCppName(F) << "_PAL);";
nl(Out);
}
Modified: llvm/trunk/lib/Target/MSIL/MSILWriter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/MSIL/MSILWriter.cpp?rev=56622&r1=56621&r2=56622&view=diff
==============================================================================
--- llvm/trunk/lib/Target/MSIL/MSILWriter.cpp (original)
+++ llvm/trunk/lib/Target/MSIL/MSILWriter.cpp Thu Sep 25 16:00:45 2008
@@ -1392,7 +1392,7 @@
void MSILWriter::printFunction(const Function& F) {
- bool isSigned = F.paramHasAttr(0, ParamAttr::SExt);
+ bool isSigned = F.paramHasAttr(0, Attribute::SExt);
Out << "\n.method static ";
Out << (F.hasInternalLinkage() ? "private " : "public ");
if (F.isVarArg()) Out << "vararg ";
@@ -1403,7 +1403,7 @@
unsigned ArgIdx = 1;
for (Function::const_arg_iterator I = F.arg_begin(), E = F.arg_end(); I!=E;
++I, ++ArgIdx) {
- isSigned = F.paramHasAttr(ArgIdx, ParamAttr::SExt);
+ isSigned = F.paramHasAttr(ArgIdx, Attribute::SExt);
if (I!=F.arg_begin()) Out << ", ";
Out << getTypeName(I->getType(),isSigned) << getValueName(I);
}
Modified: llvm/trunk/lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.cpp?rev=56622&r1=56621&r2=56622&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.cpp (original)
+++ llvm/trunk/lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.cpp Thu Sep 25 16:00:45 2008
@@ -71,7 +71,7 @@
const Type* Ty = AI->getType();
// 'Dereference' type in case of byval parameter attribute
- if (F->paramHasAttr(argNum, ParamAttr::ByVal))
+ if (F->paramHasAttr(argNum, Attribute::ByVal))
Ty = cast<PointerType>(Ty)->getElementType();
// Size should be aligned to DWORD boundary
@@ -154,7 +154,7 @@
SwitchToSection(TAI->SectionForGlobal(F));
unsigned FnAlign = OptimizeForSize ? 1 : 4;
- if (!F->isDeclaration() && F->hasNote(FnAttr::OptimizeForSize))
+ if (!F->isDeclaration() && F->hasNote(Attribute::OptimizeForSize))
FnAlign = 1;
switch (F->getLinkage()) {
default: assert(0 && "Unknown linkage type!");
Modified: llvm/trunk/lib/Target/X86/AsmPrinter/X86IntelAsmPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/AsmPrinter/X86IntelAsmPrinter.cpp?rev=56622&r1=56621&r2=56622&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/AsmPrinter/X86IntelAsmPrinter.cpp (original)
+++ llvm/trunk/lib/Target/X86/AsmPrinter/X86IntelAsmPrinter.cpp Thu Sep 25 16:00:45 2008
@@ -54,7 +54,7 @@
const Type* Ty = AI->getType();
// 'Dereference' type in case of byval parameter attribute
- if (F->paramHasAttr(argNum, ParamAttr::ByVal))
+ if (F->paramHasAttr(argNum, Attribute::ByVal))
Ty = cast<PointerType>(Ty)->getElementType();
// Size should be aligned to DWORD boundary
@@ -141,7 +141,7 @@
SwitchToTextSection("_text", F);
unsigned FnAlign = OptimizeForSize ? 1 : 4;
- if (!F->isDeclaration() && F->hasNote(FnAttr::OptimizeForSize))
+ if (!F->isDeclaration() && F->hasNote(Attribute::OptimizeForSize))
FnAlign = 1;
switch (F->getLinkage()) {
default: assert(0 && "Unsupported linkage type!");
Modified: llvm/trunk/lib/Target/X86/X86FastISel.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86FastISel.cpp?rev=56622&r1=56621&r2=56622&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86FastISel.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86FastISel.cpp Thu Sep 25 16:00:45 2008
@@ -898,16 +898,16 @@
return false;
ISD::ArgFlagsTy Flags;
unsigned AttrInd = i - CS.arg_begin() + 1;
- if (CS.paramHasAttr(AttrInd, ParamAttr::SExt))
+ if (CS.paramHasAttr(AttrInd, Attribute::SExt))
Flags.setSExt();
- if (CS.paramHasAttr(AttrInd, ParamAttr::ZExt))
+ if (CS.paramHasAttr(AttrInd, Attribute::ZExt))
Flags.setZExt();
// FIXME: Only handle *easy* calls for now.
- if (CS.paramHasAttr(AttrInd, ParamAttr::InReg) ||
- CS.paramHasAttr(AttrInd, ParamAttr::StructRet) ||
- CS.paramHasAttr(AttrInd, ParamAttr::Nest) ||
- CS.paramHasAttr(AttrInd, ParamAttr::ByVal))
+ if (CS.paramHasAttr(AttrInd, Attribute::InReg) ||
+ CS.paramHasAttr(AttrInd, Attribute::StructRet) ||
+ CS.paramHasAttr(AttrInd, Attribute::Nest) ||
+ CS.paramHasAttr(AttrInd, Attribute::ByVal))
return false;
const Type *ArgTy = (*i)->getType();
Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelLowering.cpp?rev=56622&r1=56621&r2=56622&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86ISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Thu Sep 25 16:00:45 2008
@@ -5757,7 +5757,7 @@
// Check that ECX wasn't needed by an 'inreg' parameter.
const FunctionType *FTy = Func->getFunctionType();
- const PAListPtr &Attrs = Func->getParamAttrs();
+ const AttrListPtr &Attrs = Func->getAttributes();
if (!Attrs.isEmpty() && !Func->isVarArg()) {
unsigned InRegCount = 0;
@@ -5765,7 +5765,7 @@
for (FunctionType::param_iterator I = FTy->param_begin(),
E = FTy->param_end(); I != E; ++I, ++Idx)
- if (Attrs.paramHasAttr(Idx, ParamAttr::InReg))
+ if (Attrs.paramHasAttr(Idx, Attribute::InReg))
// FIXME: should only count parameters that are lowered to integers.
InRegCount += (TD->getTypeSizeInBits(*I) + 31) / 32;
Modified: llvm/trunk/lib/Transforms/IPO/AddReadAttrs.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/IPO/AddReadAttrs.cpp?rev=56622&r1=56621&r2=56622&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/IPO/AddReadAttrs.cpp (original)
+++ llvm/trunk/lib/Transforms/IPO/AddReadAttrs.cpp Thu Sep 25 16:00:45 2008
@@ -105,10 +105,10 @@
MadeChange = true;
// Clear out any existing attributes.
- F->removeParamAttr(0, ParamAttr::ReadOnly | ParamAttr::ReadNone);
+ F->removeAttribute(0, Attribute::ReadOnly | Attribute::ReadNone);
// Add in the new attribute.
- F->addParamAttr(0, ReadsMemory ? ParamAttr::ReadOnly : ParamAttr::ReadNone);
+ F->addAttribute(0, ReadsMemory ? Attribute::ReadOnly : Attribute::ReadNone);
if (ReadsMemory)
NumReadOnly++;
Modified: llvm/trunk/lib/Transforms/IPO/ArgumentPromotion.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/IPO/ArgumentPromotion.cpp?rev=56622&r1=56621&r2=56622&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/IPO/ArgumentPromotion.cpp (original)
+++ llvm/trunk/lib/Transforms/IPO/ArgumentPromotion.cpp Thu Sep 25 16:00:45 2008
@@ -144,7 +144,7 @@
SmallPtrSet<Argument*, 8> ArgsToPromote;
SmallPtrSet<Argument*, 8> ByValArgsToTransform;
for (unsigned i = 0; i != PointerArgs.size(); ++i) {
- bool isByVal = F->paramHasAttr(PointerArgs[i].second+1, ParamAttr::ByVal);
+ bool isByVal = F->paramHasAttr(PointerArgs[i].second+1, Attribute::ByVal);
// If this is a byval argument, and if the aggregate type is small, just
// pass the elements, which is always safe.
@@ -501,15 +501,15 @@
// what the new GEP/Load instructions we are inserting look like.
std::map<IndicesVector, LoadInst*> OriginalLoads;
- // ParamAttrs - Keep track of the parameter attributes for the arguments
+ // Attributes - Keep track of the parameter attributes for the arguments
// that we are *not* promoting. For the ones that we do promote, the parameter
// attributes are lost
- SmallVector<FnAttributeWithIndex, 8> ParamAttrsVec;
- const PAListPtr &PAL = F->getParamAttrs();
+ SmallVector<AttributeWithIndex, 8> AttributesVec;
+ const AttrListPtr &PAL = F->getAttributes();
// Add any return attributes.
- if (Attributes attrs = PAL.getParamAttrs(0))
- ParamAttrsVec.push_back(FnAttributeWithIndex::get(0, attrs));
+ if (Attributes attrs = PAL.getAttributes(0))
+ AttributesVec.push_back(AttributeWithIndex::get(0, attrs));
// First, determine the new argument list
unsigned ArgIndex = 1;
@@ -525,8 +525,8 @@
} else if (!ArgsToPromote.count(I)) {
// Unchanged argument
Params.push_back(I->getType());
- if (Attributes attrs = PAL.getParamAttrs(ArgIndex))
- ParamAttrsVec.push_back(FnAttributeWithIndex::get(Params.size(), attrs));
+ if (Attributes attrs = PAL.getAttributes(ArgIndex))
+ AttributesVec.push_back(AttributeWithIndex::get(Params.size(), attrs));
} else if (I->use_empty()) {
// Dead argument (which are always marked as promotable)
++NumArgumentsDead;
@@ -597,8 +597,8 @@
// Recompute the parameter attributes list based on the new arguments for
// the function.
- NF->setParamAttrs(PAListPtr::get(ParamAttrsVec.begin(), ParamAttrsVec.end()));
- ParamAttrsVec.clear();
+ NF->setAttributes(AttrListPtr::get(AttributesVec.begin(), AttributesVec.end()));
+ AttributesVec.clear();
F->getParent()->getFunctionList().insert(F, NF);
NF->takeName(F);
@@ -618,11 +618,11 @@
while (!F->use_empty()) {
CallSite CS = CallSite::get(F->use_back());
Instruction *Call = CS.getInstruction();
- const PAListPtr &CallPAL = CS.getParamAttrs();
+ const AttrListPtr &CallPAL = CS.getAttributes();
// Add any return attributes.
- if (Attributes attrs = CallPAL.getParamAttrs(0))
- ParamAttrsVec.push_back(FnAttributeWithIndex::get(0, attrs));
+ if (Attributes attrs = CallPAL.getAttributes(0))
+ AttributesVec.push_back(AttributeWithIndex::get(0, attrs));
// Loop over the operands, inserting GEP and loads in the caller as
// appropriate.
@@ -633,8 +633,8 @@
if (!ArgsToPromote.count(I) && !ByValArgsToTransform.count(I)) {
Args.push_back(*AI); // Unmodified argument
- if (Attributes Attrs = CallPAL.getParamAttrs(ArgIndex))
- ParamAttrsVec.push_back(FnAttributeWithIndex::get(Args.size(), Attrs));
+ if (Attributes Attrs = CallPAL.getAttributes(ArgIndex))
+ AttributesVec.push_back(AttributeWithIndex::get(Args.size(), Attrs));
} else if (ByValArgsToTransform.count(I)) {
// Emit a GEP and load for each element of the struct.
@@ -688,8 +688,8 @@
// Push any varargs arguments on the list
for (; AI != CS.arg_end(); ++AI, ++ArgIndex) {
Args.push_back(*AI);
- if (Attributes Attrs = CallPAL.getParamAttrs(ArgIndex))
- ParamAttrsVec.push_back(FnAttributeWithIndex::get(Args.size(), Attrs));
+ if (Attributes Attrs = CallPAL.getAttributes(ArgIndex))
+ AttributesVec.push_back(AttributeWithIndex::get(Args.size(), Attrs));
}
Instruction *New;
@@ -697,18 +697,18 @@
New = InvokeInst::Create(NF, II->getNormalDest(), II->getUnwindDest(),
Args.begin(), Args.end(), "", Call);
cast<InvokeInst>(New)->setCallingConv(CS.getCallingConv());
- cast<InvokeInst>(New)->setParamAttrs(PAListPtr::get(ParamAttrsVec.begin(),
- ParamAttrsVec.end()));
+ cast<InvokeInst>(New)->setAttributes(AttrListPtr::get(AttributesVec.begin(),
+ AttributesVec.end()));
} else {
New = CallInst::Create(NF, Args.begin(), Args.end(), "", Call);
cast<CallInst>(New)->setCallingConv(CS.getCallingConv());
- cast<CallInst>(New)->setParamAttrs(PAListPtr::get(ParamAttrsVec.begin(),
- ParamAttrsVec.end()));
+ cast<CallInst>(New)->setAttributes(AttrListPtr::get(AttributesVec.begin(),
+ AttributesVec.end()));
if (cast<CallInst>(Call)->isTailCall())
cast<CallInst>(New)->setTailCall();
}
Args.clear();
- ParamAttrsVec.clear();
+ AttributesVec.clear();
// Update the alias analysis implementation to know that we are replacing
// the old call with a new one.
Modified: llvm/trunk/lib/Transforms/IPO/DeadArgumentElimination.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/IPO/DeadArgumentElimination.cpp?rev=56622&r1=56621&r2=56622&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/IPO/DeadArgumentElimination.cpp (original)
+++ llvm/trunk/lib/Transforms/IPO/DeadArgumentElimination.cpp Thu Sep 25 16:00:45 2008
@@ -224,12 +224,12 @@
Args.assign(CS.arg_begin(), CS.arg_begin()+NumArgs);
// Drop any attributes that were on the vararg arguments.
- PAListPtr PAL = CS.getParamAttrs();
+ AttrListPtr PAL = CS.getAttributes();
if (!PAL.isEmpty() && PAL.getSlot(PAL.getNumSlots() - 1).Index > NumArgs) {
- SmallVector<FnAttributeWithIndex, 8> ParamAttrsVec;
+ SmallVector<AttributeWithIndex, 8> AttributesVec;
for (unsigned i = 0; PAL.getSlot(i).Index <= NumArgs; ++i)
- ParamAttrsVec.push_back(PAL.getSlot(i));
- PAL = PAListPtr::get(ParamAttrsVec.begin(), ParamAttrsVec.end());
+ AttributesVec.push_back(PAL.getSlot(i));
+ PAL = AttrListPtr::get(AttributesVec.begin(), AttributesVec.end());
}
Instruction *New;
@@ -237,11 +237,11 @@
New = InvokeInst::Create(NF, II->getNormalDest(), II->getUnwindDest(),
Args.begin(), Args.end(), "", Call);
cast<InvokeInst>(New)->setCallingConv(CS.getCallingConv());
- cast<InvokeInst>(New)->setParamAttrs(PAL);
+ cast<InvokeInst>(New)->setAttributes(PAL);
} else {
New = CallInst::Create(NF, Args.begin(), Args.end(), "", Call);
cast<CallInst>(New)->setCallingConv(CS.getCallingConv());
- cast<CallInst>(New)->setParamAttrs(PAL);
+ cast<CallInst>(New)->setAttributes(PAL);
if (cast<CallInst>(Call)->isTailCall())
cast<CallInst>(New)->setTailCall();
}
@@ -589,11 +589,11 @@
std::vector<const Type*> Params;
// Set up to build a new list of parameter attributes.
- SmallVector<FnAttributeWithIndex, 8> ParamAttrsVec;
- const PAListPtr &PAL = F->getParamAttrs();
+ SmallVector<AttributeWithIndex, 8> AttributesVec;
+ const AttrListPtr &PAL = F->getAttributes();
// The existing function return attributes.
- Attributes RAttrs = PAL.getParamAttrs(0);
+ Attributes RAttrs = PAL.getAttributes(0);
// Find out the new return value.
@@ -655,13 +655,13 @@
// here. Currently, this should not be possible, but special handling might be
// required when new return value attributes are added.
if (NRetTy == Type::VoidTy)
- RAttrs &= ~ParamAttr::typeIncompatible(NRetTy);
+ RAttrs &= ~Attribute::typeIncompatible(NRetTy);
else
- assert((RAttrs & ParamAttr::typeIncompatible(NRetTy)) == 0
+ assert((RAttrs & Attribute::typeIncompatible(NRetTy)) == 0
&& "Return attributes no longer compatible?");
if (RAttrs)
- ParamAttrsVec.push_back(FnAttributeWithIndex::get(0, RAttrs));
+ AttributesVec.push_back(AttributeWithIndex::get(0, RAttrs));
// Remember which arguments are still alive.
SmallVector<bool, 10> ArgAlive(FTy->getNumParams(), false);
@@ -678,8 +678,8 @@
// Get the original parameter attributes (skipping the first one, that is
// for the return value.
- if (Attributes Attrs = PAL.getParamAttrs(i + 1))
- ParamAttrsVec.push_back(FnAttributeWithIndex::get(Params.size(), Attrs));
+ if (Attributes Attrs = PAL.getAttributes(i + 1))
+ AttributesVec.push_back(AttributeWithIndex::get(Params.size(), Attrs));
} else {
++NumArgumentsEliminated;
DOUT << "DAE - Removing argument " << i << " (" << I->getNameStart()
@@ -687,8 +687,8 @@
}
}
- // Reconstruct the ParamAttrsList based on the vector we constructed.
- PAListPtr NewPAL = PAListPtr::get(ParamAttrsVec.begin(), ParamAttrsVec.end());
+ // Reconstruct the AttributesList based on the vector we constructed.
+ AttrListPtr NewPAL = AttrListPtr::get(AttributesVec.begin(), AttributesVec.end());
// Work around LLVM bug PR56: the CWriter cannot emit varargs functions which
// have zero fixed arguments.
@@ -712,7 +712,7 @@
// Create the new function body and insert it into the module...
Function *NF = Function::Create(NFTy, F->getLinkage());
NF->copyAttributesFrom(F);
- NF->setParamAttrs(NewPAL);
+ NF->setAttributes(NewPAL);
// Insert the new function before the old function, so we won't be processing
// it again.
F->getParent()->getFunctionList().insert(F, NF);
@@ -726,15 +726,15 @@
CallSite CS = CallSite::get(F->use_back());
Instruction *Call = CS.getInstruction();
- ParamAttrsVec.clear();
- const PAListPtr &CallPAL = CS.getParamAttrs();
+ AttributesVec.clear();
+ const AttrListPtr &CallPAL = CS.getAttributes();
// The call return attributes.
- Attributes RAttrs = CallPAL.getParamAttrs(0);
+ Attributes RAttrs = CallPAL.getAttributes(0);
// Adjust in case the function was changed to return void.
- RAttrs &= ~ParamAttr::typeIncompatible(NF->getReturnType());
+ RAttrs &= ~Attribute::typeIncompatible(NF->getReturnType());
if (RAttrs)
- ParamAttrsVec.push_back(FnAttributeWithIndex::get(0, RAttrs));
+ AttributesVec.push_back(AttributeWithIndex::get(0, RAttrs));
// Declare these outside of the loops, so we can reuse them for the second
// loop, which loops the varargs.
@@ -746,8 +746,8 @@
if (ArgAlive[i]) {
Args.push_back(*I);
// Get original parameter attributes, but skip return attributes.
- if (Attributes Attrs = CallPAL.getParamAttrs(i + 1))
- ParamAttrsVec.push_back(FnAttributeWithIndex::get(Args.size(), Attrs));
+ if (Attributes Attrs = CallPAL.getAttributes(i + 1))
+ AttributesVec.push_back(AttributeWithIndex::get(Args.size(), Attrs));
}
if (ExtraArgHack)
@@ -756,24 +756,24 @@
// Push any varargs arguments on the list. Don't forget their attributes.
for (CallSite::arg_iterator E = CS.arg_end(); I != E; ++I, ++i) {
Args.push_back(*I);
- if (Attributes Attrs = CallPAL.getParamAttrs(i + 1))
- ParamAttrsVec.push_back(FnAttributeWithIndex::get(Args.size(), Attrs));
+ if (Attributes Attrs = CallPAL.getAttributes(i + 1))
+ AttributesVec.push_back(AttributeWithIndex::get(Args.size(), Attrs));
}
- // Reconstruct the ParamAttrsList based on the vector we constructed.
- PAListPtr NewCallPAL = PAListPtr::get(ParamAttrsVec.begin(),
- ParamAttrsVec.end());
+ // Reconstruct the AttributesList based on the vector we constructed.
+ AttrListPtr NewCallPAL = AttrListPtr::get(AttributesVec.begin(),
+ AttributesVec.end());
Instruction *New;
if (InvokeInst *II = dyn_cast<InvokeInst>(Call)) {
New = InvokeInst::Create(NF, II->getNormalDest(), II->getUnwindDest(),
Args.begin(), Args.end(), "", Call);
cast<InvokeInst>(New)->setCallingConv(CS.getCallingConv());
- cast<InvokeInst>(New)->setParamAttrs(NewCallPAL);
+ cast<InvokeInst>(New)->setAttributes(NewCallPAL);
} else {
New = CallInst::Create(NF, Args.begin(), Args.end(), "", Call);
cast<CallInst>(New)->setCallingConv(CS.getCallingConv());
- cast<CallInst>(New)->setParamAttrs(NewCallPAL);
+ cast<CallInst>(New)->setAttributes(NewCallPAL);
if (cast<CallInst>(Call)->isTailCall())
cast<CallInst>(New)->setTailCall();
}
Modified: llvm/trunk/lib/Transforms/IPO/GlobalOpt.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/IPO/GlobalOpt.cpp?rev=56622&r1=56621&r2=56622&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/IPO/GlobalOpt.cpp (original)
+++ llvm/trunk/lib/Transforms/IPO/GlobalOpt.cpp Thu Sep 25 16:00:45 2008
@@ -1627,23 +1627,23 @@
}
}
-static PAListPtr StripNest(const PAListPtr &Attrs) {
+static AttrListPtr StripNest(const AttrListPtr &Attrs) {
for (unsigned i = 0, e = Attrs.getNumSlots(); i != e; ++i) {
- if ((Attrs.getSlot(i).Attrs & ParamAttr::Nest) == 0)
+ if ((Attrs.getSlot(i).Attrs & Attribute::Nest) == 0)
continue;
// There can be only one.
- return Attrs.removeAttr(Attrs.getSlot(i).Index, ParamAttr::Nest);
+ return Attrs.removeAttr(Attrs.getSlot(i).Index, Attribute::Nest);
}
return Attrs;
}
static void RemoveNestAttribute(Function *F) {
- F->setParamAttrs(StripNest(F->getParamAttrs()));
+ F->setAttributes(StripNest(F->getAttributes()));
for (Value::use_iterator UI = F->use_begin(), E = F->use_end(); UI != E;++UI){
CallSite User(cast<Instruction>(*UI));
- User.setParamAttrs(StripNest(User.getParamAttrs()));
+ User.setAttributes(StripNest(User.getAttributes()));
}
}
@@ -1670,7 +1670,7 @@
Changed = true;
}
- if (F->getParamAttrs().hasAttrSomewhere(ParamAttr::Nest) &&
+ if (F->getAttributes().hasAttrSomewhere(Attribute::Nest) &&
OnlyCalledDirectly(F)) {
// The function is not used by a trampoline intrinsic, so it is safe
// to remove the 'nest' attribute.
Modified: llvm/trunk/lib/Transforms/IPO/InlineAlways.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/IPO/InlineAlways.cpp?rev=56622&r1=56621&r2=56622&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/IPO/InlineAlways.cpp (original)
+++ llvm/trunk/lib/Transforms/IPO/InlineAlways.cpp Thu Sep 25 16:00:45 2008
@@ -63,7 +63,7 @@
for (Module::iterator I = M.begin(), E = M.end();
I != E; ++I)
- if (!I->isDeclaration() && !I->hasNote(FnAttr::AlwaysInline))
+ if (!I->isDeclaration() && !I->hasNote(Attribute::AlwaysInline))
NeverInline.insert(I);
return false;
Modified: llvm/trunk/lib/Transforms/IPO/InlineSimple.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/IPO/InlineSimple.cpp?rev=56622&r1=56621&r2=56622&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/IPO/InlineSimple.cpp (original)
+++ llvm/trunk/lib/Transforms/IPO/InlineSimple.cpp Thu Sep 25 16:00:45 2008
@@ -65,7 +65,7 @@
for (Module::iterator I = M.begin(), E = M.end();
I != E; ++I)
- if (!I->isDeclaration() && I->hasNote(FnAttr::NoInline))
+ if (!I->isDeclaration() && I->hasNote(Attribute::NoInline))
NeverInline.insert(I);
// Get llvm.noinline
Modified: llvm/trunk/lib/Transforms/IPO/Inliner.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/IPO/Inliner.cpp?rev=56622&r1=56621&r2=56622&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/IPO/Inliner.cpp (original)
+++ llvm/trunk/lib/Transforms/IPO/Inliner.cpp Thu Sep 25 16:00:45 2008
@@ -141,7 +141,7 @@
int CurrentThreshold = InlineThreshold;
Function *Fn = CS.getCaller();
- if (Fn && !Fn->isDeclaration() && Fn->hasNote(FnAttr::OptimizeForSize)
+ if (Fn && !Fn->isDeclaration() && Fn->hasNote(Attribute::OptimizeForSize)
&& InlineThreshold != 50) {
CurrentThreshold = 50;
}
Modified: llvm/trunk/lib/Transforms/IPO/LowerSetJmp.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/IPO/LowerSetJmp.cpp?rev=56622&r1=56621&r2=56622&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/IPO/LowerSetJmp.cpp (original)
+++ llvm/trunk/lib/Transforms/IPO/LowerSetJmp.cpp Thu Sep 25 16:00:45 2008
@@ -474,7 +474,7 @@
InvokeInst::Create(CI.getCalledValue(), NewBB, PrelimBBMap[Func],
Params.begin(), Params.end(), CI.getName(), Term);
II->setCallingConv(CI.getCallingConv());
- II->setParamAttrs(CI.getParamAttrs());
+ II->setAttributes(CI.getAttributes());
// Replace the old call inst with the invoke inst and remove the call.
CI.replaceAllUsesWith(II);
Modified: llvm/trunk/lib/Transforms/IPO/PruneEH.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/IPO/PruneEH.cpp?rev=56622&r1=56621&r2=56622&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/IPO/PruneEH.cpp (original)
+++ llvm/trunk/lib/Transforms/IPO/PruneEH.cpp Thu Sep 25 16:00:45 2008
@@ -125,18 +125,18 @@
// If the SCC doesn't unwind or doesn't throw, note this fact.
if (!SCCMightUnwind || !SCCMightReturn)
for (unsigned i = 0, e = SCC.size(); i != e; ++i) {
- Attributes NewAttributes = ParamAttr::None;
+ Attributes NewAttributes = Attribute::None;
if (!SCCMightUnwind)
- NewAttributes |= ParamAttr::NoUnwind;
+ NewAttributes |= Attribute::NoUnwind;
if (!SCCMightReturn)
- NewAttributes |= ParamAttr::NoReturn;
+ NewAttributes |= Attribute::NoReturn;
- const PAListPtr &PAL = SCC[i]->getFunction()->getParamAttrs();
- const PAListPtr &NPAL = PAL.addAttr(0, NewAttributes);
+ const AttrListPtr &PAL = SCC[i]->getFunction()->getAttributes();
+ const AttrListPtr &NPAL = PAL.addAttr(0, NewAttributes);
if (PAL != NPAL) {
MadeChange = true;
- SCC[i]->getFunction()->setParamAttrs(NPAL);
+ SCC[i]->getFunction()->setAttributes(NPAL);
}
}
@@ -169,7 +169,7 @@
Args.begin(), Args.end(), "", II);
Call->takeName(II);
Call->setCallingConv(II->getCallingConv());
- Call->setParamAttrs(II->getParamAttrs());
+ Call->setAttributes(II->getAttributes());
// Anything that used the value produced by the invoke instruction
// now uses the value produced by the call instruction.
Modified: llvm/trunk/lib/Transforms/IPO/StructRetPromotion.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/IPO/StructRetPromotion.cpp?rev=56622&r1=56621&r2=56622&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/IPO/StructRetPromotion.cpp (original)
+++ llvm/trunk/lib/Transforms/IPO/StructRetPromotion.cpp Thu Sep 25 16:00:45 2008
@@ -205,13 +205,13 @@
const FunctionType *FTy = F->getFunctionType();
std::vector<const Type*> Params;
- // ParamAttrs - Keep track of the parameter attributes for the arguments.
- SmallVector<FnAttributeWithIndex, 8> ParamAttrsVec;
- const PAListPtr &PAL = F->getParamAttrs();
+ // Attributes - Keep track of the parameter attributes for the arguments.
+ SmallVector<AttributeWithIndex, 8> AttributesVec;
+ const AttrListPtr &PAL = F->getAttributes();
// Add any return attributes.
- if (Attributes attrs = PAL.getParamAttrs(0))
- ParamAttrsVec.push_back(FnAttributeWithIndex::get(0, attrs));
+ if (Attributes attrs = PAL.getAttributes(0))
+ AttributesVec.push_back(AttributeWithIndex::get(0, attrs));
// Skip first argument.
Function::arg_iterator I = F->arg_begin(), E = F->arg_end();
@@ -221,8 +221,8 @@
unsigned ParamIndex = 2;
while (I != E) {
Params.push_back(I->getType());
- if (Attributes Attrs = PAL.getParamAttrs(ParamIndex))
- ParamAttrsVec.push_back(FnAttributeWithIndex::get(ParamIndex - 1, Attrs));
+ if (Attributes Attrs = PAL.getAttributes(ParamIndex))
+ AttributesVec.push_back(AttributeWithIndex::get(ParamIndex - 1, Attrs));
++I;
++ParamIndex;
}
@@ -231,7 +231,7 @@
Function *NF = Function::Create(NFTy, F->getLinkage());
NF->takeName(F);
NF->copyAttributesFrom(F);
- NF->setParamAttrs(PAListPtr::get(ParamAttrsVec.begin(), ParamAttrsVec.end()));
+ NF->setAttributes(AttrListPtr::get(AttributesVec.begin(), AttributesVec.end()));
F->getParent()->getFunctionList().insert(F, NF);
NF->getBasicBlockList().splice(NF->begin(), F->getBasicBlockList());
@@ -255,17 +255,17 @@
CallGraph &CG = getAnalysis<CallGraph>();
SmallVector<Value*, 16> Args;
- // ParamAttrs - Keep track of the parameter attributes for the arguments.
- SmallVector<FnAttributeWithIndex, 8> ArgAttrsVec;
+ // Attributes - Keep track of the parameter attributes for the arguments.
+ SmallVector<AttributeWithIndex, 8> ArgAttrsVec;
while (!F->use_empty()) {
CallSite CS = CallSite::get(*F->use_begin());
Instruction *Call = CS.getInstruction();
- const PAListPtr &PAL = F->getParamAttrs();
+ const AttrListPtr &PAL = F->getAttributes();
// Add any return attributes.
- if (Attributes attrs = PAL.getParamAttrs(0))
- ArgAttrsVec.push_back(FnAttributeWithIndex::get(0, attrs));
+ if (Attributes attrs = PAL.getAttributes(0))
+ ArgAttrsVec.push_back(AttributeWithIndex::get(0, attrs));
// Copy arguments, however skip first one.
CallSite::arg_iterator AI = CS.arg_begin(), AE = CS.arg_end();
@@ -276,14 +276,14 @@
unsigned ParamIndex = 2;
while (AI != AE) {
Args.push_back(*AI);
- if (Attributes Attrs = PAL.getParamAttrs(ParamIndex))
- ArgAttrsVec.push_back(FnAttributeWithIndex::get(ParamIndex - 1, Attrs));
+ if (Attributes Attrs = PAL.getAttributes(ParamIndex))
+ ArgAttrsVec.push_back(AttributeWithIndex::get(ParamIndex - 1, Attrs));
++ParamIndex;
++AI;
}
- PAListPtr NewPAL = PAListPtr::get(ArgAttrsVec.begin(), ArgAttrsVec.end());
+ AttrListPtr NewPAL = AttrListPtr::get(ArgAttrsVec.begin(), ArgAttrsVec.end());
// Build new call instruction.
Instruction *New;
@@ -291,11 +291,11 @@
New = InvokeInst::Create(NF, II->getNormalDest(), II->getUnwindDest(),
Args.begin(), Args.end(), "", Call);
cast<InvokeInst>(New)->setCallingConv(CS.getCallingConv());
- cast<InvokeInst>(New)->setParamAttrs(NewPAL);
+ cast<InvokeInst>(New)->setAttributes(NewPAL);
} else {
New = CallInst::Create(NF, Args.begin(), Args.end(), "", Call);
cast<CallInst>(New)->setCallingConv(CS.getCallingConv());
- cast<CallInst>(New)->setParamAttrs(NewPAL);
+ cast<CallInst>(New)->setAttributes(NewPAL);
if (cast<CallInst>(Call)->isTailCall())
cast<CallInst>(New)->setTailCall();
}
Modified: llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp?rev=56622&r1=56621&r2=56622&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp Thu Sep 25 16:00:45 2008
@@ -8999,7 +8999,7 @@
// The size of ByVal arguments is derived from the type, so we
// can't change to a type with a different size. If the size were
// passed explicitly we could avoid this check.
- if (!CS.paramHasAttr(ix, ParamAttr::ByVal))
+ if (!CS.paramHasAttr(ix, Attribute::ByVal))
return true;
const Type* SrcTy =
@@ -9099,7 +9099,7 @@
return false;
Function *Callee = cast<Function>(CE->getOperand(0));
Instruction *Caller = CS.getInstruction();
- const PAListPtr &CallerPAL = CS.getParamAttrs();
+ const AttrListPtr &CallerPAL = CS.getAttributes();
// Okay, this is a cast from a function to a different type. Unless doing so
// would cause a type conversion of one of our arguments, change this call to
@@ -9127,8 +9127,8 @@
return false; // Cannot transform this return value.
if (!CallerPAL.isEmpty() && !Caller->use_empty()) {
- Attributes RAttrs = CallerPAL.getParamAttrs(0);
- if (RAttrs & ParamAttr::typeIncompatible(NewRetTy))
+ Attributes RAttrs = CallerPAL.getAttributes(0);
+ if (RAttrs & Attribute::typeIncompatible(NewRetTy))
return false; // Attribute not compatible with transformed value.
}
@@ -9157,7 +9157,7 @@
if (!CastInst::isCastable(ActTy, ParamTy))
return false; // Cannot transform this parameter value.
- if (CallerPAL.getParamAttrs(i + 1) & ParamAttr::typeIncompatible(ParamTy))
+ if (CallerPAL.getAttributes(i + 1) & Attribute::typeIncompatible(ParamTy))
return false; // Attribute not compatible with transformed value.
// Converting from one pointer type to another or between a pointer and an
@@ -9181,7 +9181,7 @@
if (CallerPAL.getSlot(i - 1).Index <= FT->getNumParams())
break;
Attributes PAttrs = CallerPAL.getSlot(i - 1).Attrs;
- if (PAttrs & ParamAttr::VarArgsIncompatible)
+ if (PAttrs & Attribute::VarArgsIncompatible)
return false;
}
@@ -9189,19 +9189,19 @@
// inserting cast instructions as necessary...
std::vector<Value*> Args;
Args.reserve(NumActualArgs);
- SmallVector<FnAttributeWithIndex, 8> attrVec;
+ SmallVector<AttributeWithIndex, 8> attrVec;
attrVec.reserve(NumCommonArgs);
// Get any return attributes.
- Attributes RAttrs = CallerPAL.getParamAttrs(0);
+ Attributes RAttrs = CallerPAL.getAttributes(0);
// If the return value is not being used, the type may not be compatible
// with the existing attributes. Wipe out any problematic attributes.
- RAttrs &= ~ParamAttr::typeIncompatible(NewRetTy);
+ RAttrs &= ~Attribute::typeIncompatible(NewRetTy);
// Add the new return attributes.
if (RAttrs)
- attrVec.push_back(FnAttributeWithIndex::get(0, RAttrs));
+ attrVec.push_back(AttributeWithIndex::get(0, RAttrs));
AI = CS.arg_begin();
for (unsigned i = 0; i != NumCommonArgs; ++i, ++AI) {
@@ -9216,8 +9216,8 @@
}
// Add any parameter attributes.
- if (Attributes PAttrs = CallerPAL.getParamAttrs(i + 1))
- attrVec.push_back(FnAttributeWithIndex::get(i + 1, PAttrs));
+ if (Attributes PAttrs = CallerPAL.getAttributes(i + 1))
+ attrVec.push_back(AttributeWithIndex::get(i + 1, PAttrs));
}
// If the function takes more arguments than the call was taking, add them
@@ -9246,8 +9246,8 @@
}
// Add any parameter attributes.
- if (Attributes PAttrs = CallerPAL.getParamAttrs(i + 1))
- attrVec.push_back(FnAttributeWithIndex::get(i + 1, PAttrs));
+ if (Attributes PAttrs = CallerPAL.getAttributes(i + 1))
+ attrVec.push_back(AttributeWithIndex::get(i + 1, PAttrs));
}
}
}
@@ -9255,7 +9255,7 @@
if (NewRetTy == Type::VoidTy)
Caller->setName(""); // Void type should not have a name.
- const PAListPtr &NewCallerPAL = PAListPtr::get(attrVec.begin(),attrVec.end());
+ const AttrListPtr &NewCallerPAL = AttrListPtr::get(attrVec.begin(),attrVec.end());
Instruction *NC;
if (InvokeInst *II = dyn_cast<InvokeInst>(Caller)) {
@@ -9263,7 +9263,7 @@
Args.begin(), Args.end(),
Caller->getName(), Caller);
cast<InvokeInst>(NC)->setCallingConv(II->getCallingConv());
- cast<InvokeInst>(NC)->setParamAttrs(NewCallerPAL);
+ cast<InvokeInst>(NC)->setAttributes(NewCallerPAL);
} else {
NC = CallInst::Create(Callee, Args.begin(), Args.end(),
Caller->getName(), Caller);
@@ -9271,7 +9271,7 @@
if (CI->isTailCall())
cast<CallInst>(NC)->setTailCall();
cast<CallInst>(NC)->setCallingConv(CI->getCallingConv());
- cast<CallInst>(NC)->setParamAttrs(NewCallerPAL);
+ cast<CallInst>(NC)->setAttributes(NewCallerPAL);
}
// Insert a cast of the return type as necessary.
@@ -9311,11 +9311,11 @@
Value *Callee = CS.getCalledValue();
const PointerType *PTy = cast<PointerType>(Callee->getType());
const FunctionType *FTy = cast<FunctionType>(PTy->getElementType());
- const PAListPtr &Attrs = CS.getParamAttrs();
+ const AttrListPtr &Attrs = CS.getAttributes();
// If the call already has the 'nest' attribute somewhere then give up -
// otherwise 'nest' would occur twice after splicing in the chain.
- if (Attrs.hasAttrSomewhere(ParamAttr::Nest))
+ if (Attrs.hasAttrSomewhere(Attribute::Nest))
return 0;
IntrinsicInst *Tramp =
@@ -9325,19 +9325,19 @@
const PointerType *NestFPTy = cast<PointerType>(NestF->getType());
const FunctionType *NestFTy = cast<FunctionType>(NestFPTy->getElementType());
- const PAListPtr &NestAttrs = NestF->getParamAttrs();
+ const AttrListPtr &NestAttrs = NestF->getAttributes();
if (!NestAttrs.isEmpty()) {
unsigned NestIdx = 1;
const Type *NestTy = 0;
- Attributes NestAttr = ParamAttr::None;
+ Attributes NestAttr = Attribute::None;
// Look for a parameter marked with the 'nest' attribute.
for (FunctionType::param_iterator I = NestFTy->param_begin(),
E = NestFTy->param_end(); I != E; ++NestIdx, ++I)
- if (NestAttrs.paramHasAttr(NestIdx, ParamAttr::Nest)) {
+ if (NestAttrs.paramHasAttr(NestIdx, Attribute::Nest)) {
// Record the parameter type and any other attributes.
NestTy = *I;
- NestAttr = NestAttrs.getParamAttrs(NestIdx);
+ NestAttr = NestAttrs.getAttributes(NestIdx);
break;
}
@@ -9346,15 +9346,15 @@
std::vector<Value*> NewArgs;
NewArgs.reserve(unsigned(CS.arg_end()-CS.arg_begin())+1);
- SmallVector<FnAttributeWithIndex, 8> NewAttrs;
+ SmallVector<AttributeWithIndex, 8> NewAttrs;
NewAttrs.reserve(Attrs.getNumSlots() + 1);
// Insert the nest argument into the call argument list, which may
// mean appending it. Likewise for attributes.
// Add any function result attributes.
- if (Attributes Attr = Attrs.getParamAttrs(0))
- NewAttrs.push_back(FnAttributeWithIndex::get(0, Attr));
+ if (Attributes Attr = Attrs.getAttributes(0))
+ NewAttrs.push_back(AttributeWithIndex::get(0, Attr));
{
unsigned Idx = 1;
@@ -9366,7 +9366,7 @@
if (NestVal->getType() != NestTy)
NestVal = new BitCastInst(NestVal, NestTy, "nest", Caller);
NewArgs.push_back(NestVal);
- NewAttrs.push_back(FnAttributeWithIndex::get(NestIdx, NestAttr));
+ NewAttrs.push_back(AttributeWithIndex::get(NestIdx, NestAttr));
}
if (I == E)
@@ -9374,9 +9374,9 @@
// Add the original argument and attributes.
NewArgs.push_back(*I);
- if (Attributes Attr = Attrs.getParamAttrs(Idx))
+ if (Attributes Attr = Attrs.getAttributes(Idx))
NewAttrs.push_back
- (FnAttributeWithIndex::get(Idx + (Idx >= NestIdx), Attr));
+ (AttributeWithIndex::get(Idx + (Idx >= NestIdx), Attr));
++Idx, ++I;
} while (1);
@@ -9417,7 +9417,7 @@
FunctionType::get(FTy->getReturnType(), NewTypes, FTy->isVarArg());
Constant *NewCallee = NestF->getType() == PointerType::getUnqual(NewFTy) ?
NestF : ConstantExpr::getBitCast(NestF, PointerType::getUnqual(NewFTy));
- const PAListPtr &NewPAL = PAListPtr::get(NewAttrs.begin(),NewAttrs.end());
+ const AttrListPtr &NewPAL = AttrListPtr::get(NewAttrs.begin(),NewAttrs.end());
Instruction *NewCaller;
if (InvokeInst *II = dyn_cast<InvokeInst>(Caller)) {
@@ -9426,7 +9426,7 @@
NewArgs.begin(), NewArgs.end(),
Caller->getName(), Caller);
cast<InvokeInst>(NewCaller)->setCallingConv(II->getCallingConv());
- cast<InvokeInst>(NewCaller)->setParamAttrs(NewPAL);
+ cast<InvokeInst>(NewCaller)->setAttributes(NewPAL);
} else {
NewCaller = CallInst::Create(NewCallee, NewArgs.begin(), NewArgs.end(),
Caller->getName(), Caller);
@@ -9434,7 +9434,7 @@
cast<CallInst>(NewCaller)->setTailCall();
cast<CallInst>(NewCaller)->
setCallingConv(cast<CallInst>(Caller)->getCallingConv());
- cast<CallInst>(NewCaller)->setParamAttrs(NewPAL);
+ cast<CallInst>(NewCaller)->setAttributes(NewPAL);
}
if (Caller->getType() != Type::VoidTy && !Caller->use_empty())
Caller->replaceAllUsesWith(NewCaller);
Modified: llvm/trunk/lib/Transforms/Scalar/LoopUnswitch.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/LoopUnswitch.cpp?rev=56622&r1=56621&r2=56622&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/LoopUnswitch.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/LoopUnswitch.cpp Thu Sep 25 16:00:45 2008
@@ -430,7 +430,7 @@
Function *F = loopHeader->getParent();
// Do not unswitch if the function is optimized for size.
- if (!F->isDeclaration() && F->hasNote(FnAttr::OptimizeForSize))
+ if (!F->isDeclaration() && F->hasNote(Attribute::OptimizeForSize))
return false;
// Check to see if it would be profitable to unswitch current loop.
Modified: llvm/trunk/lib/Transforms/Scalar/SimplifyCFGPass.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/SimplifyCFGPass.cpp?rev=56622&r1=56621&r2=56622&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/SimplifyCFGPass.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/SimplifyCFGPass.cpp Thu Sep 25 16:00:45 2008
@@ -83,7 +83,7 @@
Args.end(), "", II);
NewCall->takeName(II);
NewCall->setCallingConv(II->getCallingConv());
- NewCall->setParamAttrs(II->getParamAttrs());
+ NewCall->setAttributes(II->getAttributes());
II->replaceAllUsesWith(NewCall);
// Follow the call by a branch to the normal destination.
Modified: llvm/trunk/lib/Transforms/Utils/InlineCost.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Utils/InlineCost.cpp?rev=56622&r1=56621&r2=56622&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Utils/InlineCost.cpp (original)
+++ llvm/trunk/lib/Transforms/Utils/InlineCost.cpp Thu Sep 25 16:00:45 2008
@@ -222,7 +222,7 @@
if (CalleeFI.NeverInline)
return 2000000000;
- if (!Callee->isDeclaration() && Callee->hasNote(FnAttr::AlwaysInline))
+ if (!Callee->isDeclaration() && Callee->hasNote(Attribute::AlwaysInline))
return -2000000000;
// Add to the inline quality for properties that make the call valuable to
Modified: llvm/trunk/lib/Transforms/Utils/InlineFunction.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Utils/InlineFunction.cpp?rev=56622&r1=56621&r2=56622&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Utils/InlineFunction.cpp (original)
+++ llvm/trunk/lib/Transforms/Utils/InlineFunction.cpp Thu Sep 25 16:00:45 2008
@@ -88,7 +88,7 @@
InvokeArgs.begin(), InvokeArgs.end(),
CI->getName(), BB->getTerminator());
II->setCallingConv(CI->getCallingConv());
- II->setParamAttrs(CI->getParamAttrs());
+ II->setAttributes(CI->getAttributes());
// Make sure that anything using the call now uses the invoke!
CI->replaceAllUsesWith(II);
@@ -246,7 +246,7 @@
// by them explicit. However, we don't do this if the callee is readonly
// or readnone, because the copy would be unneeded: the callee doesn't
// modify the struct.
- if (CalledFunc->paramHasAttr(ArgNo+1, ParamAttr::ByVal) &&
+ if (CalledFunc->paramHasAttr(ArgNo+1, Attribute::ByVal) &&
!CalledFunc->onlyReadsMemory()) {
const Type *AggTy = cast<PointerType>(I->getType())->getElementType();
const Type *VoidPtrTy = PointerType::getUnqual(Type::Int8Ty);
Modified: llvm/trunk/lib/Transforms/Utils/LowerInvoke.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Utils/LowerInvoke.cpp?rev=56622&r1=56621&r2=56622&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Utils/LowerInvoke.cpp (original)
+++ llvm/trunk/lib/Transforms/Utils/LowerInvoke.cpp Thu Sep 25 16:00:45 2008
@@ -227,7 +227,7 @@
CallArgs.begin(), CallArgs.end(), "",II);
NewCall->takeName(II);
NewCall->setCallingConv(II->getCallingConv());
- NewCall->setParamAttrs(II->getParamAttrs());
+ NewCall->setAttributes(II->getAttributes());
II->replaceAllUsesWith(NewCall);
// Insert an unconditional branch to the normal destination.
@@ -296,7 +296,7 @@
II);
NewCall->takeName(II);
NewCall->setCallingConv(II->getCallingConv());
- NewCall->setParamAttrs(II->getParamAttrs());
+ NewCall->setAttributes(II->getAttributes());
II->replaceAllUsesWith(NewCall);
// Replace the invoke with an uncond branch.
Modified: llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp?rev=56622&r1=56621&r2=56622&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp (original)
+++ llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp Thu Sep 25 16:00:45 2008
@@ -1845,7 +1845,7 @@
Args.begin(), Args.end(),
II->getName(), BI);
CI->setCallingConv(II->getCallingConv());
- CI->setParamAttrs(II->getParamAttrs());
+ CI->setAttributes(II->getAttributes());
// If the invoke produced a value, the Call now does instead
II->replaceAllUsesWith(CI);
delete II;
@@ -2019,7 +2019,7 @@
Args.begin(), Args.end(),
II->getName(), BI);
CI->setCallingConv(II->getCallingConv());
- CI->setParamAttrs(II->getParamAttrs());
+ CI->setAttributes(II->getAttributes());
// If the invoke produced a value, the Call does now instead.
II->replaceAllUsesWith(CI);
delete II;
Modified: llvm/trunk/lib/VMCore/AsmWriter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/AsmWriter.cpp?rev=56622&r1=56621&r2=56622&view=diff
==============================================================================
--- llvm/trunk/lib/VMCore/AsmWriter.cpp (original)
+++ llvm/trunk/lib/VMCore/AsmWriter.cpp Thu Sep 25 16:00:45 2008
@@ -1134,8 +1134,8 @@
// Print the type
printType(Operand->getType());
// Print parameter attributes list
- if (Attrs != ParamAttr::None)
- Out << ' ' << ParamAttr::getAsString(Attrs);
+ if (Attrs != Attribute::None)
+ Out << ' ' << Attribute::getAsString(Attrs);
Out << ' ';
// Print the operand
WriteAsOperandInternal(Out, Operand, TypeNames, &Machine);
@@ -1356,7 +1356,7 @@
}
const FunctionType *FT = F->getFunctionType();
- const PAListPtr &Attrs = F->getParamAttrs();
+ const AttrListPtr &Attrs = F->getAttributes();
printType(F->getReturnType());
Out << ' ';
if (F->hasName())
@@ -1375,7 +1375,7 @@
I != E; ++I) {
// Insert commas as we go... the first arg doesn't get a comma
if (I != F->arg_begin()) Out << ", ";
- printArgument(I, Attrs.getParamAttrs(Idx));
+ printArgument(I, Attrs.getAttributes(Idx));
Idx++;
}
} else {
@@ -1387,9 +1387,9 @@
// Output type...
printType(FT->getParamType(i));
- Attributes ArgAttrs = Attrs.getParamAttrs(i+1);
- if (ArgAttrs != ParamAttr::None)
- Out << ' ' << ParamAttr::getAsString(ArgAttrs);
+ Attributes ArgAttrs = Attrs.getAttributes(i+1);
+ if (ArgAttrs != Attribute::None)
+ Out << ' ' << Attribute::getAsString(ArgAttrs);
}
}
@@ -1399,9 +1399,9 @@
Out << "..."; // Output varargs portion of signature!
}
Out << ')';
- Attributes RetAttrs = Attrs.getParamAttrs(0);
- if (RetAttrs != ParamAttr::None)
- Out << ' ' << ParamAttr::getAsString(Attrs.getParamAttrs(0));
+ Attributes RetAttrs = Attrs.getAttributes(0);
+ if (RetAttrs != Attribute::None)
+ Out << ' ' << Attribute::getAsString(Attrs.getAttributes(0));
if (F->hasSection())
Out << " section \"" << F->getSection() << '"';
if (F->getAlignment())
@@ -1413,12 +1413,12 @@
} else {
bool insideNotes = false;
- if (F->hasNote(FnAttr::AlwaysInline)) {
+ if (F->hasNote(Attribute::AlwaysInline)) {
Out << "notes(";
insideNotes = true;
Out << "inline=always";
}
- if (F->hasNote(FnAttr::NoInline)) {
+ if (F->hasNote(Attribute::NoInline)) {
if (insideNotes)
Out << ",";
else {
@@ -1427,7 +1427,7 @@
}
Out << "inline=never";
}
- if (F->hasNote(FnAttr::OptimizeForSize)) {
+ if (F->hasNote(Attribute::OptimizeForSize)) {
if (insideNotes)
Out << ",";
else {
@@ -1460,8 +1460,8 @@
printType(Arg->getType());
// Output parameter attributes list
- if (Attrs != ParamAttr::None)
- Out << ' ' << ParamAttr::getAsString(Attrs);
+ if (Attrs != Attribute::None)
+ Out << ' ' << Attribute::getAsString(Attrs);
// Output name, if available...
if (Arg->hasName()) {
@@ -1642,7 +1642,7 @@
const PointerType *PTy = cast<PointerType>(Operand->getType());
const FunctionType *FTy = cast<FunctionType>(PTy->getElementType());
const Type *RetTy = FTy->getReturnType();
- const PAListPtr &PAL = CI->getParamAttrs();
+ const AttrListPtr &PAL = CI->getAttributes();
// If possible, print out the short form of the call instruction. We can
// only do this if the first argument is a pointer to a nonvararg function,
@@ -1662,16 +1662,16 @@
for (unsigned op = 1, Eop = I.getNumOperands(); op < Eop; ++op) {
if (op > 1)
Out << ", ";
- writeParamOperand(I.getOperand(op), PAL.getParamAttrs(op));
+ writeParamOperand(I.getOperand(op), PAL.getAttributes(op));
}
Out << ')';
- if (PAL.getParamAttrs(0) != ParamAttr::None)
- Out << ' ' << ParamAttr::getAsString(PAL.getParamAttrs(0));
+ if (PAL.getAttributes(0) != Attribute::None)
+ Out << ' ' << Attribute::getAsString(PAL.getAttributes(0));
} else if (const InvokeInst *II = dyn_cast<InvokeInst>(&I)) {
const PointerType *PTy = cast<PointerType>(Operand->getType());
const FunctionType *FTy = cast<FunctionType>(PTy->getElementType());
const Type *RetTy = FTy->getReturnType();
- const PAListPtr &PAL = II->getParamAttrs();
+ const AttrListPtr &PAL = II->getAttributes();
// Print the calling convention being used.
switch (II->getCallingConv()) {
@@ -1702,12 +1702,12 @@
for (unsigned op = 3, Eop = I.getNumOperands(); op < Eop; ++op) {
if (op > 3)
Out << ", ";
- writeParamOperand(I.getOperand(op), PAL.getParamAttrs(op-2));
+ writeParamOperand(I.getOperand(op), PAL.getAttributes(op-2));
}
Out << ')';
- if (PAL.getParamAttrs(0) != ParamAttr::None)
- Out << ' ' << ParamAttr::getAsString(PAL.getParamAttrs(0));
+ if (PAL.getAttributes(0) != Attribute::None)
+ Out << ' ' << Attribute::getAsString(PAL.getAttributes(0));
Out << "\n\t\t\tto ";
writeOperand(II->getNormalDest(), true);
Out << " unwind ";
Modified: llvm/trunk/lib/VMCore/Attributes.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/Attributes.cpp?rev=56622&r1=56621&r2=56622&view=diff
==============================================================================
--- llvm/trunk/lib/VMCore/Attributes.cpp (original)
+++ llvm/trunk/lib/VMCore/Attributes.cpp Thu Sep 25 16:00:45 2008
@@ -1,4 +1,4 @@
-//===-- Attributes.cpp - Implement ParamAttrsList -------------------------===//
+//===-- Attributes.cpp - Implement AttributesList -------------------------===//
//
// The LLVM Compiler Infrastructure
//
@@ -7,7 +7,7 @@
//
//===----------------------------------------------------------------------===//
//
-// This file implements the ParamAttrsList class and ParamAttr utilities.
+// This file implements the AttributesList class and Attribute utilities.
//
//===----------------------------------------------------------------------===//
@@ -20,36 +20,36 @@
using namespace llvm;
//===----------------------------------------------------------------------===//
-// ParamAttr Function Definitions
+// Attribute Function Definitions
//===----------------------------------------------------------------------===//
-std::string ParamAttr::getAsString(Attributes Attrs) {
+std::string Attribute::getAsString(Attributes Attrs) {
std::string Result;
- if (Attrs & ParamAttr::ZExt)
+ if (Attrs & Attribute::ZExt)
Result += "zeroext ";
- if (Attrs & ParamAttr::SExt)
+ if (Attrs & Attribute::SExt)
Result += "signext ";
- if (Attrs & ParamAttr::NoReturn)
+ if (Attrs & Attribute::NoReturn)
Result += "noreturn ";
- if (Attrs & ParamAttr::NoUnwind)
+ if (Attrs & Attribute::NoUnwind)
Result += "nounwind ";
- if (Attrs & ParamAttr::InReg)
+ if (Attrs & Attribute::InReg)
Result += "inreg ";
- if (Attrs & ParamAttr::NoAlias)
+ if (Attrs & Attribute::NoAlias)
Result += "noalias ";
- if (Attrs & ParamAttr::StructRet)
+ if (Attrs & Attribute::StructRet)
Result += "sret ";
- if (Attrs & ParamAttr::ByVal)
+ if (Attrs & Attribute::ByVal)
Result += "byval ";
- if (Attrs & ParamAttr::Nest)
+ if (Attrs & Attribute::Nest)
Result += "nest ";
- if (Attrs & ParamAttr::ReadNone)
+ if (Attrs & Attribute::ReadNone)
Result += "readnone ";
- if (Attrs & ParamAttr::ReadOnly)
+ if (Attrs & Attribute::ReadOnly)
Result += "readonly ";
- if (Attrs & ParamAttr::Alignment) {
+ if (Attrs & Attribute::Alignment) {
Result += "align ";
- Result += utostr((Attrs & ParamAttr::Alignment) >> 16);
+ Result += utostr((Attrs & Attribute::Alignment) >> 16);
Result += " ";
}
// Trim the trailing space.
@@ -57,7 +57,7 @@
return Result;
}
-Attributes ParamAttr::typeIncompatible(const Type *Ty) {
+Attributes Attribute::typeIncompatible(const Type *Ty) {
Attributes Incompatible = None;
if (!Ty->isInteger())
@@ -79,14 +79,14 @@
class AttributeListImpl : public FoldingSetNode {
unsigned RefCount;
- // ParamAttrsList is uniqued, these should not be publicly available.
+ // AttributesList is uniqued, these should not be publicly available.
void operator=(const AttributeListImpl &); // Do not implement
AttributeListImpl(const AttributeListImpl &); // Do not implement
~AttributeListImpl(); // Private implementation
public:
- SmallVector<FnAttributeWithIndex, 4> Attrs;
+ SmallVector<AttributeWithIndex, 4> Attrs;
- AttributeListImpl(const FnAttributeWithIndex *Attr, unsigned NumAttrs)
+ AttributeListImpl(const AttributeWithIndex *Attr, unsigned NumAttrs)
: Attrs(Attr, Attr+NumAttrs) {
RefCount = 0;
}
@@ -97,7 +97,7 @@
void Profile(FoldingSetNodeID &ID) const {
Profile(ID, &Attrs[0], Attrs.size());
}
- static void Profile(FoldingSetNodeID &ID, const FnAttributeWithIndex *Attr,
+ static void Profile(FoldingSetNodeID &ID, const AttributeWithIndex *Attr,
unsigned NumAttrs) {
for (unsigned i = 0; i != NumAttrs; ++i)
ID.AddInteger(uint64_t(Attr[i].Attrs) << 32 | unsigned(Attr[i].Index));
@@ -105,24 +105,24 @@
};
}
-static ManagedStatic<FoldingSet<AttributeListImpl> > ParamAttrsLists;
+static ManagedStatic<FoldingSet<AttributeListImpl> > AttributesLists;
AttributeListImpl::~AttributeListImpl() {
- ParamAttrsLists->RemoveNode(this);
+ AttributesLists->RemoveNode(this);
}
-PAListPtr PAListPtr::get(const FnAttributeWithIndex *Attrs, unsigned NumAttrs) {
- // If there are no attributes then return a null ParamAttrsList pointer.
+AttrListPtr AttrListPtr::get(const AttributeWithIndex *Attrs, unsigned NumAttrs) {
+ // If there are no attributes then return a null AttributesList pointer.
if (NumAttrs == 0)
- return PAListPtr();
+ return AttrListPtr();
#ifndef NDEBUG
for (unsigned i = 0; i != NumAttrs; ++i) {
- assert(Attrs[i].Attrs != ParamAttr::None &&
- "Pointless parameter attribute!");
+ assert(Attrs[i].Attrs != Attribute::None &&
+ "Pointless attribute!");
assert((!i || Attrs[i-1].Index < Attrs[i].Index) &&
- "Misordered ParamAttrsList!");
+ "Misordered AttributesList!");
}
#endif
@@ -131,78 +131,78 @@
AttributeListImpl::Profile(ID, Attrs, NumAttrs);
void *InsertPos;
AttributeListImpl *PAL =
- ParamAttrsLists->FindNodeOrInsertPos(ID, InsertPos);
+ AttributesLists->FindNodeOrInsertPos(ID, InsertPos);
// If we didn't find any existing attributes of the same shape then
// create a new one and insert it.
if (!PAL) {
PAL = new AttributeListImpl(Attrs, NumAttrs);
- ParamAttrsLists->InsertNode(PAL, InsertPos);
+ AttributesLists->InsertNode(PAL, InsertPos);
}
- // Return the ParamAttrsList that we found or created.
- return PAListPtr(PAL);
+ // Return the AttributesList that we found or created.
+ return AttrListPtr(PAL);
}
//===----------------------------------------------------------------------===//
-// PAListPtr Method Implementations
+// AttrListPtr Method Implementations
//===----------------------------------------------------------------------===//
-PAListPtr::PAListPtr(AttributeListImpl *LI) : PAList(LI) {
+AttrListPtr::AttrListPtr(AttributeListImpl *LI) : AttrList(LI) {
if (LI) LI->AddRef();
}
-PAListPtr::PAListPtr(const PAListPtr &P) : PAList(P.PAList) {
- if (PAList) PAList->AddRef();
+AttrListPtr::AttrListPtr(const AttrListPtr &P) : AttrList(P.AttrList) {
+ if (AttrList) AttrList->AddRef();
}
-const PAListPtr &PAListPtr::operator=(const PAListPtr &RHS) {
- if (PAList == RHS.PAList) return *this;
- if (PAList) PAList->DropRef();
- PAList = RHS.PAList;
- if (PAList) PAList->AddRef();
+const AttrListPtr &AttrListPtr::operator=(const AttrListPtr &RHS) {
+ if (AttrList == RHS.AttrList) return *this;
+ if (AttrList) AttrList->DropRef();
+ AttrList = RHS.AttrList;
+ if (AttrList) AttrList->AddRef();
return *this;
}
-PAListPtr::~PAListPtr() {
- if (PAList) PAList->DropRef();
+AttrListPtr::~AttrListPtr() {
+ if (AttrList) AttrList->DropRef();
}
/// getNumSlots - Return the number of slots used in this attribute list.
/// This is the number of arguments that have an attribute set on them
/// (including the function itself).
-unsigned PAListPtr::getNumSlots() const {
- return PAList ? PAList->Attrs.size() : 0;
+unsigned AttrListPtr::getNumSlots() const {
+ return AttrList ? AttrList->Attrs.size() : 0;
}
-/// getSlot - Return the FnAttributeWithIndex at the specified slot. This
-/// holds a parameter number plus a set of attributes.
-const FnAttributeWithIndex &PAListPtr::getSlot(unsigned Slot) const {
- assert(PAList && Slot < PAList->Attrs.size() && "Slot # out of range!");
- return PAList->Attrs[Slot];
+/// getSlot - Return the AttributeWithIndex at the specified slot. This
+/// holds a number plus a set of attributes.
+const AttributeWithIndex &AttrListPtr::getSlot(unsigned Slot) const {
+ assert(AttrList && Slot < AttrList->Attrs.size() && "Slot # out of range!");
+ return AttrList->Attrs[Slot];
}
-/// getParamAttrs - The parameter attributes for the specified parameter are
-/// returned. Parameters for the result are denoted with Idx = 0.
+/// getAttributes - The attributes for the specified index are
+/// returned. Attributes for the result are denoted with Idx = 0.
/// Function notes are denoted with idx = ~0.
-Attributes PAListPtr::getParamAttrs(unsigned Idx) const {
- if (PAList == 0) return ParamAttr::None;
+Attributes AttrListPtr::getAttributes(unsigned Idx) const {
+ if (AttrList == 0) return Attribute::None;
- const SmallVector<FnAttributeWithIndex, 4> &Attrs = PAList->Attrs;
+ const SmallVector<AttributeWithIndex, 4> &Attrs = AttrList->Attrs;
for (unsigned i = 0, e = Attrs.size(); i != e && Attrs[i].Index <= Idx; ++i)
if (Attrs[i].Index == Idx)
return Attrs[i].Attrs;
- return ParamAttr::None;
+ return Attribute::None;
}
/// hasAttrSomewhere - Return true if the specified attribute is set for at
/// least one parameter or for the return value.
-bool PAListPtr::hasAttrSomewhere(Attributes Attr) const {
- if (PAList == 0) return false;
+bool AttrListPtr::hasAttrSomewhere(Attributes Attr) const {
+ if (AttrList == 0) return false;
- const SmallVector<FnAttributeWithIndex, 4> &Attrs = PAList->Attrs;
+ const SmallVector<AttributeWithIndex, 4> &Attrs = AttrList->Attrs;
for (unsigned i = 0, e = Attrs.size(); i != e; ++i)
if (Attrs[i].Attrs & Attr)
return true;
@@ -210,13 +210,13 @@
}
-PAListPtr PAListPtr::addAttr(unsigned Idx, Attributes Attrs) const {
- Attributes OldAttrs = getParamAttrs(Idx);
+AttrListPtr AttrListPtr::addAttr(unsigned Idx, Attributes Attrs) const {
+ Attributes OldAttrs = getAttributes(Idx);
#ifndef NDEBUG
// FIXME it is not obvious how this should work for alignment.
// For now, say we can't change a known alignment.
- Attributes OldAlign = OldAttrs & ParamAttr::Alignment;
- Attributes NewAlign = Attrs & ParamAttr::Alignment;
+ Attributes OldAlign = OldAttrs & Attribute::Alignment;
+ Attributes NewAlign = Attrs & Attribute::Alignment;
assert((!OldAlign || !NewAlign || OldAlign == NewAlign) &&
"Attempt to change alignment!");
#endif
@@ -225,11 +225,11 @@
if (NewAttrs == OldAttrs)
return *this;
- SmallVector<FnAttributeWithIndex, 8> NewAttrList;
- if (PAList == 0)
- NewAttrList.push_back(FnAttributeWithIndex::get(Idx, Attrs));
+ SmallVector<AttributeWithIndex, 8> NewAttrList;
+ if (AttrList == 0)
+ NewAttrList.push_back(AttributeWithIndex::get(Idx, Attrs));
else {
- const SmallVector<FnAttributeWithIndex, 4> &OldAttrList = PAList->Attrs;
+ const SmallVector<AttributeWithIndex, 4> &OldAttrList = AttrList->Attrs;
unsigned i = 0, e = OldAttrList.size();
// Copy attributes for arguments before this one.
for (; i != e && OldAttrList[i].Index < Idx; ++i)
@@ -241,7 +241,7 @@
++i;
}
- NewAttrList.push_back(FnAttributeWithIndex::get(Idx, Attrs));
+ NewAttrList.push_back(AttributeWithIndex::get(Idx, Attrs));
// Copy attributes for arguments after this one.
NewAttrList.insert(NewAttrList.end(),
@@ -251,21 +251,21 @@
return get(&NewAttrList[0], NewAttrList.size());
}
-PAListPtr PAListPtr::removeAttr(unsigned Idx, Attributes Attrs) const {
+AttrListPtr AttrListPtr::removeAttr(unsigned Idx, Attributes Attrs) const {
#ifndef NDEBUG
// FIXME it is not obvious how this should work for alignment.
// For now, say we can't pass in alignment, which no current use does.
- assert(!(Attrs & ParamAttr::Alignment) && "Attempt to exclude alignment!");
+ assert(!(Attrs & Attribute::Alignment) && "Attempt to exclude alignment!");
#endif
- if (PAList == 0) return PAListPtr();
+ if (AttrList == 0) return AttrListPtr();
- Attributes OldAttrs = getParamAttrs(Idx);
+ Attributes OldAttrs = getAttributes(Idx);
Attributes NewAttrs = OldAttrs & ~Attrs;
if (NewAttrs == OldAttrs)
return *this;
- SmallVector<FnAttributeWithIndex, 8> NewAttrList;
- const SmallVector<FnAttributeWithIndex, 4> &OldAttrList = PAList->Attrs;
+ SmallVector<AttributeWithIndex, 8> NewAttrList;
+ const SmallVector<AttributeWithIndex, 4> &OldAttrList = AttrList->Attrs;
unsigned i = 0, e = OldAttrList.size();
// Copy attributes for arguments before this one.
@@ -277,7 +277,7 @@
Attrs = OldAttrList[i].Attrs & ~Attrs;
++i;
if (Attrs) // If any attributes left for this parameter, add them.
- NewAttrList.push_back(FnAttributeWithIndex::get(Idx, Attrs));
+ NewAttrList.push_back(AttributeWithIndex::get(Idx, Attrs));
// Copy attributes for arguments after this one.
NewAttrList.insert(NewAttrList.end(),
@@ -286,10 +286,10 @@
return get(&NewAttrList[0], NewAttrList.size());
}
-void PAListPtr::dump() const {
+void AttrListPtr::dump() const {
cerr << "PAL[ ";
for (unsigned i = 0; i < getNumSlots(); ++i) {
- const FnAttributeWithIndex &PAWI = getSlot(i);
+ const AttributeWithIndex &PAWI = getSlot(i);
cerr << "{" << PAWI.Index << "," << PAWI.Attrs << "} ";
}
Modified: llvm/trunk/lib/VMCore/AutoUpgrade.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/AutoUpgrade.cpp?rev=56622&r1=56621&r2=56622&view=diff
==============================================================================
--- llvm/trunk/lib/VMCore/AutoUpgrade.cpp (original)
+++ llvm/trunk/lib/VMCore/AutoUpgrade.cpp Thu Sep 25 16:00:45 2008
@@ -218,7 +218,7 @@
if (NewFn)
F = NewFn;
if (unsigned id = F->getIntrinsicID(true))
- F->setParamAttrs(Intrinsic::getParamAttrs((Intrinsic::ID)id));
+ F->setAttributes(Intrinsic::getAttributes((Intrinsic::ID)id));
return Upgraded;
}
@@ -383,8 +383,8 @@
// Handle any uses of the old CallInst.
if (!CI->use_empty()) {
// Check for sign extend parameter attributes on the return values.
- bool SrcSExt = NewFn->getParamAttrs().paramHasAttr(0, ParamAttr::SExt);
- bool DestSExt = F->getParamAttrs().paramHasAttr(0, ParamAttr::SExt);
+ bool SrcSExt = NewFn->getAttributes().paramHasAttr(0, Attribute::SExt);
+ bool DestSExt = F->getAttributes().paramHasAttr(0, Attribute::SExt);
// Construct an appropriate cast from the new return type to the old.
CastInst *RetCast = CastInst::Create(
Modified: llvm/trunk/lib/VMCore/Core.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/Core.cpp?rev=56622&r1=56621&r2=56622&view=diff
==============================================================================
--- llvm/trunk/lib/VMCore/Core.cpp (original)
+++ llvm/trunk/lib/VMCore/Core.cpp Thu Sep 25 16:00:45 2008
@@ -790,17 +790,17 @@
return wrap(--I);
}
-void LLVMAddParamAttr(LLVMValueRef Arg, LLVMParamAttr PA) {
+void LLVMAddAttribute(LLVMValueRef Arg, LLVMAttribute PA) {
unwrap<Argument>(Arg)->addAttr(PA);
}
-void LLVMRemoveParamAttr(LLVMValueRef Arg, LLVMParamAttr PA) {
+void LLVMRemoveAttribute(LLVMValueRef Arg, LLVMAttribute PA) {
unwrap<Argument>(Arg)->removeAttr(PA);
}
void LLVMSetParamAlignment(LLVMValueRef Arg, unsigned align) {
unwrap<Argument>(Arg)->addAttr(
- ParamAttr::constructAlignmentFromInt(align));
+ Attribute::constructAlignmentFromInt(align));
}
/*--.. Operations on basic blocks ..........................................--*/
@@ -941,26 +941,26 @@
assert(0 && "LLVMSetInstructionCallConv applies only to call and invoke!");
}
-void LLVMAddInstrParamAttr(LLVMValueRef Instr, unsigned index,
- LLVMParamAttr PA) {
+void LLVMAddInstrAttribute(LLVMValueRef Instr, unsigned index,
+ LLVMAttribute PA) {
CallSite Call = CallSite(unwrap<Instruction>(Instr));
- Call.setParamAttrs(
- Call.getParamAttrs().addAttr(index, PA));
+ Call.setAttributes(
+ Call.getAttributes().addAttr(index, PA));
}
-void LLVMRemoveInstrParamAttr(LLVMValueRef Instr, unsigned index,
- LLVMParamAttr PA) {
+void LLVMRemoveInstrAttribute(LLVMValueRef Instr, unsigned index,
+ LLVMAttribute PA) {
CallSite Call = CallSite(unwrap<Instruction>(Instr));
- Call.setParamAttrs(
- Call.getParamAttrs().removeAttr(index, PA));
+ Call.setAttributes(
+ Call.getAttributes().removeAttr(index, PA));
}
void LLVMSetInstrParamAlignment(LLVMValueRef Instr, unsigned index,
unsigned align) {
CallSite Call = CallSite(unwrap<Instruction>(Instr));
- Call.setParamAttrs(
- Call.getParamAttrs().addAttr(index,
- ParamAttr::constructAlignmentFromInt(align)));
+ Call.setAttributes(
+ Call.getAttributes().addAttr(index,
+ Attribute::constructAlignmentFromInt(align)));
}
/*--.. Operations on call instructions (only) ..............................--*/
Modified: llvm/trunk/lib/VMCore/Function.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/Function.cpp?rev=56622&r1=56621&r2=56622&view=diff
==============================================================================
--- llvm/trunk/lib/VMCore/Function.cpp (original)
+++ llvm/trunk/lib/VMCore/Function.cpp Thu Sep 25 16:00:45 2008
@@ -92,14 +92,14 @@
/// in its containing function.
bool Argument::hasByValAttr() const {
if (!isa<PointerType>(getType())) return false;
- return getParent()->paramHasAttr(getArgNo()+1, ParamAttr::ByVal);
+ return getParent()->paramHasAttr(getArgNo()+1, Attribute::ByVal);
}
/// hasNoAliasAttr - Return true if this argument has the noalias attribute on
/// it in its containing function.
bool Argument::hasNoAliasAttr() const {
if (!isa<PointerType>(getType())) return false;
- return getParent()->paramHasAttr(getArgNo()+1, ParamAttr::NoAlias);
+ return getParent()->paramHasAttr(getArgNo()+1, Attribute::NoAlias);
}
/// hasSRetAttr - Return true if this argument has the sret attribute on
@@ -108,17 +108,17 @@
if (!isa<PointerType>(getType())) return false;
if (this != getParent()->arg_begin())
return false; // StructRet param must be first param
- return getParent()->paramHasAttr(1, ParamAttr::StructRet);
+ return getParent()->paramHasAttr(1, Attribute::StructRet);
}
-/// addAttr - Add a ParamAttr to an argument
+/// addAttr - Add a Attribute to an argument
void Argument::addAttr(Attributes attr) {
- getParent()->addParamAttr(getArgNo() + 1, attr);
+ getParent()->addAttribute(getArgNo() + 1, attr);
}
-/// removeAttr - Remove a ParamAttr from an argument
+/// removeAttr - Remove a Attribute from an argument
void Argument::removeAttr(Attributes attr) {
- getParent()->removeParamAttr(getArgNo() + 1, attr);
+ getParent()->removeAttribute(getArgNo() + 1, attr);
}
@@ -172,7 +172,7 @@
// Ensure intrinsics have the right parameter attributes.
if (unsigned IID = getIntrinsicID(true))
- setParamAttrs(Intrinsic::getParamAttrs(Intrinsic::ID(IID)));
+ setAttributes(Intrinsic::getAttributes(Intrinsic::ID(IID)));
}
@@ -229,16 +229,16 @@
BasicBlocks.clear(); // Delete all basic blocks...
}
-void Function::addParamAttr(unsigned i, Attributes attr) {
- PAListPtr PAL = getParamAttrs();
+void Function::addAttribute(unsigned i, Attributes attr) {
+ AttrListPtr PAL = getAttributes();
PAL = PAL.addAttr(i, attr);
- setParamAttrs(PAL);
+ setAttributes(PAL);
}
-void Function::removeParamAttr(unsigned i, Attributes attr) {
- PAListPtr PAL = getParamAttrs();
+void Function::removeAttribute(unsigned i, Attributes attr) {
+ AttrListPtr PAL = getAttributes();
PAL = PAL.removeAttr(i, attr);
- setParamAttrs(PAL);
+ setAttributes(PAL);
}
// Maintain the GC name for each function in an on-the-side table. This saves
@@ -286,7 +286,7 @@
GlobalValue::copyAttributesFrom(Src);
const Function *SrcF = cast<Function>(Src);
setCallingConv(SrcF->getCallingConv());
- setParamAttrs(SrcF->getParamAttrs());
+ setAttributes(SrcF->getAttributes());
if (SrcF->hasGC())
setGC(SrcF->getGC());
else
@@ -355,18 +355,18 @@
return FunctionType::get(ResultTy, ArgTys, IsVarArg);
}
-PAListPtr Intrinsic::getParamAttrs(ID id) {
- Attributes Attr = ParamAttr::None;
+AttrListPtr Intrinsic::getAttributes(ID id) {
+ Attributes Attr = Attribute::None;
#define GET_INTRINSIC_ATTRIBUTES
#include "llvm/Intrinsics.gen"
#undef GET_INTRINSIC_ATTRIBUTES
// Intrinsics cannot throw exceptions.
- Attr |= ParamAttr::NoUnwind;
+ Attr |= Attribute::NoUnwind;
- FnAttributeWithIndex PAWI = FnAttributeWithIndex::get(0, Attr);
- return PAListPtr::get(&PAWI, 1);
+ AttributeWithIndex PAWI = AttributeWithIndex::get(0, Attr);
+ return AttrListPtr::get(&PAWI, 1);
}
Function *Intrinsic::getDeclaration(Module *M, ID id, const Type **Tys,
Modified: llvm/trunk/lib/VMCore/Instructions.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/Instructions.cpp?rev=56622&r1=56621&r2=56622&view=diff
==============================================================================
--- llvm/trunk/lib/VMCore/Instructions.cpp (original)
+++ llvm/trunk/lib/VMCore/Instructions.cpp Thu Sep 25 16:00:45 2008
@@ -41,17 +41,17 @@
else
cast<InvokeInst>(I)->setCallingConv(CC);
}
-const PAListPtr &CallSite::getParamAttrs() const {
+const AttrListPtr &CallSite::getAttributes() const {
if (CallInst *CI = dyn_cast<CallInst>(I))
- return CI->getParamAttrs();
+ return CI->getAttributes();
else
- return cast<InvokeInst>(I)->getParamAttrs();
+ return cast<InvokeInst>(I)->getAttributes();
}
-void CallSite::setParamAttrs(const PAListPtr &PAL) {
+void CallSite::setAttributes(const AttrListPtr &PAL) {
if (CallInst *CI = dyn_cast<CallInst>(I))
- CI->setParamAttrs(PAL);
+ CI->setAttributes(PAL);
else
- cast<InvokeInst>(I)->setParamAttrs(PAL);
+ cast<InvokeInst>(I)->setAttributes(PAL);
}
bool CallSite::paramHasAttr(uint16_t i, Attributes attr) const {
if (CallInst *CI = dyn_cast<CallInst>(I))
@@ -394,7 +394,7 @@
: Instruction(CI.getType(), Instruction::Call,
OperandTraits<CallInst>::op_end(this) - CI.getNumOperands(),
CI.getNumOperands()) {
- setParamAttrs(CI.getParamAttrs());
+ setAttributes(CI.getAttributes());
SubclassData = CI.SubclassData;
Use *OL = OperandList;
Use *InOL = CI.OperandList;
@@ -402,20 +402,20 @@
OL[i] = InOL[i];
}
-void CallInst::addParamAttr(unsigned i, Attributes attr) {
- PAListPtr PAL = getParamAttrs();
+void CallInst::addAttribute(unsigned i, Attributes attr) {
+ AttrListPtr PAL = getAttributes();
PAL = PAL.addAttr(i, attr);
- setParamAttrs(PAL);
+ setAttributes(PAL);
}
-void CallInst::removeParamAttr(unsigned i, Attributes attr) {
- PAListPtr PAL = getParamAttrs();
+void CallInst::removeAttribute(unsigned i, Attributes attr) {
+ AttrListPtr PAL = getAttributes();
PAL = PAL.removeAttr(i, attr);
- setParamAttrs(PAL);
+ setAttributes(PAL);
}
bool CallInst::paramHasAttr(unsigned i, Attributes attr) const {
- if (ParamAttrs.paramHasAttr(i, attr))
+ if (AttributeList.paramHasAttr(i, attr))
return true;
if (const Function *F = getCalledFunction())
return F->paramHasAttr(i, attr);
@@ -456,7 +456,7 @@
OperandTraits<InvokeInst>::op_end(this)
- II.getNumOperands(),
II.getNumOperands()) {
- setParamAttrs(II.getParamAttrs());
+ setAttributes(II.getAttributes());
SubclassData = II.SubclassData;
Use *OL = OperandList, *InOL = II.OperandList;
for (unsigned i = 0, e = II.getNumOperands(); i != e; ++i)
@@ -474,23 +474,23 @@
}
bool InvokeInst::paramHasAttr(unsigned i, Attributes attr) const {
- if (ParamAttrs.paramHasAttr(i, attr))
+ if (AttributeList.paramHasAttr(i, attr))
return true;
if (const Function *F = getCalledFunction())
return F->paramHasAttr(i, attr);
return false;
}
-void InvokeInst::addParamAttr(unsigned i, Attributes attr) {
- PAListPtr PAL = getParamAttrs();
+void InvokeInst::addAttribute(unsigned i, Attributes attr) {
+ AttrListPtr PAL = getAttributes();
PAL = PAL.addAttr(i, attr);
- setParamAttrs(PAL);
+ setAttributes(PAL);
}
-void InvokeInst::removeParamAttr(unsigned i, Attributes attr) {
- PAListPtr PAL = getParamAttrs();
+void InvokeInst::removeAttribute(unsigned i, Attributes attr) {
+ AttrListPtr PAL = getAttributes();
PAL = PAL.removeAttr(i, attr);
- setParamAttrs(PAL);
+ setAttributes(PAL);
}
Modified: llvm/trunk/lib/VMCore/Verifier.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/Verifier.cpp?rev=56622&r1=56621&r2=56622&view=diff
==============================================================================
--- llvm/trunk/lib/VMCore/Verifier.cpp (original)
+++ llvm/trunk/lib/VMCore/Verifier.cpp Thu Sep 25 16:00:45 2008
@@ -270,7 +270,7 @@
unsigned Count, ...);
void VerifyAttrs(Attributes Attrs, const Type *Ty,
bool isReturnValue, const Value *V);
- void VerifyFunctionAttrs(const FunctionType *FT, const PAListPtr &Attrs,
+ void VerifyFunctionAttrs(const FunctionType *FT, const AttrListPtr &Attrs,
const Value *V);
void WriteValue(const Value *V) {
@@ -408,38 +408,38 @@
// value of the specified type. The value V is printed in error messages.
void Verifier::VerifyAttrs(Attributes Attrs, const Type *Ty,
bool isReturnValue, const Value *V) {
- if (Attrs == ParamAttr::None)
+ if (Attrs == Attribute::None)
return;
if (isReturnValue) {
- Attributes RetI = Attrs & ParamAttr::ParameterOnly;
- Assert1(!RetI, "Attribute " + ParamAttr::getAsString(RetI) +
+ Attributes RetI = Attrs & Attribute::ParameterOnly;
+ Assert1(!RetI, "Attribute " + Attribute::getAsString(RetI) +
" does not apply to return values!", V);
} else {
- Attributes ParmI = Attrs & ParamAttr::ReturnOnly;
- Assert1(!ParmI, "Attribute " + ParamAttr::getAsString(ParmI) +
+ Attributes ParmI = Attrs & Attribute::ReturnOnly;
+ Assert1(!ParmI, "Attribute " + Attribute::getAsString(ParmI) +
" only applies to return values!", V);
}
for (unsigned i = 0;
- i < array_lengthof(ParamAttr::MutuallyIncompatible); ++i) {
- Attributes MutI = Attrs & ParamAttr::MutuallyIncompatible[i];
+ i < array_lengthof(Attribute::MutuallyIncompatible); ++i) {
+ Attributes MutI = Attrs & Attribute::MutuallyIncompatible[i];
Assert1(!(MutI & (MutI - 1)), "Attributes " +
- ParamAttr::getAsString(MutI) + " are incompatible!", V);
+ Attribute::getAsString(MutI) + " are incompatible!", V);
}
- Attributes TypeI = Attrs & ParamAttr::typeIncompatible(Ty);
+ Attributes TypeI = Attrs & Attribute::typeIncompatible(Ty);
Assert1(!TypeI, "Wrong type for attribute " +
- ParamAttr::getAsString(TypeI), V);
+ Attribute::getAsString(TypeI), V);
- Attributes ByValI = Attrs & ParamAttr::ByVal;
+ Attributes ByValI = Attrs & Attribute::ByVal;
if (const PointerType *PTy = dyn_cast<PointerType>(Ty)) {
Assert1(!ByValI || PTy->getElementType()->isSized(),
- "Attribute " + ParamAttr::getAsString(ByValI) +
+ "Attribute " + Attribute::getAsString(ByValI) +
" does not support unsized types!", V);
} else {
Assert1(!ByValI,
- "Attribute " + ParamAttr::getAsString(ByValI) +
+ "Attribute " + Attribute::getAsString(ByValI) +
" only applies to parameters with pointer type!", V);
}
}
@@ -447,7 +447,7 @@
// VerifyFunctionAttrs - Check parameter attributes against a function type.
// The value V is printed in error messages.
void Verifier::VerifyFunctionAttrs(const FunctionType *FT,
- const PAListPtr &Attrs,
+ const AttrListPtr &Attrs,
const Value *V) {
if (Attrs.isEmpty())
return;
@@ -455,7 +455,7 @@
bool SawNest = false;
for (unsigned i = 0, e = Attrs.getNumSlots(); i != e; ++i) {
- const FnAttributeWithIndex &Attr = Attrs.getSlot(i);
+ const AttributeWithIndex &Attr = Attrs.getSlot(i);
const Type *Ty;
if (Attr.Index == 0)
@@ -467,17 +467,17 @@
VerifyAttrs(Attr.Attrs, Ty, Attr.Index == 0, V);
- if (Attr.Attrs & ParamAttr::Nest) {
+ if (Attr.Attrs & Attribute::Nest) {
Assert1(!SawNest, "More than one parameter has attribute nest!", V);
SawNest = true;
}
- if (Attr.Attrs & ParamAttr::StructRet)
+ if (Attr.Attrs & Attribute::StructRet)
Assert1(Attr.Index == 1, "Attribute sret not on first parameter!", V);
}
}
-static bool VerifyAttributeCount(const PAListPtr &Attrs, unsigned Params) {
+static bool VerifyAttributeCount(const AttrListPtr &Attrs, unsigned Params) {
if (Attrs.isEmpty())
return true;
@@ -508,7 +508,7 @@
Assert1(!F.hasStructRetAttr() || F.getReturnType() == Type::VoidTy,
"Invalid struct return type!", &F);
- const PAListPtr &Attrs = F.getParamAttrs();
+ const AttrListPtr &Attrs = F.getAttributes();
Assert1(VerifyAttributeCount(Attrs, FT->getNumParams()),
"Attributes after last parameter!", &F);
@@ -965,7 +965,7 @@
"Call parameter type does not match function signature!",
CS.getArgument(i), FTy->getParamType(i), I);
- const PAListPtr &Attrs = CS.getParamAttrs();
+ const AttrListPtr &Attrs = CS.getAttributes();
Assert1(VerifyAttributeCount(Attrs, CS.arg_size()),
"Attributes after last parameter!", I);
@@ -976,12 +976,12 @@
if (FTy->isVarArg())
// Check attributes on the varargs part.
for (unsigned Idx = 1 + FTy->getNumParams(); Idx <= CS.arg_size(); ++Idx) {
- Attributes Attr = Attrs.getParamAttrs(Idx);
+ Attributes Attr = Attrs.getAttributes(Idx);
VerifyAttrs(Attr, CS.getArgument(Idx-1)->getType(), false, I);
- Attributes VArgI = Attr & ParamAttr::VarArgsIncompatible;
- Assert1(!VArgI, "Attribute " + ParamAttr::getAsString(VArgI) +
+ Attributes VArgI = Attr & Attribute::VarArgsIncompatible;
+ Assert1(!VArgI, "Attribute " + Attribute::getAsString(VArgI) +
" cannot be used for vararg call arguments!", I);
}
@@ -1523,7 +1523,7 @@
}
// Check parameter attributes.
- Assert1(F->getParamAttrs() == Intrinsic::getParamAttrs(ID),
+ Assert1(F->getAttributes() == Intrinsic::getAttributes(ID),
"Intrinsic has wrong parameter attributes!", F);
}
Modified: llvm/trunk/utils/TableGen/IntrinsicEmitter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/IntrinsicEmitter.cpp?rev=56622&r1=56621&r2=56622&view=diff
==============================================================================
--- llvm/trunk/utils/TableGen/IntrinsicEmitter.cpp (original)
+++ llvm/trunk/utils/TableGen/IntrinsicEmitter.cpp Thu Sep 25 16:00:45 2008
@@ -314,7 +314,7 @@
break;
}
}
- OS << " Attr |= ParamAttr::ReadNone; // These do not access memory.\n";
+ OS << " Attr |= Attribute::ReadNone; // These do not access memory.\n";
OS << " break;\n";
for (unsigned i = 0, e = Ints.size(); i != e; ++i) {
switch (Ints[i].ModRef) {
@@ -325,7 +325,7 @@
break;
}
}
- OS << " Attr |= ParamAttr::ReadOnly; // These do not write memory.\n";
+ OS << " Attr |= Attribute::ReadOnly; // These do not write memory.\n";
OS << " break;\n";
OS << " }\n";
OS << "#endif\n\n";
More information about the llvm-commits
mailing list