summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2012-10-15 04:46:55 +0000
committerBill Wendling <isanbard@gmail.com>2012-10-15 04:46:55 +0000
commitcb3de0bc800d7920087b19bb12a545d4cc84114e (patch)
treecbd5a447bcc1d11449532b3c92119f26eeb5a815 /utils
parenta239c2e6a7775e890bcfb0867b84e512ceb993de (diff)
downloadllvm-cb3de0bc800d7920087b19bb12a545d4cc84114e.tar.gz
llvm-cb3de0bc800d7920087b19bb12a545d4cc84114e.tar.bz2
llvm-cb3de0bc800d7920087b19bb12a545d4cc84114e.tar.xz
Attributes Rewrite
Convert the internal representation of the Attributes class into a pointer to an opaque object that's uniqued by and stored in the LLVMContext object. The Attributes class then becomes a thin wrapper around this opaque object. Eventually, the internal representation will be expanded to include attributes that represent code generation options, etc. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165917 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils')
-rw-r--r--utils/TableGen/IntrinsicEmitter.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/utils/TableGen/IntrinsicEmitter.cpp b/utils/TableGen/IntrinsicEmitter.cpp
index 080e711d55..0e0a6bb6e7 100644
--- a/utils/TableGen/IntrinsicEmitter.cpp
+++ b/utils/TableGen/IntrinsicEmitter.cpp
@@ -510,10 +510,10 @@ EmitAttributes(const std::vector<CodeGenIntrinsic> &Ints, raw_ostream &OS) {
OS << "// Add parameter attributes that are not common to all intrinsics.\n";
OS << "#ifdef GET_INTRINSIC_ATTRIBUTES\n";
if (TargetOnly)
- OS << "static AttrListPtr getAttributes(" << TargetPrefix
+ OS << "static AttrListPtr getAttributes(LLVMContext &C, " << TargetPrefix
<< "Intrinsic::ID id) {\n";
else
- OS << "AttrListPtr Intrinsic::getAttributes(ID id) {\n";
+ OS << "AttrListPtr Intrinsic::getAttributes(LLVMContext &C, ID id) {\n";
// Compute the maximum number of attribute arguments and the map
typedef std::map<const CodeGenIntrinsic*, unsigned,
@@ -582,7 +582,7 @@ EmitAttributes(const std::vector<CodeGenIntrinsic> &Ints, raw_ostream &OS) {
++ai;
} while (ai != ae && intrinsic.ArgumentAttributes[ai].first == argNo);
- OS << " AWI[" << numAttrs++ << "] = AttributeWithIndex::get("
+ OS << " AWI[" << numAttrs++ << "] = AttributeWithIndex::get(C, "
<< argNo+1 << ", AttrVec);\n";
}
}
@@ -606,7 +606,7 @@ EmitAttributes(const std::vector<CodeGenIntrinsic> &Ints, raw_ostream &OS) {
OS << " AttrVec.push_back(Attributes::ReadNone);\n";
break;
}
- OS << " AWI[" << numAttrs++ << "] = AttributeWithIndex::get(~0, "
+ OS << " AWI[" << numAttrs++ << "] = AttributeWithIndex::get(C, ~0, "
<< "AttrVec);\n";
}