summaryrefslogtreecommitdiff
path: root/lib/IR
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2013-04-29 23:48:06 +0000
committerBill Wendling <isanbard@gmail.com>2013-04-29 23:48:06 +0000
commit725dae57916800c7371c5008bd451fb3edb273b2 (patch)
tree767dc82f63c34480e662c9823f1223352fe62f84 /lib/IR
parentff6222ef2f474aea9fcca38a69be6245a4af2aa3 (diff)
downloadllvm-725dae57916800c7371c5008bd451fb3edb273b2.tar.gz
llvm-725dae57916800c7371c5008bd451fb3edb273b2.tar.bz2
llvm-725dae57916800c7371c5008bd451fb3edb273b2.tar.xz
Revert the command line option patch. However, keep the part that makes this pass on Windows. I.e., we don't emit the target dependent attributes in a comment before the function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180750 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/IR')
-rw-r--r--lib/IR/AsmWriter.cpp22
-rw-r--r--lib/IR/Attributes.cpp3
2 files changed, 5 insertions, 20 deletions
diff --git a/lib/IR/AsmWriter.cpp b/lib/IR/AsmWriter.cpp
index 5e9c52080f..dd0abba0e4 100644
--- a/lib/IR/AsmWriter.cpp
+++ b/lib/IR/AsmWriter.cpp
@@ -33,7 +33,6 @@
#include "llvm/IR/TypeFinder.h"
#include "llvm/IR/ValueSymbolTable.h"
#include "llvm/Support/CFG.h"
-#include "llvm/Support/CommandLine.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/Dwarf.h"
#include "llvm/Support/ErrorHandling.h"
@@ -43,12 +42,6 @@
#include <cctype>
using namespace llvm;
-static cl::opt<bool>
-OldStyleAttrSyntax("enable-old-style-attr-syntax",
- cl::desc("Output attributes on functions rather than in attribute groups"),
- cl::Hidden,
- cl::init(false));
-
// Make virtual table appear in this compilation unit.
AssemblyAnnotationWriter::~AssemblyAnnotationWriter() {}
@@ -1385,7 +1378,7 @@ void AssemblyWriter::printModule(const Module *M) {
printFunction(I);
// Output all attribute groups.
- if (!OldStyleAttrSyntax && !Machine.as_empty()) {
+ if (!Machine.as_empty()) {
Out << '\n';
writeAllAttributeGroups();
}
@@ -1613,7 +1606,7 @@ void AssemblyWriter::printFunction(const Function *F) {
Out << "; Materializable\n";
const AttributeSet &Attrs = F->getAttributes();
- if (!OldStyleAttrSyntax && Attrs.hasAttributes(AttributeSet::FunctionIndex)) {
+ if (Attrs.hasAttributes(AttributeSet::FunctionIndex)) {
AttributeSet AS = Attrs.getFnAttributes();
std::string AttrStr = AS.getAsString(AttributeSet::FunctionIndex, false);
if (!AttrStr.empty())
@@ -1677,15 +1670,8 @@ void AssemblyWriter::printFunction(const Function *F) {
Out << ')';
if (F->hasUnnamedAddr())
Out << " unnamed_addr";
- if (!OldStyleAttrSyntax) {
- if (Attrs.hasAttributes(AttributeSet::FunctionIndex))
- Out << " #" << Machine.getAttributeGroupSlot(Attrs.getFnAttributes());
- } else {
- AttributeSet AS = Attrs.getFnAttributes();
- std::string AttrStr = AS.getAsString(AttributeSet::FunctionIndex, false);
- if (!AttrStr.empty())
- Out << ' ' << AttrStr;
- }
+ if (Attrs.hasAttributes(AttributeSet::FunctionIndex))
+ Out << " #" << Machine.getAttributeGroupSlot(Attrs.getFnAttributes());
if (F->hasSection()) {
Out << " section \"";
PrintEscapedString(F->getSection(), Out);
diff --git a/lib/IR/Attributes.cpp b/lib/IR/Attributes.cpp
index 80968dbd1f..065f7725cc 100644
--- a/lib/IR/Attributes.cpp
+++ b/lib/IR/Attributes.cpp
@@ -851,8 +851,7 @@ unsigned AttributeSet::getStackAlignment(unsigned Index) const {
std::string AttributeSet::getAsString(unsigned Index, bool TargetIndependent,
bool InAttrGrp) const {
AttributeSetNode *ASN = getAttributes(Index);
- return ASN ? ASN->getAsString(TargetIndependent, InAttrGrp) :
- std::string("");
+ return ASN ? ASN->getAsString(TargetIndependent, InAttrGrp) : std::string("");
}
/// \brief The attributes for the specified index are returned.