aboutsummaryrefslogtreecommitdiff
path: root/lib/IR/Attributes.cpp
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2013-01-09 00:32:08 +0000
committerBill Wendling <isanbard@gmail.com>2013-01-09 00:32:08 +0000
commitff887165bc221c0398c0d4404dc0b22de216dedf (patch)
tree646dc0a09c5a5d4f857013e15a8a22ac667ef7f9 /lib/IR/Attributes.cpp
parent935e35d2b9f889566207b76a7026b63a1619742c (diff)
Add the integer value of the ConstantInt instead of the Constant* value.
This is causing some problems. The root cause is unknown at this time. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171923 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/IR/Attributes.cpp')
-rw-r--r--lib/IR/Attributes.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/IR/Attributes.cpp b/lib/IR/Attributes.cpp
index bef7a6c174..01a59a33c0 100644
--- a/lib/IR/Attributes.cpp
+++ b/lib/IR/Attributes.cpp
@@ -509,6 +509,14 @@ void AttributeImpl::setStackAlignment(unsigned Align) {
Vals.push_back(ConstantInt::get(Type::getInt64Ty(Context), Align));
}
+void Profile(FoldingSetNodeID &ID, Constant *Data,
+ ArrayRef<Constant*> Vals) {
+ ID.AddInteger(cast<ConstantInt>(Data)->getZExtValue());
+ for (ArrayRef<Constant*>::iterator I = Vals.begin(), E = Vals.end();
+ I != E; ++I)
+ ID.AddPointer(*I);
+}
+
//===----------------------------------------------------------------------===//
// AttributeSetImpl Definition
//===----------------------------------------------------------------------===//