[llvm] r356532 - Add workaround to build scoped enums with VS2015. NFCI.

Douglas Yung via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 19 17:26:57 PDT 2019


Author: dyung
Date: Tue Mar 19 17:26:56 2019
New Revision: 356532

URL: http://llvm.org/viewvc/llvm-project?rev=356532&view=rev
Log:
Add workaround to build scoped enums with VS2015. NFCI.

We need this as we still have internal build bots on VS2015.

Modified:
    llvm/trunk/include/llvm/Remarks/Remark.h
    llvm/trunk/lib/Remarks/RemarkParserImpl.h

Modified: llvm/trunk/include/llvm/Remarks/Remark.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Remarks/Remark.h?rev=356532&r1=356531&r2=356532&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Remarks/Remark.h (original)
+++ llvm/trunk/include/llvm/Remarks/Remark.h Tue Mar 19 17:26:56 2019
@@ -62,7 +62,7 @@ enum class Type {
 /// A remark type used for both emission and parsing.
 struct Remark {
   /// The type of the remark.
-  enum Type RemarkType = Type::Unknown;
+  enum class Type RemarkType = Type::Unknown;
 
   /// Name of the pass that triggers the emission of this remark.
   StringRef PassName;

Modified: llvm/trunk/lib/Remarks/RemarkParserImpl.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Remarks/RemarkParserImpl.h?rev=356532&r1=356531&r2=356532&view=diff
==============================================================================
--- llvm/trunk/lib/Remarks/RemarkParserImpl.h (original)
+++ llvm/trunk/lib/Remarks/RemarkParserImpl.h Tue Mar 19 17:26:56 2019
@@ -21,7 +21,7 @@ struct ParserImpl {
 
   // The parser kind. This is used as a tag to safely cast between
   // implementations.
-  enum Kind ParserKind;
+  enum class Kind ParserKind;
 };
 } // end namespace remarks
 } // end namespace llvm




More information about the llvm-commits mailing list