aboutsummaryrefslogtreecommitdiff
path: root/include/llvm
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-02-03 05:55:08 +0000
committerChris Lattner <sabre@nondot.org>2010-02-03 05:55:08 +0000
commit5669e3009761dff20b67e18a382c334041887928 (patch)
tree1627a6f9aa094e2aba6b96e3e258b7e47de42a14 /include/llvm
parentfebc81680c80a53f15f85b1812cba07fc179b9fd (diff)
change addPassesToEmitFile to return true on failure instead of its input,
add -filetype=null for performance testing and remove -filetype=dynlib, which isn't planned to be implemented. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95202 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm')
-rw-r--r--include/llvm/Target/TargetMachine.h36
1 files changed, 13 insertions, 23 deletions
diff --git a/include/llvm/Target/TargetMachine.h b/include/llvm/Target/TargetMachine.h
index af6591e7f7..63e28ac30a 100644
--- a/include/llvm/Target/TargetMachine.h
+++ b/include/llvm/Target/TargetMachine.h
@@ -199,8 +199,7 @@ public:
enum CodeGenFileType {
CGFT_AssemblyFile,
CGFT_ObjectFile,
- CGFT_DynamicLibrary,
- CGFT_ErrorOccurred
+ CGFT_Null // Do not emit any output.
};
/// getEnableTailMergeDefault - the default setting for -enable-tail-merge
@@ -209,15 +208,13 @@ public:
/// addPassesToEmitFile - Add passes to the specified pass manager to get the
/// specified file emitted. Typically this will involve several steps of code
- /// generation.
- /// This method should return InvalidFile if emission of this file type
- /// is not supported.
- ///
- virtual CodeGenFileType addPassesToEmitFile(PassManagerBase &,
- formatted_raw_ostream &,
- CodeGenFileType Filetype,
- CodeGenOpt::Level) {
- return CGFT_ErrorOccurred;
+ /// generation. This method should return true if emission of this file type
+ /// is not supported, or false on success.
+ virtual bool addPassesToEmitFile(PassManagerBase &,
+ formatted_raw_ostream &,
+ CodeGenFileType Filetype,
+ CodeGenOpt::Level) {
+ return true;
}
/// addPassesToEmitMachineCode - Add passes to the specified pass manager to
@@ -264,18 +261,11 @@ public:
/// addPassesToEmitFile - Add passes to the specified pass manager to get the
/// specified file emitted. Typically this will involve several steps of code
/// generation. If OptLevel is None, the code generator should emit code as
- /// fast as possible, though the generated code may be less efficient. This
- /// method should return CGFT_ErrorOccurred if emission of this file type is
- /// not supported.
- ///
- /// The default implementation of this method adds components from the
- /// LLVM retargetable code generator, invoking the methods below to get
- /// target-specific passes in standard locations.
- ///
- virtual CodeGenFileType addPassesToEmitFile(PassManagerBase &PM,
- formatted_raw_ostream &Out,
- CodeGenFileType FileType,
- CodeGenOpt::Level);
+ /// fast as possible, though the generated code may be less efficient.
+ virtual bool addPassesToEmitFile(PassManagerBase &PM,
+ formatted_raw_ostream &Out,
+ CodeGenFileType FileType,
+ CodeGenOpt::Level);
/// addPassesToEmitMachineCode - Add passes to the specified pass manager to
/// get machine code emitted. This uses a JITCodeEmitter object to handle