https://bugs.llvm.org/show_bug.cgi?id=50735
David Blaikie <[email protected]> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |[email protected]
Status|NEW |RESOLVED
Resolution|--- |INVALID
--- Comment #1 from David Blaikie <[email protected]> ---
"const" on member functions is very different than __attribute__((const)) for
instance, in the code below it would be entirely valid for the
Function_Attributes_const_0 member function to return a different value on each
call (eg: it could use a global variable and increment it then return the
incremented value) - so this optimization cannot be performed.
You can put __attribute__((const)) on the member function and then it should do
what you expect.
--
You are receiving this mail because:
You are on the CC list for the bug._______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs