llvm-project/flang/include/flang
Michael Kruse 2aa4335806 [flang] Fix copy elision assumption.
Before this patch, the Restorer depended on copy elision to happen.
Without copy elision, the function ScopedSet calls the move constructor
before its dtor. The dtor will prematurely restore the reference to the
original value.

Instead of relying the compiler to not use the Restorer's copy
constructor, delete its copy and assign operators. Hence, callers cannot
move or copy a Restorer object anymore, and have to explicitly provide
the reset state. ScopedSet avoids calling move/copy operations by
relying on unnamed return value optimization, which is mandatory in
C++17.

Reviewed By: klausler

Differential Revision: https://reviews.llvm.org/D88797
2020-12-14 14:07:05 -06:00
..
Common [flang] Fix copy elision assumption. 2020-12-14 14:07:05 -06:00
Config [flang] Minor format change to LLVM license lines 2020-01-10 12:12:03 -08:00
Decimal [flang][msvc] Avoid dependence on long double 2020-10-07 15:12:08 -07:00
Evaluate [flang] Fix bogus message on index-names in the presence of associated entities 2020-12-10 07:36:41 -08:00
Frontend [Flang][Driver] Add PrintPreprocessedInput FrontendAction (`flang-new -E`) 2020-11-02 14:03:35 +00:00
FrontendTool [Flang][Driver] Add infrastructure for basic frontend actions and file I/O 2020-10-24 14:58:32 +01:00
Lower [mlir][Types][NFC] Move all of the builtin Type classes to BuiltinTypes.h 2020-12-03 18:02:10 -08:00
Optimizer [flang] Use mlir::OpState::operator->() to get to methods of mlir::Operation. 2020-12-14 20:04:53 +01:00
Parser [Flang][OpenMP-5.0] Semantic checks for flush construct. 2020-12-14 13:30:48 +05:30
Semantics [flang] Implement derived type description table encoding 2020-12-08 10:26:58 -08:00
CMakeLists.txt [flang] Add Fortran IR (FIR) MLIR dialect implementation (flang-compiler/f18#1035) 2020-03-11 21:47:22 -07:00
ISO_Fortran_binding.h [flang] More Fortran runtime support for CHARACTER operations 2020-06-17 15:51:48 -07:00
Version.inc.in [flang] A rework of the cmake build components for in and out of tree builds. 2020-03-26 18:17:04 +00:00