summaryrefslogtreecommitdiffstats
path: root/lib/IR
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2013-02-10 23:18:05 +0000
committerBill Wendling <isanbard@gmail.com>2013-02-10 23:18:05 +0000
commit2153691a8ba35cb2bcf9237557b6cae7e9d8e68d (patch)
treebf6f6ef6e413c3fd7b237f2eaff1971a2679ff0e /lib/IR
parent8620bd31789f03c21d2d4c0885f1d9f86345b878 (diff)
downloadexternal_llvm-2153691a8ba35cb2bcf9237557b6cae7e9d8e68d.zip
external_llvm-2153691a8ba35cb2bcf9237557b6cae7e9d8e68d.tar.gz
external_llvm-2153691a8ba35cb2bcf9237557b6cae7e9d8e68d.tar.bz2
The 'Raw' method cannot handle 'string' attributes. Don't even try.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174848 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/IR')
-rw-r--r--lib/IR/Attributes.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/IR/Attributes.cpp b/lib/IR/Attributes.cpp
index e64603c..343f569 100644
--- a/lib/IR/Attributes.cpp
+++ b/lib/IR/Attributes.cpp
@@ -468,6 +468,10 @@ uint64_t AttributeSetImpl::Raw(uint64_t Index) const {
for (AttributeSetNode::const_iterator II = ASN->begin(),
IE = ASN->end(); II != IE; ++II) {
Attribute Attr = *II;
+
+ // This cannot handle string attributes.
+ if (Attr.isStringAttribute()) continue;
+
Attribute::AttrKind Kind = Attr.getKindAsEnum();
if (Kind == Attribute::Alignment)