[llvm] r336237 - [Support] Remove SaveOr which is no longer used

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 3 16:31:19 PDT 2018


Author: maskray
Date: Tue Jul  3 16:31:19 2018
New Revision: 336237

URL: http://llvm.org/viewvc/llvm-project?rev=336237&view=rev
Log:
[Support] Remove SaveOr which is no longer used

Modified:
    llvm/trunk/include/llvm/Support/SaveAndRestore.h

Modified: llvm/trunk/include/llvm/Support/SaveAndRestore.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/SaveAndRestore.h?rev=336237&r1=336236&r2=336237&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Support/SaveAndRestore.h (original)
+++ llvm/trunk/include/llvm/Support/SaveAndRestore.h Tue Jul  3 16:31:19 2018
@@ -32,18 +32,6 @@ private:
   T OldValue;
 };
 
-/// Similar to \c SaveAndRestore.  Operates only on bools; the old value of a
-/// variable is saved, and during the dstor the old value is or'ed with the new
-/// value.
-struct SaveOr {
-  SaveOr(bool &X) : X(X), OldValue(X) { X = false; }
-  ~SaveOr() { X |= OldValue; }
-
-private:
-  bool &X;
-  const bool OldValue;
-};
-
 } // namespace llvm
 
 #endif




More information about the llvm-commits mailing list