Make the TargetIndependent flag have the right boolean value.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179798 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/include/llvm/IR/Attributes.h b/include/llvm/IR/Attributes.h
index 4e113d6..f93f28b 100644
--- a/include/llvm/IR/Attributes.h
+++ b/include/llvm/IR/Attributes.h
@@ -306,7 +306,7 @@
   unsigned getStackAlignment(unsigned Index) const;
 
   /// \brief Return the attributes at the index as a string.
-  std::string getAsString(unsigned Index, bool TargetIndependent = false,
+  std::string getAsString(unsigned Index, bool TargetIndependent = true,
                           bool InAttrGrp = false) const;
 
   typedef ArrayRef<Attribute>::iterator iterator;
diff --git a/lib/IR/AsmWriter.cpp b/lib/IR/AsmWriter.cpp
index 6b0bfd5..5e9c520 100644
--- a/lib/IR/AsmWriter.cpp
+++ b/lib/IR/AsmWriter.cpp
@@ -1615,7 +1615,7 @@
   const AttributeSet &Attrs = F->getAttributes();
   if (!OldStyleAttrSyntax && Attrs.hasAttributes(AttributeSet::FunctionIndex)) {
     AttributeSet AS = Attrs.getFnAttributes();
-    std::string AttrStr = AS.getAsString(AttributeSet::FunctionIndex, true);
+    std::string AttrStr = AS.getAsString(AttributeSet::FunctionIndex, false);
     if (!AttrStr.empty())
       Out << "; Function Attrs: " << AttrStr << '\n';
   }
@@ -1682,7 +1682,7 @@
       Out << " #" << Machine.getAttributeGroupSlot(Attrs.getFnAttributes());
   } else {
     AttributeSet AS = Attrs.getFnAttributes();
-    std::string AttrStr = AS.getAsString(AttributeSet::FunctionIndex, true);
+    std::string AttrStr = AS.getAsString(AttributeSet::FunctionIndex, false);
     if (!AttrStr.empty())
       Out << ' ' << AttrStr;
   }
@@ -2156,7 +2156,7 @@
   for (std::vector<std::pair<AttributeSet, unsigned> >::iterator
          I = asVec.begin(), E = asVec.end(); I != E; ++I)
     Out << "attributes #" << I->second << " = { "
-        << I->first.getAsString(AttributeSet::FunctionIndex, false, true)
+        << I->first.getAsString(AttributeSet::FunctionIndex, true, true)
         << " }\n";
 }
 
diff --git a/lib/IR/Attributes.cpp b/lib/IR/Attributes.cpp
index d2b438f..98dcecf 100644
--- a/lib/IR/Attributes.cpp
+++ b/lib/IR/Attributes.cpp
@@ -485,7 +485,7 @@
   std::string Str = "";
   for (SmallVectorImpl<Attribute>::const_iterator I = AttrList.begin(),
          E = AttrList.end(); I != E; ) {
-    if (!TargetIndependent || !I->isStringAttribute()) {
+    if (TargetIndependent || !I->isStringAttribute()) {
       Str += I->getAsString(InAttrGrp);
       if (++I != E) Str += " ";
     } else {