Add a SubclassData field to SDNode, similar to what's done
[oota-llvm.git] / tools / llvmc2 / Tool.h
index 3527817026d19b377b495ef8739e03535a662fed..93fa5dfb43a9e3426f79cfb99bde1f9d81ad6df0 100644 (file)
@@ -1,4 +1,4 @@
-//===--- Tools.h - The LLVM Compiler Driver ---------------------*- C++ -*-===//
+//===--- Tool.h - The LLVM Compiler Driver ----------------------*- C++ -*-===//
 //
 //                     The LLVM Compiler Infrastructure
 //
@@ -15,9 +15,9 @@
 #define LLVM_TOOLS_LLVMC2_TOOL_H
 
 #include "Action.h"
-#include "StringSet.h"
 
 #include "llvm/ADT/IntrusiveRefCntPtr.h"
+#include "llvm/ADT/StringSet.h"
 #include "llvm/System/Path.h"
 
 #include <string>
@@ -26,6 +26,7 @@
 namespace llvmc {
 
   typedef std::vector<llvm::sys::Path> PathVector;
+  typedef llvm::StringSet<> InputLanguagesSet;
 
   /// Tool - A class
   class Tool : public llvm::RefCountedBaseVPTR<Tool> {
@@ -35,16 +36,16 @@ namespace llvmc {
 
     virtual Action GenerateAction (const PathVector& inFiles,
                                    const llvm::sys::Path& outFile,
-                                   const StringSet<>& InLangs) const = 0;
+                                   const InputLanguagesSet& InLangs) const = 0;
 
     virtual Action GenerateAction (const llvm::sys::Path& inFile,
                                    const llvm::sys::Path& outFile,
-                                   const StringSet<>& InLangs) const = 0;
+                                   const InputLanguagesSet& InLangs) const = 0;
 
-    virtual const char* Name() const = 0;
-    virtual const char* InputLanguage() const = 0;
-    virtual const char* OutputLanguage() const = 0;
-    virtual const char* OutputSuffix() const = 0;
+    virtual const char*  Name() const = 0;
+    virtual const char** InputLanguages() const = 0;
+    virtual const char*  OutputLanguage() const = 0;
+    virtual const char*  OutputSuffix() const = 0;
 
     virtual bool IsLast() const = 0;
     virtual bool IsJoin() const = 0;
@@ -58,7 +59,7 @@ namespace llvmc {
     bool JoinListEmpty() const { return JoinList_.empty(); }
 
     Action GenerateAction(const llvm::sys::Path& outFile,
-                          const StringSet<>& InLangs) const {
+                          const InputLanguagesSet& InLangs) const {
       return GenerateAction(JoinList_, outFile, InLangs);
     }
     // We shouldn't shadow base class's version of GenerateAction.