[LLVMdev] Attribute after last parameter!

Caldarale, Charles R Chuck.Caldarale at unisys.com
Tue Jan 21 07:00:36 PST 2014


> From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu]
> On Behalf Of Lee Hammerton
> Subject: [LLVMdev] Attribute after last parameter!

> After some digging, I've narrowed it down to the following :
> 	function->setOnlyReadsMemory(true);

To set the function attribute, you should be using just setOnlyReadsMemory(), without a parameter.  With the parameter, you're telling it that the n'th (first, in this case) parameter is read-only.

 - Chuck





More information about the llvm-dev mailing list