[PATCH] D49265: [Tooling] Add operator== to CompileCommand
Simon Marchi via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Jul 12 13:48:47 PDT 2018
simark created this revision.
Herald added subscribers: cfe-commits, ioeric, ilya-biryukov.
It does the obvious thing of comparing all fields. This will be needed
for a clangd patch I have in the pipeline.
Repository:
rC Clang
https://reviews.llvm.org/D49265
Files:
include/clang/Tooling/CompilationDatabase.h
Index: include/clang/Tooling/CompilationDatabase.h
===================================================================
--- include/clang/Tooling/CompilationDatabase.h
+++ include/clang/Tooling/CompilationDatabase.h
@@ -59,6 +59,11 @@
/// The output file associated with the command.
std::string Output;
+
+ bool operator==(const CompileCommand &RHS) const {
+ return Directory == RHS.Directory && Filename == RHS.Filename &&
+ CommandLine == RHS.CommandLine && Output == RHS.Output;
+ }
};
/// Interface for compilation databases.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D49265.155265.patch
Type: text/x-patch
Size: 558 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180712/6fc252c5/attachment.bin>
More information about the cfe-commits
mailing list