[llvm] r174834 - Handle string attributes in the AttrBuilder.
Bill Wendling
isanbard at gmail.com
Sun Feb 10 02:13:24 PST 2013
Author: void
Date: Sun Feb 10 04:13:23 2013
New Revision: 174834
URL: http://llvm.org/viewvc/llvm-project?rev=174834&view=rev
Log:
Handle string attributes in the AttrBuilder.
Modified:
llvm/trunk/lib/IR/Attributes.cpp
Modified: llvm/trunk/lib/IR/Attributes.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/Attributes.cpp?rev=174834&r1=174833&r2=174834&view=diff
==============================================================================
--- llvm/trunk/lib/IR/Attributes.cpp (original)
+++ llvm/trunk/lib/IR/Attributes.cpp Sun Feb 10 04:13:23 2013
@@ -879,7 +879,11 @@ AttrBuilder &AttrBuilder::addAttribute(A
}
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);
More information about the llvm-commits
mailing list