Add a new C++11 compatibility macro, LLVM_LVALUE_FUNCTION.
authorJordan Rose <jordan_rose@apple.com>
Fri, 30 Nov 2012 00:38:53 +0000 (00:38 +0000)
committerJordan Rose <jordan_rose@apple.com>
Fri, 30 Nov 2012 00:38:53 +0000 (00:38 +0000)
commitadf0c3d82dbff1480c63f1ebe68c7c1e6bb5828c
treea10f4de7a0982b7ffdabdc2cd57707bb31797843
parent1c83093cd5f4f6d33e732c817bb5afd033531beb
Add a new C++11 compatibility macro, LLVM_LVALUE_FUNCTION.

This expands to '&', and is intended to be used when an /optional/ rvalue
override is available.

Before:
  void foo() const { ... }

After:
  void foo() const LLVM_LVALUE_FUNCTION { ... }
  void foo() && { ... }

This is used to allow moving the contents of an Optional.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168963 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/ADT/Optional.h
include/llvm/Support/Compiler.h