1 //===- LTOBugPoint.h - Top-Level LTO BugPoint class -------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // This class contains all of the shared state and information that is used by
11 // the LTO BugPoint tool to track down bit code files that cause errors.
13 //===----------------------------------------------------------------------===//
15 #include "llvm/ADT/SmallVector.h"
16 #include "llvm/Module.h"
23 LTOBugPoint(std::istream &args, std::istream &ins);
25 /// findTroubleMakers - Find minimum set of input files that causes error
26 /// identified by the script.
27 bool findTroubleMakers(llvm::SmallVector<std::string, 4> &TroubleMakers,
30 /// getNativeObjectFile - Generate native object file based from llvm
31 /// bitcode file. Return false in case of an error.
32 bool getNativeObjectFile(std::string &FileName);
34 std::string &getErrMsg() { return ErrMsg; }
37 /// LinkerInputFiles - This is a list of linker input files. Once populated
38 /// this list is not modified.
39 llvm::SmallVector<std::string, 16> LinkerInputFiles;
41 /// LinkerOptions - List of linker command line options.
42 llvm::SmallVector<std::string, 16> LinkerOptions;
44 /// NativeInputFiles - This is a list of input files that are not llvm
45 /// bitcode files. The order in this list is important. The a file
46 /// in LinkerInputFiles at index 4 is a llvm bitcode file then the file
47 /// at index 4 in NativeInputFiles is corresponding native object file.
48 llvm::SmallVector<std::string, 16> NativeInputFiles;
50 std::string getFeatureString(const char *TargetTriple);
54 /// assembleBitcode - Generate assembly code from the module. Return false
55 /// in case of an error.
56 bool assembleBitcode(llvm::Module *M, const char *AsmFileName);