r221645 - Move SanitizerKind class to a separate header. NFC.

Alexey Samsonov vonosmas at gmail.com
Mon Nov 10 16:19:46 PST 2014


Author: samsonov
Date: Mon Nov 10 18:19:46 2014
New Revision: 221645

URL: http://llvm.org/viewvc/llvm-project?rev=221645&view=rev
Log:
Move SanitizerKind class to a separate header. NFC.

Added:
    cfe/trunk/include/clang/Basic/Sanitizers.h
Modified:
    cfe/trunk/include/clang/Basic/LangOptions.h

Modified: cfe/trunk/include/clang/Basic/LangOptions.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/LangOptions.h?rev=221645&r1=221644&r2=221645&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/LangOptions.h (original)
+++ cfe/trunk/include/clang/Basic/LangOptions.h Mon Nov 10 18:19:46 2014
@@ -18,17 +18,12 @@
 #include "clang/Basic/CommentOptions.h"
 #include "clang/Basic/LLVM.h"
 #include "clang/Basic/ObjCRuntime.h"
+#include "clang/Basic/Sanitizers.h"
 #include "clang/Basic/Visibility.h"
 #include <string>
 
 namespace clang {
 
-enum class SanitizerKind {
-#define SANITIZER(NAME, ID) ID,
-#include "clang/Basic/Sanitizers.def"
-  Unknown
-};
-
 class SanitizerOptions {
   /// \brief Bitmask of enabled sanitizers.
   unsigned Kind;

Added: cfe/trunk/include/clang/Basic/Sanitizers.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/Sanitizers.h?rev=221645&view=auto
==============================================================================
--- cfe/trunk/include/clang/Basic/Sanitizers.h (added)
+++ cfe/trunk/include/clang/Basic/Sanitizers.h Mon Nov 10 18:19:46 2014
@@ -0,0 +1,28 @@
+//===--- Sanitizers.h - C Language Family Language Options ------*- C++ -*-===//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+///
+/// \file
+/// \brief Defines the clang::SanitizerKind enum.
+///
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_CLANG_BASIC_SANITIZERS_H
+#define LLVM_CLANG_BASIC_SANITIZERS_H
+
+namespace clang {
+
+enum class SanitizerKind {
+#define SANITIZER(NAME, ID) ID,
+#include "clang/Basic/Sanitizers.def"
+  Unknown
+};
+
+}  // end namespace clang
+
+#endif





More information about the cfe-commits mailing list