]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm/tools/clang/lib/Driver/Tools.h
Merge ACPICA 20130214.
[FreeBSD/FreeBSD.git] / contrib / llvm / tools / clang / lib / Driver / Tools.h
1 //===--- Tools.h - Tool Implementations -------------------------*- C++ -*-===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9
10 #ifndef CLANG_LIB_DRIVER_TOOLS_H_
11 #define CLANG_LIB_DRIVER_TOOLS_H_
12
13 #include "clang/Driver/Tool.h"
14 #include "clang/Driver/Types.h"
15 #include "clang/Driver/Util.h"
16
17 #include "llvm/ADT/Triple.h"
18 #include "llvm/Support/Compiler.h"
19
20 namespace clang {
21   class ObjCRuntime;
22
23 namespace driver {
24   class Driver;
25
26 namespace toolchains {
27   class Darwin;
28 }
29
30 namespace tools {
31
32   /// \brief Clang compiler tool.
33   class LLVM_LIBRARY_VISIBILITY Clang : public Tool {
34     void AddPreprocessingOptions(Compilation &C,
35                                  const Driver &D,
36                                  const ArgList &Args,
37                                  ArgStringList &CmdArgs,
38                                  const InputInfo &Output,
39                                  const InputInfoList &Inputs) const;
40
41     void AddARMTargetArgs(const ArgList &Args, ArgStringList &CmdArgs,
42                           bool KernelOrKext) const;
43     void AddMIPSTargetArgs(const ArgList &Args, ArgStringList &CmdArgs) const;
44     void AddPPCTargetArgs(const ArgList &Args, ArgStringList &CmdArgs) const;
45     void AddSparcTargetArgs(const ArgList &Args, ArgStringList &CmdArgs) const;
46     void AddX86TargetArgs(const ArgList &Args, ArgStringList &CmdArgs) const;
47     void AddHexagonTargetArgs (const ArgList &Args, ArgStringList &CmdArgs) const;
48
49     enum RewriteKind { RK_None, RK_Fragile, RK_NonFragile };
50
51     ObjCRuntime AddObjCRuntimeArgs(const ArgList &args, ArgStringList &cmdArgs,
52                                    RewriteKind rewrite) const;
53
54   public:
55     Clang(const ToolChain &TC) : Tool("clang", "clang frontend", TC) {}
56
57     virtual bool hasGoodDiagnostics() const { return true; }
58     virtual bool hasIntegratedAssembler() const { return true; }
59     virtual bool hasIntegratedCPP() const { return true; }
60
61     virtual void ConstructJob(Compilation &C, const JobAction &JA,
62                               const InputInfo &Output,
63                               const InputInfoList &Inputs,
64                               const ArgList &TCArgs,
65                               const char *LinkingOutput) const;
66   };
67
68   /// \brief Clang integrated assembler tool.
69   class LLVM_LIBRARY_VISIBILITY ClangAs : public Tool {
70     void AddARMTargetArgs(const ArgList &Args, ArgStringList &CmdArgs) const;
71   public:
72     ClangAs(const ToolChain &TC) : Tool("clang::as",
73                                         "clang integrated assembler", TC) {}
74
75     virtual bool hasGoodDiagnostics() const { return true; }
76     virtual bool hasIntegratedAssembler() const { return false; }
77     virtual bool hasIntegratedCPP() const { return false; }
78
79     virtual void ConstructJob(Compilation &C, const JobAction &JA,
80                               const InputInfo &Output,
81                               const InputInfoList &Inputs,
82                               const ArgList &TCArgs,
83                               const char *LinkingOutput) const;
84   };
85
86   /// gcc - Generic GCC tool implementations.
87 namespace gcc {
88   class LLVM_LIBRARY_VISIBILITY Common : public Tool {
89   public:
90     Common(const char *Name, const char *ShortName,
91            const ToolChain &TC) : Tool(Name, ShortName, TC) {}
92
93     virtual void ConstructJob(Compilation &C, const JobAction &JA,
94                               const InputInfo &Output,
95                               const InputInfoList &Inputs,
96                               const ArgList &TCArgs,
97                               const char *LinkingOutput) const;
98
99     /// RenderExtraToolArgs - Render any arguments necessary to force
100     /// the particular tool mode.
101     virtual void RenderExtraToolArgs(const JobAction &JA,
102                                      ArgStringList &CmdArgs) const = 0;
103   };
104
105
106   class LLVM_LIBRARY_VISIBILITY Preprocess : public Common {
107   public:
108     Preprocess(const ToolChain &TC) : Common("gcc::Preprocess",
109                                              "gcc preprocessor", TC) {}
110
111     virtual bool hasGoodDiagnostics() const { return true; }
112     virtual bool hasIntegratedCPP() const { return false; }
113
114     virtual void RenderExtraToolArgs(const JobAction &JA,
115                                      ArgStringList &CmdArgs) const;
116   };
117
118   class LLVM_LIBRARY_VISIBILITY Precompile : public Common  {
119   public:
120     Precompile(const ToolChain &TC) : Common("gcc::Precompile",
121                                              "gcc precompile", TC) {}
122
123     virtual bool hasGoodDiagnostics() const { return true; }
124     virtual bool hasIntegratedCPP() const { return true; }
125
126     virtual void RenderExtraToolArgs(const JobAction &JA,
127                                      ArgStringList &CmdArgs) const;
128   };
129
130   class LLVM_LIBRARY_VISIBILITY Compile : public Common  {
131   public:
132     Compile(const ToolChain &TC) : Common("gcc::Compile",
133                                           "gcc frontend", TC) {}
134
135     virtual bool hasGoodDiagnostics() const { return true; }
136     virtual bool hasIntegratedCPP() const { return true; }
137
138     virtual void RenderExtraToolArgs(const JobAction &JA,
139                                      ArgStringList &CmdArgs) const;
140   };
141
142   class LLVM_LIBRARY_VISIBILITY Assemble : public Common  {
143   public:
144     Assemble(const ToolChain &TC) : Common("gcc::Assemble",
145                                            "assembler (via gcc)", TC) {}
146
147     virtual bool hasIntegratedCPP() const { return false; }
148
149     virtual void RenderExtraToolArgs(const JobAction &JA,
150                                      ArgStringList &CmdArgs) const;
151   };
152
153   class LLVM_LIBRARY_VISIBILITY Link : public Common  {
154   public:
155     Link(const ToolChain &TC) : Common("gcc::Link",
156                                        "linker (via gcc)", TC) {}
157
158     virtual bool hasIntegratedCPP() const { return false; }
159     virtual bool isLinkJob() const { return true; }
160
161     virtual void RenderExtraToolArgs(const JobAction &JA,
162                                      ArgStringList &CmdArgs) const;
163   };
164 } // end namespace gcc
165
166 namespace hexagon {
167   // For Hexagon, we do not need to instantiate tools for PreProcess, PreCompile and Compile.
168   // We simply use "clang -cc1" for those actions.
169   class LLVM_LIBRARY_VISIBILITY Assemble : public Tool {
170   public:
171     Assemble(const ToolChain &TC) : Tool("hexagon::Assemble",
172       "hexagon-as", TC) {}
173
174     virtual bool hasIntegratedCPP() const { return false; }
175
176     virtual void RenderExtraToolArgs(const JobAction &JA,
177                                      ArgStringList &CmdArgs) const;
178     virtual void ConstructJob(Compilation &C, const JobAction &JA,
179                               const InputInfo &Output,
180                               const InputInfoList &Inputs,
181                               const ArgList &TCArgs,
182                               const char *LinkingOutput) const;
183   };
184
185   class LLVM_LIBRARY_VISIBILITY Link : public Tool {
186   public:
187     Link(const ToolChain &TC) : Tool("hexagon::Link",
188       "hexagon-ld", TC) {}
189
190     virtual bool hasIntegratedCPP() const { return false; }
191     virtual bool isLinkJob() const { return true; }
192
193     virtual void RenderExtraToolArgs(const JobAction &JA,
194                                      ArgStringList &CmdArgs) const;
195     virtual void ConstructJob(Compilation &C, const JobAction &JA,
196                               const InputInfo &Output,
197                               const InputInfoList &Inputs,
198                               const ArgList &TCArgs,
199                               const char *LinkingOutput) const;
200   };
201 } // end namespace hexagon.
202
203
204 namespace darwin {
205   llvm::Triple::ArchType getArchTypeForDarwinArchName(StringRef Str);
206
207   class LLVM_LIBRARY_VISIBILITY DarwinTool : public Tool {
208     virtual void anchor();
209   protected:
210     void AddDarwinArch(const ArgList &Args, ArgStringList &CmdArgs) const;
211
212     const toolchains::Darwin &getDarwinToolChain() const {
213       return reinterpret_cast<const toolchains::Darwin&>(getToolChain());
214     }
215
216   public:
217     DarwinTool(const char *Name, const char *ShortName,
218                const ToolChain &TC) : Tool(Name, ShortName, TC) {}
219   };
220
221   class LLVM_LIBRARY_VISIBILITY CC1 : public DarwinTool  {
222     virtual void anchor();
223   public:
224     static const char *getBaseInputName(const ArgList &Args,
225                                  const InputInfoList &Input);
226     static const char *getBaseInputStem(const ArgList &Args,
227                                  const InputInfoList &Input);
228     static const char *getDependencyFileName(const ArgList &Args,
229                                              const InputInfoList &Inputs);
230
231   protected:
232     const char *getCC1Name(types::ID Type) const;
233
234     void AddCC1Args(const ArgList &Args, ArgStringList &CmdArgs) const;
235     void RemoveCC1UnsupportedArgs(ArgStringList &CmdArgs) const;
236     void AddCC1OptionsArgs(const ArgList &Args, ArgStringList &CmdArgs,
237                            const InputInfoList &Inputs,
238                            const ArgStringList &OutputArgs) const;
239     void AddCPPOptionsArgs(const ArgList &Args, ArgStringList &CmdArgs,
240                            const InputInfoList &Inputs,
241                            const ArgStringList &OutputArgs) const;
242     void AddCPPUniqueOptionsArgs(const ArgList &Args,
243                                  ArgStringList &CmdArgs,
244                                  const InputInfoList &Inputs) const;
245     void AddCPPArgs(const ArgList &Args, ArgStringList &CmdArgs) const;
246
247   public:
248     CC1(const char *Name, const char *ShortName,
249         const ToolChain &TC) : DarwinTool(Name, ShortName, TC) {}
250
251     virtual bool hasGoodDiagnostics() const { return true; }
252     virtual bool hasIntegratedCPP() const { return true; }
253   };
254
255   class LLVM_LIBRARY_VISIBILITY Preprocess : public CC1  {
256   public:
257     Preprocess(const ToolChain &TC) : CC1("darwin::Preprocess",
258                                           "gcc preprocessor", TC) {}
259
260     virtual void ConstructJob(Compilation &C, const JobAction &JA,
261                               const InputInfo &Output,
262                               const InputInfoList &Inputs,
263                               const ArgList &TCArgs,
264                               const char *LinkingOutput) const;
265   };
266
267   class LLVM_LIBRARY_VISIBILITY Compile : public CC1  {
268   public:
269     Compile(const ToolChain &TC) : CC1("darwin::Compile", "gcc frontend", TC) {}
270
271     virtual void ConstructJob(Compilation &C, const JobAction &JA,
272                               const InputInfo &Output,
273                               const InputInfoList &Inputs,
274                               const ArgList &TCArgs,
275                               const char *LinkingOutput) const;
276   };
277
278   class LLVM_LIBRARY_VISIBILITY Assemble : public DarwinTool  {
279   public:
280     Assemble(const ToolChain &TC) : DarwinTool("darwin::Assemble",
281                                                "assembler", TC) {}
282
283     virtual bool hasIntegratedCPP() const { return false; }
284
285     virtual void ConstructJob(Compilation &C, const JobAction &JA,
286                               const InputInfo &Output,
287                               const InputInfoList &Inputs,
288                               const ArgList &TCArgs,
289                               const char *LinkingOutput) const;
290   };
291
292   class LLVM_LIBRARY_VISIBILITY Link : public DarwinTool  {
293     bool NeedsTempPath(const InputInfoList &Inputs) const;
294     void AddLinkArgs(Compilation &C, const ArgList &Args,
295                      ArgStringList &CmdArgs, const InputInfoList &Inputs) const;
296
297   public:
298     Link(const ToolChain &TC) : DarwinTool("darwin::Link", "linker", TC) {}
299
300     virtual bool hasIntegratedCPP() const { return false; }
301     virtual bool isLinkJob() const { return true; }
302
303     virtual void ConstructJob(Compilation &C, const JobAction &JA,
304                               const InputInfo &Output,
305                               const InputInfoList &Inputs,
306                               const ArgList &TCArgs,
307                               const char *LinkingOutput) const;
308   };
309
310   class LLVM_LIBRARY_VISIBILITY Lipo : public DarwinTool  {
311   public:
312     Lipo(const ToolChain &TC) : DarwinTool("darwin::Lipo", "lipo", TC) {}
313
314     virtual bool hasIntegratedCPP() const { return false; }
315
316     virtual void ConstructJob(Compilation &C, const JobAction &JA,
317                               const InputInfo &Output,
318                               const InputInfoList &Inputs,
319                               const ArgList &TCArgs,
320                               const char *LinkingOutput) const;
321   };
322
323   class LLVM_LIBRARY_VISIBILITY Dsymutil : public DarwinTool  {
324   public:
325     Dsymutil(const ToolChain &TC) : DarwinTool("darwin::Dsymutil",
326                                                "dsymutil", TC) {}
327
328     virtual bool hasIntegratedCPP() const { return false; }
329
330     virtual void ConstructJob(Compilation &C, const JobAction &JA,
331                               const InputInfo &Output,
332                               const InputInfoList &Inputs,
333                               const ArgList &TCArgs,
334                               const char *LinkingOutput) const;
335   };
336
337   class LLVM_LIBRARY_VISIBILITY VerifyDebug : public DarwinTool  {
338   public:
339     VerifyDebug(const ToolChain &TC) : DarwinTool("darwin::VerifyDebug",
340                                                   "dwarfdump", TC) {}
341
342     virtual bool hasIntegratedCPP() const { return false; }
343
344     virtual void ConstructJob(Compilation &C, const JobAction &JA,
345                               const InputInfo &Output,
346                               const InputInfoList &Inputs,
347                               const ArgList &TCArgs,
348                               const char *LinkingOutput) const;
349   };
350
351 }
352
353   /// openbsd -- Directly call GNU Binutils assembler and linker
354 namespace openbsd {
355   class LLVM_LIBRARY_VISIBILITY Assemble : public Tool  {
356   public:
357     Assemble(const ToolChain &TC) : Tool("openbsd::Assemble", "assembler",
358                                          TC) {}
359
360     virtual bool hasIntegratedCPP() const { return false; }
361
362     virtual void ConstructJob(Compilation &C, const JobAction &JA,
363                               const InputInfo &Output,
364                               const InputInfoList &Inputs,
365                               const ArgList &TCArgs,
366                               const char *LinkingOutput) const;
367   };
368   class LLVM_LIBRARY_VISIBILITY Link : public Tool  {
369   public:
370     Link(const ToolChain &TC) : Tool("openbsd::Link", "linker", TC) {}
371
372     virtual bool hasIntegratedCPP() const { return false; }
373     virtual bool isLinkJob() const { return true; }
374
375     virtual void ConstructJob(Compilation &C, const JobAction &JA,
376                               const InputInfo &Output,
377                               const InputInfoList &Inputs,
378                               const ArgList &TCArgs,
379                               const char *LinkingOutput) const;
380   };
381 } // end namespace openbsd
382
383   /// bitrig -- Directly call GNU Binutils assembler and linker
384 namespace bitrig {
385   class LLVM_LIBRARY_VISIBILITY Assemble : public Tool  {
386   public:
387     Assemble(const ToolChain &TC) : Tool("bitrig::Assemble", "assembler",
388                                          TC) {}
389
390     virtual bool hasIntegratedCPP() const { return false; }
391
392     virtual void ConstructJob(Compilation &C, const JobAction &JA,
393                               const InputInfo &Output,
394                               const InputInfoList &Inputs,
395                               const ArgList &TCArgs,
396                               const char *LinkingOutput) const;
397   };
398   class LLVM_LIBRARY_VISIBILITY Link : public Tool  {
399   public:
400     Link(const ToolChain &TC) : Tool("bitrig::Link", "linker", TC) {}
401
402     virtual bool hasIntegratedCPP() const { return false; }
403     virtual bool isLinkJob() const { return true; }
404
405     virtual void ConstructJob(Compilation &C, const JobAction &JA,
406                               const InputInfo &Output,
407                               const InputInfoList &Inputs,
408                               const ArgList &TCArgs,
409                               const char *LinkingOutput) const;
410   };
411 } // end namespace bitrig
412
413   /// freebsd -- Directly call GNU Binutils assembler and linker
414 namespace freebsd {
415   class LLVM_LIBRARY_VISIBILITY Assemble : public Tool  {
416   public:
417     Assemble(const ToolChain &TC) : Tool("freebsd::Assemble", "assembler",
418                                          TC) {}
419
420     virtual bool hasIntegratedCPP() const { return false; }
421
422     virtual void ConstructJob(Compilation &C, const JobAction &JA,
423                               const InputInfo &Output,
424                               const InputInfoList &Inputs,
425                               const ArgList &TCArgs,
426                               const char *LinkingOutput) const;
427   };
428   class LLVM_LIBRARY_VISIBILITY Link : public Tool  {
429   public:
430     Link(const ToolChain &TC) : Tool("freebsd::Link", "linker", TC) {}
431
432     virtual bool hasIntegratedCPP() const { return false; }
433     virtual bool isLinkJob() const { return true; }
434
435     virtual void ConstructJob(Compilation &C, const JobAction &JA,
436                               const InputInfo &Output,
437                               const InputInfoList &Inputs,
438                               const ArgList &TCArgs,
439                               const char *LinkingOutput) const;
440   };
441 } // end namespace freebsd
442
443   /// netbsd -- Directly call GNU Binutils assembler and linker
444 namespace netbsd {
445   class LLVM_LIBRARY_VISIBILITY Assemble : public Tool  {
446
447   public:
448     Assemble(const ToolChain &TC)
449       : Tool("netbsd::Assemble", "assembler", TC) {}
450
451     virtual bool hasIntegratedCPP() const { return false; }
452
453     virtual void ConstructJob(Compilation &C, const JobAction &JA,
454                               const InputInfo &Output,
455                               const InputInfoList &Inputs,
456                               const ArgList &TCArgs,
457                               const char *LinkingOutput) const;
458   };
459   class LLVM_LIBRARY_VISIBILITY Link : public Tool  {
460
461   public:
462     Link(const ToolChain &TC)
463       : Tool("netbsd::Link", "linker", TC) {}
464
465     virtual bool hasIntegratedCPP() const { return false; }
466     virtual bool isLinkJob() const { return true; }
467
468     virtual void ConstructJob(Compilation &C, const JobAction &JA,
469                               const InputInfo &Output,
470                               const InputInfoList &Inputs,
471                               const ArgList &TCArgs,
472                               const char *LinkingOutput) const;
473   };
474 } // end namespace netbsd
475
476   /// linux -- Directly call GNU Binutils assembler and linker
477 namespace linuxtools {
478   class LLVM_LIBRARY_VISIBILITY Assemble : public Tool  {
479   public:
480     Assemble(const ToolChain &TC) : Tool("linux::Assemble", "assembler",
481                                          TC) {}
482
483     virtual bool hasIntegratedCPP() const { return false; }
484
485     virtual void ConstructJob(Compilation &C, const JobAction &JA,
486                               const InputInfo &Output,
487                               const InputInfoList &Inputs,
488                               const ArgList &TCArgs,
489                               const char *LinkingOutput) const;
490   };
491   class LLVM_LIBRARY_VISIBILITY Link : public Tool  {
492   public:
493     Link(const ToolChain &TC) : Tool("linux::Link", "linker", TC) {}
494
495     virtual bool hasIntegratedCPP() const { return false; }
496     virtual bool isLinkJob() const { return true; }
497
498     virtual void ConstructJob(Compilation &C, const JobAction &JA,
499                               const InputInfo &Output,
500                               const InputInfoList &Inputs,
501                               const ArgList &TCArgs,
502                               const char *LinkingOutput) const;
503   };
504 }
505   /// minix -- Directly call GNU Binutils assembler and linker
506 namespace minix {
507   class LLVM_LIBRARY_VISIBILITY Assemble : public Tool  {
508   public:
509     Assemble(const ToolChain &TC) : Tool("minix::Assemble", "assembler",
510                                          TC) {}
511
512     virtual bool hasIntegratedCPP() const { return false; }
513
514     virtual void ConstructJob(Compilation &C, const JobAction &JA,
515                               const InputInfo &Output,
516                               const InputInfoList &Inputs,
517                               const ArgList &TCArgs,
518                               const char *LinkingOutput) const;
519   };
520   class LLVM_LIBRARY_VISIBILITY Link : public Tool  {
521   public:
522     Link(const ToolChain &TC) : Tool("minix::Link", "linker", TC) {}
523
524     virtual bool hasIntegratedCPP() const { return false; }
525     virtual bool isLinkJob() const { return true; }
526
527     virtual void ConstructJob(Compilation &C, const JobAction &JA,
528                               const InputInfo &Output,
529                               const InputInfoList &Inputs,
530                               const ArgList &TCArgs,
531                               const char *LinkingOutput) const;
532   };
533 } // end namespace minix
534
535   /// solaris -- Directly call Solaris assembler and linker
536 namespace solaris {
537   class LLVM_LIBRARY_VISIBILITY Assemble : public Tool  {
538   public:
539     Assemble(const ToolChain &TC) : Tool("solaris::Assemble", "assembler",
540                                          TC) {}
541
542     virtual bool hasIntegratedCPP() const { return false; }
543
544     virtual void ConstructJob(Compilation &C, const JobAction &JA,
545                               const InputInfo &Output,
546                               const InputInfoList &Inputs,
547                               const ArgList &TCArgs,
548                               const char *LinkingOutput) const;
549   };
550   class LLVM_LIBRARY_VISIBILITY Link : public Tool  {
551   public:
552     Link(const ToolChain &TC) : Tool("solaris::Link", "linker", TC) {}
553
554     virtual bool hasIntegratedCPP() const { return false; }
555     virtual bool isLinkJob() const { return true; }
556
557     virtual void ConstructJob(Compilation &C, const JobAction &JA,
558                               const InputInfo &Output,
559                               const InputInfoList &Inputs,
560                               const ArgList &TCArgs,
561                               const char *LinkingOutput) const;
562   };
563 } // end namespace solaris
564
565   /// auroraux -- Directly call GNU Binutils assembler and linker
566 namespace auroraux {
567   class LLVM_LIBRARY_VISIBILITY Assemble : public Tool  {
568   public:
569     Assemble(const ToolChain &TC) : Tool("auroraux::Assemble", "assembler",
570                                          TC) {}
571
572     virtual bool hasIntegratedCPP() const { return false; }
573
574     virtual void ConstructJob(Compilation &C, const JobAction &JA,
575                               const InputInfo &Output,
576                               const InputInfoList &Inputs,
577                               const ArgList &TCArgs,
578                               const char *LinkingOutput) const;
579   };
580   class LLVM_LIBRARY_VISIBILITY Link : public Tool  {
581   public:
582     Link(const ToolChain &TC) : Tool("auroraux::Link", "linker", TC) {}
583
584     virtual bool hasIntegratedCPP() const { return false; }
585     virtual bool isLinkJob() const { return true; }
586
587     virtual void ConstructJob(Compilation &C, const JobAction &JA,
588                               const InputInfo &Output,
589                               const InputInfoList &Inputs,
590                               const ArgList &TCArgs,
591                               const char *LinkingOutput) const;
592   };
593 } // end namespace auroraux
594
595   /// dragonfly -- Directly call GNU Binutils assembler and linker
596 namespace dragonfly {
597   class LLVM_LIBRARY_VISIBILITY Assemble : public Tool  {
598   public:
599     Assemble(const ToolChain &TC) : Tool("dragonfly::Assemble", "assembler",
600                                          TC) {}
601
602     virtual bool hasIntegratedCPP() const { return false; }
603
604     virtual void ConstructJob(Compilation &C, const JobAction &JA,
605                               const InputInfo &Output,
606                               const InputInfoList &Inputs,
607                               const ArgList &TCArgs,
608                               const char *LinkingOutput) const;
609   };
610   class LLVM_LIBRARY_VISIBILITY Link : public Tool  {
611   public:
612     Link(const ToolChain &TC) : Tool("dragonfly::Link", "linker", TC) {}
613
614     virtual bool hasIntegratedCPP() const { return false; }
615     virtual bool isLinkJob() const { return true; }
616
617     virtual void ConstructJob(Compilation &C, const JobAction &JA,
618                               const InputInfo &Output,
619                               const InputInfoList &Inputs,
620                               const ArgList &TCArgs,
621                               const char *LinkingOutput) const;
622   };
623 } // end namespace dragonfly
624
625   /// Visual studio tools.
626 namespace visualstudio {
627   class LLVM_LIBRARY_VISIBILITY Link : public Tool  {
628   public:
629     Link(const ToolChain &TC) : Tool("visualstudio::Link", "linker", TC) {}
630
631     virtual bool hasIntegratedCPP() const { return false; }
632     virtual bool isLinkJob() const { return true; }
633
634     virtual void ConstructJob(Compilation &C, const JobAction &JA,
635                               const InputInfo &Output,
636                               const InputInfoList &Inputs,
637                               const ArgList &TCArgs,
638                               const char *LinkingOutput) const;
639   };
640 } // end namespace visualstudio
641
642 } // end namespace toolchains
643 } // end namespace driver
644 } // end namespace clang
645
646 #endif // CLANG_LIB_DRIVER_TOOLS_H_