[llvm-commits] [llvm-gcc-4.0] r44271 - /llvm-gcc-4.0/trunk/gcc/llvm-types.cpp
Duncan Sands
baldrick at free.fr
Thu Nov 22 12:23:01 PST 2007
Author: baldrick
Date: Thu Nov 22 14:22:59 2007
New Revision: 44271
URL: http://llvm.org/viewvc/llvm-project?rev=44271&view=rev
Log:
Fix needed due to parameter attribute renaming:
const -> readnone; pure -> readonly.
Modified:
llvm-gcc-4.0/trunk/gcc/llvm-types.cpp
Modified: llvm-gcc-4.0/trunk/gcc/llvm-types.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.0/trunk/gcc/llvm-types.cpp?rev=44271&r1=44270&r2=44271&view=diff
==============================================================================
--- llvm-gcc-4.0/trunk/gcc/llvm-types.cpp (original)
+++ llvm-gcc-4.0/trunk/gcc/llvm-types.cpp Thu Nov 22 14:22:59 2007
@@ -990,13 +990,6 @@
int flags = flags_from_decl_or_type(decl ? decl : type);
- // Check for 'const' function attribute.
- if (flags & ECF_CONST)
- // Since they write the return value through a pointer,
- // 'sret' functions cannot be 'const'.
- if (!ABIConverter.isStructReturn())
- RAttributes |= ParamAttr::Const;
-
// Check for 'noreturn' function attribute.
if (flags & ECF_NORETURN)
RAttributes |= ParamAttr::NoReturn;
@@ -1005,12 +998,19 @@
if (flags & ECF_NOTHROW)
RAttributes |= ParamAttr::NoUnwind;
- // Check for 'pure' function attribute.
+ // Check for 'readnone' function attribute.
+ if (flags & ECF_CONST)
+ // Since they write the return value through a pointer,
+ // 'sret' functions cannot be 'readnone'.
+ if (!ABIConverter.isStructReturn())
+ RAttributes |= ParamAttr::ReadNone;
+
+ // Check for 'readonly' function attribute.
if (flags & ECF_PURE)
// Since they write the return value through a pointer,
- // 'sret' functions cannot be 'pure'.
+ // 'sret' functions cannot be 'readonly'.
if (!ABIConverter.isStructReturn())
- RAttributes |= ParamAttr::Pure;
+ RAttributes |= ParamAttr::ReadOnly;
// Compute whether the result needs to be zext or sext'd.
if (isa<IntegerType>(RetTy.get())) {
More information about the llvm-commits
mailing list