summaryrefslogtreecommitdiffstats
path: root/llvm/tools/bugpoint/ToolRunner.h
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2006-09-15 21:29:15 +0000
committerChris Lattner <sabre@nondot.org>2006-09-15 21:29:15 +0000
commit634bc046cabb7acc60fabaf7a3b25d9181717863 (patch)
tree95e361c8fa6490db46b18bb3c005f3c47fd1bcbb /llvm/tools/bugpoint/ToolRunner.h
parentc9dc375d3ee49dc5dfa2156cc8bc340e1449b26c (diff)
downloadbcm5719-llvm-634bc046cabb7acc60fabaf7a3b25d9181717863.tar.gz
bcm5719-llvm-634bc046cabb7acc60fabaf7a3b25d9181717863.zip
Add a new -cbe-bug mode, which works just like -run-llc, except that it uses
LLC as the reference compiler to reduce testcases for bugs in GCC. llvm-svn: 30400
Diffstat (limited to 'llvm/tools/bugpoint/ToolRunner.h')
-rw-r--r--llvm/tools/bugpoint/ToolRunner.h28
1 files changed, 18 insertions, 10 deletions
diff --git a/llvm/tools/bugpoint/ToolRunner.h b/llvm/tools/bugpoint/ToolRunner.h
index 62bf6d2c84e..e64d0054f0a 100644
--- a/llvm/tools/bugpoint/ToolRunner.h
+++ b/llvm/tools/bugpoint/ToolRunner.h
@@ -104,6 +104,15 @@ public:
/// thrown, otherwise, this function will just return.
virtual void compileProgram(const std::string &Bytecode) {}
+ /// OutputCode - Compile the specified program from bytecode to code
+ /// understood by the GCC driver (either C or asm). If the code generator
+ /// fails, an exception should be thrown, otherwise, this function returns the
+ /// type of code emitted.
+ virtual GCC::FileType OutputCode(const std::string &Bytecode,
+ sys::Path &OutFile) {
+ throw std::string("OutputCode not supported by this AbstractInterpreter!");
+ }
+
/// ExecuteProgram - Run the specified bytecode file, emitting output to the
/// specified filename. This returns the exit code of the program.
///
@@ -149,11 +158,12 @@ public:
std::vector<std::string>(),
unsigned Timeout = 0);
- // Sometimes we just want to go half-way and only generate the .c file, not
- // necessarily compile it with GCC and run the program. This throws an
- // exception if LLC crashes.
- //
- virtual void OutputC(const std::string &Bytecode, sys::Path& OutputCFile);
+ /// OutputCode - Compile the specified program from bytecode to code
+ /// understood by the GCC driver (either C or asm). If the code generator
+ /// fails, an exception should be thrown, otherwise, this function returns the
+ /// type of code emitted.
+ virtual GCC::FileType OutputCode(const std::string &Bytecode,
+ sys::Path &OutFile);
};
@@ -188,11 +198,9 @@ public:
std::vector<std::string>(),
unsigned Timeout = 0);
- // Sometimes we just want to go half-way and only generate the .s file,
- // not necessarily compile it all the way and run the program. This throws
- // an exception if execution of LLC fails.
- //
- void OutputAsm(const std::string &Bytecode, sys::Path &OutputAsmFile);
+ virtual GCC::FileType OutputCode(const std::string &Bytecode,
+ sys::Path &OutFile);
+
};
} // End llvm namespace
OpenPOWER on IntegriCloud