[clang] ca964b4 - [OpenCL][NFC] Reorganize ClangOpenCLBuiltinEmitter comments
Sven van Haastregt via cfe-commits
cfe-commits at lists.llvm.org
Fri Jun 11 02:23:18 PDT 2021
Author: Sven van Haastregt
Date: 2021-06-11T10:22:59+01:00
New Revision: ca964b40e6e5d20fb658f2d36238b46a35dd860f
URL: https://github.com/llvm/llvm-project/commit/ca964b40e6e5d20fb658f2d36238b46a35dd860f
DIFF: https://github.com/llvm/llvm-project/commit/ca964b40e6e5d20fb658f2d36238b46a35dd860f.diff
LOG: [OpenCL][NFC] Reorganize ClangOpenCLBuiltinEmitter comments
Since 8866793b4e0a ("[OpenCL] Add OpenCL builtin test generator",
2021-06-09) there are two emitters in this file, so move the
file-level comment to the appropriate class.
Added:
Modified:
clang/utils/TableGen/ClangOpenCLBuiltinEmitter.cpp
Removed:
################################################################################
diff --git a/clang/utils/TableGen/ClangOpenCLBuiltinEmitter.cpp b/clang/utils/TableGen/ClangOpenCLBuiltinEmitter.cpp
index 5de034df348e8..a4cb5b7cacd98 100644
--- a/clang/utils/TableGen/ClangOpenCLBuiltinEmitter.cpp
+++ b/clang/utils/TableGen/ClangOpenCLBuiltinEmitter.cpp
@@ -8,6 +8,37 @@
//
//===----------------------------------------------------------------------===//
//
+// These backends consume the definitions of OpenCL builtin functions in
+// clang/lib/Sema/OpenCLBuiltins.td and produce builtin handling code for
+// inclusion in SemaLookup.cpp, or a test file that calls all declared builtins.
+//
+//===----------------------------------------------------------------------===//
+
+#include "TableGenBackends.h"
+#include "llvm/ADT/MapVector.h"
+#include "llvm/ADT/STLExtras.h"
+#include "llvm/ADT/SmallString.h"
+#include "llvm/ADT/StringExtras.h"
+#include "llvm/ADT/StringMap.h"
+#include "llvm/ADT/StringRef.h"
+#include "llvm/ADT/StringSwitch.h"
+#include "llvm/Support/ErrorHandling.h"
+#include "llvm/Support/raw_ostream.h"
+#include "llvm/TableGen/Error.h"
+#include "llvm/TableGen/Record.h"
+#include "llvm/TableGen/StringMatcher.h"
+#include "llvm/TableGen/TableGenBackend.h"
+
+using namespace llvm;
+
+namespace {
+
+// A list of signatures that are shared by one or more builtin functions.
+struct BuiltinTableEntries {
+ SmallVector<StringRef, 4> Names;
+ std::vector<std::pair<const Record *, unsigned>> Signatures;
+};
+
// This tablegen backend emits code for checking whether a function is an
// OpenCL builtin function. If so, all overloads of this function are
// added to the LookupResult. The generated include file is used by
@@ -53,33 +84,6 @@
// One OpenCLTypeStruct can represent multiple types, primarily when using
// GenTypes.
//
-//===----------------------------------------------------------------------===//
-
-#include "TableGenBackends.h"
-#include "llvm/ADT/MapVector.h"
-#include "llvm/ADT/STLExtras.h"
-#include "llvm/ADT/SmallString.h"
-#include "llvm/ADT/StringExtras.h"
-#include "llvm/ADT/StringMap.h"
-#include "llvm/ADT/StringRef.h"
-#include "llvm/ADT/StringSwitch.h"
-#include "llvm/Support/ErrorHandling.h"
-#include "llvm/Support/raw_ostream.h"
-#include "llvm/TableGen/Error.h"
-#include "llvm/TableGen/Record.h"
-#include "llvm/TableGen/StringMatcher.h"
-#include "llvm/TableGen/TableGenBackend.h"
-
-using namespace llvm;
-
-namespace {
-
-// A list of signatures that are shared by one or more builtin functions.
-struct BuiltinTableEntries {
- SmallVector<StringRef, 4> Names;
- std::vector<std::pair<const Record *, unsigned>> Signatures;
-};
-
class BuiltinNameEmitter {
public:
BuiltinNameEmitter(RecordKeeper &Records, raw_ostream &OS)
More information about the cfe-commits
mailing list