[PATCH] D92025: PROOF-OF-CONCEPT: Add new diagnostics classes for clangDriver

Andrzej Warzynski via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Nov 24 06:28:51 PST 2020


awarzynski created this revision.
Herald added subscribers: cfe-commits, dexonsmith, usaxena95, s.egerton, kadircet, jfb, arphaman, simoncook, mgorny, dschuff.
Herald added a project: clang.
awarzynski requested review of this revision.
Herald added subscribers: sstefan1, MaskRay, ilya-biryukov, aheejin.
Herald added a reviewer: jdoerfert.

This patch creates the clangDriverDiagnostics library. clangDriver and
Flang driver are ported to use this new library instead of clangBasic
for diagnostics.

DON'T REVIEW: This is a proof-of-concept implementation to aid the
discussion on cfe-dev (TODO: link to RFC). Your feedback is more than
welcome, but please keep in mind this patcy is only submitted here to
demonstrate an idea. The implemenation requires a lot more work.

To build and test:

  cmake -GNinja -DLLVM_TARGETS_TO_BUILD=host \
    -DCMAKE_CXX_STANDARD=17 \
    -DFLANG_BUILD_NEW_DRIVER=ON \
    -DCMAKE_BUILD_TYPE=Release\
    -DLLVM_ENABLE_PROJECTS="clang;flang" \
    -DBUILD_SHARED_LIBS=On \
    <llvm-project-root-dir>/llvm;
  ninja check-flang


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D92025

Files:
  clang/include/clang/Basic/AllDiagnostics.h
  clang/include/clang/Basic/CMakeLists.txt
  clang/include/clang/Basic/Diagnostic.td
  clang/include/clang/Basic/DiagnosticCommonKinds.td
  clang/include/clang/Basic/DiagnosticIDs.h
  clang/include/clang/Basic/LLVM.h
  clang/include/clang/CMakeLists.txt
  clang/include/clang/Driver/Driver.h
  clang/include/clang/Driver/DriverDiagnostic.h
  clang/include/clang/Driver/OptionUtils.h
  clang/include/clang/Driver/Util.h
  clang/include/clang/DriverDiagnostics/CMakeLists.txt
  clang/include/clang/DriverDiagnostics/DiagnosticOptions.def
  clang/include/clang/DriverDiagnostics/DriverAllDiagnostics.h
  clang/include/clang/DriverDiagnostics/DriverDiagnostic.h
  clang/include/clang/DriverDiagnostics/DriverDiagnostic.td
  clang/include/clang/DriverDiagnostics/DriverDiagnosticCategories.h
  clang/include/clang/DriverDiagnostics/DriverDiagnosticDriver.h
  clang/include/clang/DriverDiagnostics/DriverDiagnosticDriverKinds.td
  clang/include/clang/DriverDiagnostics/DriverDiagnosticError.h
  clang/include/clang/DriverDiagnostics/DriverDiagnosticGroups.td
  clang/include/clang/DriverDiagnostics/DriverDiagnosticIDs.h
  clang/include/clang/DriverDiagnostics/DriverDiagnosticOptions.h
  clang/lib/Basic/DiagnosticIDs.cpp
  clang/lib/Basic/Targets.cpp
  clang/lib/CMakeLists.txt
  clang/lib/Driver/CMakeLists.txt
  clang/lib/Driver/Driver.cpp
  clang/lib/Driver/OptionUtils.cpp
  clang/lib/Driver/ToolChain.cpp
  clang/lib/Driver/ToolChains/Arch/ARM.cpp
  clang/lib/Driver/ToolChains/Clang.cpp
  clang/lib/DriverDiagnostics/CMakeLists.txt
  clang/lib/DriverDiagnostics/DriverDiagnostic.cpp
  clang/lib/DriverDiagnostics/DriverDiagnosticIDs.cpp
  clang/lib/DriverDiagnostics/DriverDiagnosticOptions.cpp
  clang/tools/driver/CMakeLists.txt
  flang/include/flang/Frontend/CompilerInstance.h
  flang/include/flang/Frontend/CompilerInvocation.h
  flang/include/flang/Frontend/TextDiagnostic.h
  flang/include/flang/Frontend/TextDiagnosticBuffer.h
  flang/include/flang/Frontend/TextDiagnosticPrinter.h
  flang/lib/Frontend/CMakeLists.txt
  flang/lib/Frontend/CompilerInstance.cpp
  flang/lib/Frontend/CompilerInvocation.cpp
  flang/lib/Frontend/TextDiagnostic.cpp
  flang/lib/Frontend/TextDiagnosticBuffer.cpp
  flang/lib/Frontend/TextDiagnosticPrinter.cpp
  flang/lib/FrontendTool/CMakeLists.txt
  flang/tools/flang-driver/CMakeLists.txt
  flang/tools/flang-driver/driver.cpp
  flang/tools/flang-driver/fc1_main.cpp
  flang/unittests/Frontend/CMakeLists.txt
  flang/unittests/Frontend/CompilerInstanceTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D92025.307332.patch
Type: text/x-patch
Size: 285418 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20201124/36903437/attachment-0001.bin>


More information about the cfe-commits mailing list