From 61d679ab2831b161c857cf3f974312fbd4ef1efd Mon Sep 17 00:00:00 2001 From: Argyrios Kyrtzidis Date: Thu, 26 Jan 2012 02:40:48 +0000 Subject: Introduce 3 new fixit options: -fixit-recompile applies fixits and recompiles the result -fixit-to-temporary applies fixits to temporary files -fix-only-warnings">, applies fixits for warnings only, not errors Combining "-fixit-recompile -fixit-to-temporary" allows testing the result of fixits without touching the original sources. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149027 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/FrontendTool/ExecuteCompilerInvocation.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib/FrontendTool/ExecuteCompilerInvocation.cpp') diff --git a/lib/FrontendTool/ExecuteCompilerInvocation.cpp b/lib/FrontendTool/ExecuteCompilerInvocation.cpp index 2782a85beb..9f2bdf25be 100644 --- a/lib/FrontendTool/ExecuteCompilerInvocation.cpp +++ b/lib/FrontendTool/ExecuteCompilerInvocation.cpp @@ -87,6 +87,10 @@ static FrontendAction *CreateFrontendAction(CompilerInstance &CI) { if (!Act) return 0; + if (CI.getFrontendOpts().FixAndRecompile) { + Act = new FixItRecompile(Act); + } + // Potentially wrap the base FE action in an ARC Migrate Tool action. switch (CI.getFrontendOpts().ARCMTAction) { case FrontendOptions::ARCMT_None: -- cgit v1.2.3-18-g5258