Implement a -dump-type-info frontend action

This commit is contained in:
Slava Pestov
2018-07-25 17:11:44 -07:00
parent bb59562192
commit b15c9d7129
17 changed files with 528 additions and 2 deletions

View File

@@ -1359,6 +1359,9 @@ static bool performCompileStepsPostSILGen(
runSILLoweringPasses(*SM);
if (Action == FrontendOptions::ActionType::DumpTypeInfo)
return performDumpTypeInfo(IRGenOpts, *SM, getGlobalLLVMContext());
// TODO: remove once the frontend understands what action it should perform
IRGenOpts.OutputKind = getOutputKind(Action);
if (Action == FrontendOptions::ActionType::Immediate)
@@ -1366,7 +1369,8 @@ static bool performCompileStepsPostSILGen(
Invocation, Instance, std::move(SM), MSF, observer, ReturnValue);
StringRef OutputFilename = PSPs.OutputFilename;
std::vector<std::string> ParallelOutputFilenames = Invocation.getFrontendOptions().InputsAndOutputs.copyOutputFilenames();
std::vector<std::string> ParallelOutputFilenames =
Invocation.getFrontendOptions().InputsAndOutputs.copyOutputFilenames();
std::unique_ptr<llvm::Module> IRModule;
llvm::GlobalVariable *HashGlobal;
generateIR(