summaryrefslogtreecommitdiffstats
path: root/lib/IR
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2013-02-10 10:13:23 +0000
committerBill Wendling <isanbard@gmail.com>2013-02-10 10:13:23 +0000
commit09ed9101c8c7e93c1d814e75ff906bf904778dbb (patch)
treed9087aaeb5d3e39912933d4ffd77bf1eb382b1de /lib/IR
parent0f7422057e7cf0426f5bb293107b756b5de80523 (diff)
downloadexternal_llvm-09ed9101c8c7e93c1d814e75ff906bf904778dbb.zip
external_llvm-09ed9101c8c7e93c1d814e75ff906bf904778dbb.tar.gz
external_llvm-09ed9101c8c7e93c1d814e75ff906bf904778dbb.tar.bz2
Handle string attributes in the AttrBuilder.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174834 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/IR')
-rw-r--r--lib/IR/Attributes.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/IR/Attributes.cpp b/lib/IR/Attributes.cpp
index 04e95ef..e64603c 100644
--- a/lib/IR/Attributes.cpp
+++ b/lib/IR/Attributes.cpp
@@ -879,7 +879,11 @@ AttrBuilder &AttrBuilder::addAttribute(Attribute::AttrKind Val) {
}
AttrBuilder &AttrBuilder::addAttribute(Attribute Attr) {
- // FIXME: Handle string attributes.
+ if (Attr.isStringAttribute()) {
+ addAttribute(Attr.getKindAsString(), Attr.getValueAsString());
+ return *this;
+ }
+
Attribute::AttrKind Kind = Attr.getKindAsEnum();
Attrs.insert(Kind);