From fbd38fe2e34e5c4d0415514e24bacc02d6876540 Mon Sep 17 00:00:00 2001 From: Bill Wendling Date: Mon, 15 Oct 2012 07:29:08 +0000 Subject: Add an enum for the return and function indexes into the AttrListPtr object. This gets rid of some magic numbers. llvm-svn: 165924 --- llvm/utils/TableGen/IntrinsicEmitter.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'llvm/utils/TableGen') diff --git a/llvm/utils/TableGen/IntrinsicEmitter.cpp b/llvm/utils/TableGen/IntrinsicEmitter.cpp index 0e0a6bb6e75..e830a66a33b 100644 --- a/llvm/utils/TableGen/IntrinsicEmitter.cpp +++ b/llvm/utils/TableGen/IntrinsicEmitter.cpp @@ -606,8 +606,8 @@ EmitAttributes(const std::vector &Ints, raw_ostream &OS) { OS << " AttrVec.push_back(Attributes::ReadNone);\n"; break; } - OS << " AWI[" << numAttrs++ << "] = AttributeWithIndex::get(C, ~0, " - << "AttrVec);\n"; + OS << " AWI[" << numAttrs++ << "] = AttributeWithIndex::get(C, " + << "AttrListPtr::FunctionIndex, AttrVec);\n"; } if (numAttrs) { -- cgit v1.2.3