[llvm] r179798 - Make the TargetIndependent flag have the right boolean value.
Bill Wendling
isanbard at gmail.com
Thu Apr 18 14:45:05 PDT 2013
Author: void
Date: Thu Apr 18 16:45:04 2013
New Revision: 179798
URL: http://llvm.org/viewvc/llvm-project?rev=179798&view=rev
Log:
Make the TargetIndependent flag have the right boolean value.
Modified:
llvm/trunk/include/llvm/IR/Attributes.h
llvm/trunk/lib/IR/AsmWriter.cpp
llvm/trunk/lib/IR/Attributes.cpp
Modified: llvm/trunk/include/llvm/IR/Attributes.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IR/Attributes.h?rev=179798&r1=179797&r2=179798&view=diff
==============================================================================
--- llvm/trunk/include/llvm/IR/Attributes.h (original)
+++ llvm/trunk/include/llvm/IR/Attributes.h Thu Apr 18 16:45:04 2013
@@ -306,7 +306,7 @@ public:
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;
Modified: llvm/trunk/lib/IR/AsmWriter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/AsmWriter.cpp?rev=179798&r1=179797&r2=179798&view=diff
==============================================================================
--- llvm/trunk/lib/IR/AsmWriter.cpp (original)
+++ llvm/trunk/lib/IR/AsmWriter.cpp Thu Apr 18 16:45:04 2013
@@ -1615,7 +1615,7 @@ void AssemblyWriter::printFunction(const
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 @@ void AssemblyWriter::printFunction(const
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 @@ void AssemblyWriter::writeAllAttributeGr
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";
}
Modified: llvm/trunk/lib/IR/Attributes.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/Attributes.cpp?rev=179798&r1=179797&r2=179798&view=diff
==============================================================================
--- llvm/trunk/lib/IR/Attributes.cpp (original)
+++ llvm/trunk/lib/IR/Attributes.cpp Thu Apr 18 16:45:04 2013
@@ -485,7 +485,7 @@ std::string AttributeSetNode::getAsStrin
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 {
More information about the llvm-commits
mailing list