Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F16
compilationdatabasehook.patch
All Users
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Subscribers
None
compilationdatabasehook.patch
View Options
Index: lib/Tooling/CompilationDatabase.cpp
===================================================================
--- lib/Tooling/CompilationDatabase.cpp
+++ lib/Tooling/CompilationDatabase.cpp
@@ -18,6 +18,10 @@
#include "llvm/Support/Path.h"
#include "llvm/Support/system_error.h"
+#ifdef USE_CUSTOM_COMPILATION_DATABASE
+#include "CustomCompilationDatabase.h"
+#endif
+
namespace clang {
namespace tooling {
@@ -124,6 +128,11 @@
static CompilationDatabase *
findCompilationDatabaseFromDirectory(StringRef Directory) {
+#ifdef USE_CUSTOM_COMPILATION_DATABASE
+ if (CompilationDatabase *DB =
+ ::findCompilationDatabaseForDirectory(Directory))
+ return DB;
+#endif
while (!Directory.empty()) {
std::string LoadErrorMessage;
Index: lib/Tooling/CustomCompilationDatabase.h
===================================================================
--- /dev/null
+++ lib/Tooling/CustomCompilationDatabase.h
@@ -0,0 +1,33 @@
+//===--- CustomCompilationDatabase.h --------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+//
+// This file contains a hook to supply a custom \c CompilationDatabase
+// implementation.
+//
+// The mechanism can be used by IDEs or non-public code bases to integrate with
+// their build system. Currently we support statically linking in an
+// implementation of \c findCompilationDatabaseForDirectory and enabling it
+// with -DUSE_CUSTOM_COMPILATION_DATABASE when compiling the Tooling library.
+//
+// FIXME: The strategy forward is to provide a plugin system that can load
+// custom compilation databases and make enabling that a build option.
+//
+//===----------------------------------------------------------------------===//
+
+#include "llvm/ADT/StringRef.h"
+
+namespace clang {
+namespace tooling {
+class CompilationDatabase;
+}
+}
+
+/// \brief Returns a CompilationDatabase for the given \c Directory.
+clang::tooling::CompilationDatabase *findCompilationDatabaseForDirectory(
+ llvm::StringRef Directory);
File Metadata
Details
Attached
Mime Type
text/x-diff
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
16
Attached To
D151918: [mlir][Vector] Adds a pattern to fold `arith.extf` into `vector.contract`
rG00a04de2edf7: [RISCV] Rename WriteFCvtF32ToF32 sched class to WriteFRoundF32.
D147749: [mlir][vector-to-gpu] Fix the Transpose Check in `mma.sync` VectorToGPU Lowering Path
rGb77be0bd5468: [RISCV] Be more explicit string replacements in RISCVInstrInfoVPseudos.td. NFC
rG66ff0731822a: [RISCV] Support F16 vectors with Zfhmin+Zvfh.
rGafa0ed33df07: [AMDGPU] Fix shrinking of F16 FMA on newer subtargets
D133489: [AMDGPU] Fix shrinking of F16 FMA on newer subtargets
rGea8ed5cbcfac: [mlir][sparse] Add F16 and BF16.
D127010: [mlir][sparse] Add F16 and BF16.
rGf8b692dd31d9: [mlir][python][f16] add ctype python binding support for f16
D126928: [mlir][python][f16] add ctype python binding support for f16
rGdd12c3433ee9: [AMDGPU] Shrink F16 MAD/FMA to MADAK/MADMK/FMAAK/FMAMK on GFX10
rGbbddd19ec723: [mlir][math] Expand coverage of atan2 expansion
D118968: [mlir][math] Expand coverage of atan2 expansion
D107548: [mlir] create gpu memset op
D106239: [AArch64] Expand the SVE min/max reduction costs to NEON
rGbfc60acd9803: [RISCV] Adjust RISCVInstrInfoVSDPatterns.td for different pseudo instructions…
D95404: [RISCV] Adjust RISCVInstrInfoVSDPatterns.td for different pseudo instructions for different FPR.
D90738: [RISCV] Support Zfh half-precision floating-point extension.
rGb08d2ddd69b4: [ARM,MVE] Add ACLE intrinsics for VCVT.F32.F16 family.
rG69441e53c9f4: [ARM,MVE] Correct MC operands in VCVT.F32.F16. (NFC)
D75253: [ARM,MVE] Correct MC operands in VCVT.F32.F16. (NFC)
rG49c4d2a630e2: Fix builder getFloatAttr of double to use F64 type and use fltSemantics in…
rGb87669f166ce: [ARM] Disallow PC, and optionally SP, in VMOVRH and VMOVHR.
rL362942: [ARM] Disallow PC, and optionally SP, in VMOVRH and VMOVHR.
D60704: [ARM] Disallow PC, and optionally SP, in VMOVRH and VMOVHR.
rG3a7532e645b9: [WebAssembly] Support f16 libcalls
rL359600: [WebAssembly] Support f16 libcalls
D61287: [WebAssembly] Support f16 libcalls
rGaccabdd5fa69: Merging r352229: Redirecting to URL 'https://llvm.org/svn/llvm…
rGe3f289c96976: Remove F16 literal support based on Float16 support.
rG21fde385faaf: [AArch64] Add fallback in FastISel fp16 conversions
rG558012a3fca0: Fix a few instances found in SelectionDAG where we were not handling F16 at…
rL352365: Merging r352229:
rL352229: Remove F16 literal support based on Float16 support.
rC352229: Remove F16 literal support based on Float16 support.
D54882: [AMDGPU] Add sdwa support for ADD|SUB U64 decomposed Pseudos
D50467: [SEMA] add more -Wfloat-conversion to compound assigment analysis
D47954: Utilize new SDNode flag functionality to expand current support for fdiv
D36792: [AArch64] v8.3-a complex number support
rL305127: [AArch64] Add fallback in FastISel fp16 conversions
D33734: [AArch64] Add fallback in FastISel fp16 conversions
Event Timeline
Log In to Comment