summaryrefslogtreecommitdiffstats
path: root/clang/tools/ccc/ccclib/Tools.py
diff options
context:
space:
mode:
Diffstat (limited to 'clang/tools/ccc/ccclib/Tools.py')
-rw-r--r--clang/tools/ccc/ccclib/Tools.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/clang/tools/ccc/ccclib/Tools.py b/clang/tools/ccc/ccclib/Tools.py
index 8b3ee744bb5..0dcd52e7266 100644
--- a/clang/tools/ccc/ccclib/Tools.py
+++ b/clang/tools/ccc/ccclib/Tools.py
@@ -179,9 +179,15 @@ class Clang_CompileTool(Tool):
patchOutputNameForPTH = False
if isinstance(phase.phase, Phases.AnalyzePhase):
+ assert outputType is Types.PlistType
cmd_args.append('-analyze')
elif isinstance(phase.phase, Phases.SyntaxOnlyPhase):
+ assert outputType is Types.NothingType
cmd_args.append('-fsyntax-only')
+ elif outputType is Types.LLVMAsmType:
+ cmd_args.append('-emit-llvm')
+ elif outputType is Types.LLVMBCType:
+ cmd_args.append('-emit-llvm-bc')
elif outputType is Types.AsmTypeNoPP:
cmd_args.append('-S')
elif outputType is Types.PCHType:
@@ -688,6 +694,15 @@ class Darwin_X86_CompileTool(Darwin_X86_CC1Tool):
raise Arguments.InvalidArgumentsError("-traditional is not supported without -E")
if outputType is Types.PCHType:
+ pass
+ elif outputType is Types.AsmTypeNoPP:
+ pass
+ elif outputType is Types.LLVMAsmType:
+ cmd_args.append('-emit-llvm')
+ elif outputType is Types.LLVMBCType:
+ cmd_args.append('-emit-llvm-bc')
+
+ if outputType is Types.PCHType:
output_args = []
else:
output_args = self.getOutputArgs(arglist, output)
OpenPOWER on IntegriCloud