Merge the collected attributes into the call instruction's attributes.
authorBill Wendling <isanbard@gmail.com>
Tue, 12 Feb 2013 10:13:06 +0000 (10:13 +0000)
committerBill Wendling <isanbard@gmail.com>
Tue, 12 Feb 2013 10:13:06 +0000 (10:13 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174955 91177308-0d34-0410-b5e6-96231b3b80d8

lib/AsmParser/LLParser.cpp

index e4f8d1fec415aa1ed8db410b692e24358250a16a..c4b2c0f9bcdd2ecdd9df51d11a351403d1878620 100644 (file)
@@ -102,7 +102,7 @@ bool LLParser::ValidateEndOfModule() {
       AttrBuilder FnAttrs(AS.getFnAttributes(), AttributeSet::FunctionIndex);
       AS = AS.removeAttributes(Context, AttributeSet::FunctionIndex,
                                AS.getFnAttributes());
-
+      FnAttrs.merge(B);
       AS = AS.addAttributes(Context, AttributeSet::FunctionIndex,
                             AttributeSet::get(Context,
                                               AttributeSet::FunctionIndex,
@@ -113,7 +113,7 @@ bool LLParser::ValidateEndOfModule() {
       AttrBuilder FnAttrs(AS.getFnAttributes(), AttributeSet::FunctionIndex);
       AS = AS.removeAttributes(Context, AttributeSet::FunctionIndex,
                                AS.getFnAttributes());
-
+      FnAttrs.merge(B);
       AS = AS.addAttributes(Context, AttributeSet::FunctionIndex,
                             AttributeSet::get(Context,
                                               AttributeSet::FunctionIndex,