forked from OSchip/llvm-project
[flang] Add dump-symbols option to bbc
Restore the `--dump-symbols` option in the `bbc` tool. Reviewed By: jeanPerier Differential Revision: https://reviews.llvm.org/D129850
This commit is contained in:
parent
098488e09a
commit
f372142740
|
@ -1,3 +1,4 @@
|
|||
!RUN: bbc --dump-symbols %s | FileCheck %s
|
||||
!RUN: %flang_fc1 -fdebug-dump-symbols %s | FileCheck %s
|
||||
! Tests for derived type runtime descriptions
|
||||
|
||||
|
|
|
@ -106,6 +106,10 @@ static llvm::cl::opt<bool> warnIsError("Werror",
|
|||
llvm::cl::desc("warnings are errors"),
|
||||
llvm::cl::init(false));
|
||||
|
||||
static llvm::cl::opt<bool> dumpSymbols("dump-symbols",
|
||||
llvm::cl::desc("dump the symbol table"),
|
||||
llvm::cl::init(false));
|
||||
|
||||
static llvm::cl::opt<bool> pftDumpTest(
|
||||
"pft-test",
|
||||
llvm::cl::desc("parse the input, create a PFT, dump it, and exit"),
|
||||
|
@ -189,6 +193,11 @@ static mlir::LogicalResult convertFortranSourceToMLIR(
|
|||
<< "could not find module file for __fortran_type_info\n";
|
||||
}
|
||||
|
||||
if (dumpSymbols) {
|
||||
semantics.DumpSymbols(llvm::outs());
|
||||
return mlir::success();
|
||||
}
|
||||
|
||||
if (pftDumpTest) {
|
||||
if (auto ast = Fortran::lower::createPFT(parseTree, semanticsContext)) {
|
||||
Fortran::lower::dumpPFT(llvm::outs(), *ast);
|
||||
|
|
Loading…
Reference in New Issue