[PATCH] Relax some preconditions for using FixedCompilationDatabase.

Manuel Klimek klimek at google.com
Wed Oct 30 02:53:38 PDT 2013



================
Comment at: lib/Tooling/CompilationDatabase.cpp:268
@@ +267,3 @@
+
+  // Add the -c add above as well. It will be at the end right now.
+  --End;
----------------
You mean remove? Also, I'd put an 'assert' here just to be sure ;)

================
Comment at: lib/Tooling/CompilationDatabase.cpp:201
@@ +200,3 @@
+
+  IntrusiveRefCntPtr<DiagnosticOptions> DiagOpts = new DiagnosticOptions();
+  TextDiagnosticPrinter TextDiag(llvm::errs(), &*DiagOpts);
----------------
Can you put all of the driver stuff into one function, explaining what it does, and add a FIXME that we want to make that accessible from the Driver? A good name for that function might go a long way towards making this code easier to understand...


http://llvm-reviews.chandlerc.com/D2039



More information about the cfe-commits mailing list