aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/LTO/legacy/LTOCodeGenerator.h
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2017-04-16 16:01:22 +0000
committerDimitry Andric <dim@FreeBSD.org>2017-04-16 16:01:22 +0000
commit71d5a2540a98c81f5bcaeb48805e0e2881f530ef (patch)
tree5343938942df402b49ec7300a1c25a2d4ccd5821 /include/llvm/LTO/legacy/LTOCodeGenerator.h
parent31bbf64f3a4974a2d6c8b3b27ad2f519caf74057 (diff)
Diffstat (limited to 'include/llvm/LTO/legacy/LTOCodeGenerator.h')
-rw-r--r--include/llvm/LTO/legacy/LTOCodeGenerator.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/include/llvm/LTO/legacy/LTOCodeGenerator.h b/include/llvm/LTO/legacy/LTOCodeGenerator.h
index f14682111280..952875fc854e 100644
--- a/include/llvm/LTO/legacy/LTOCodeGenerator.h
+++ b/include/llvm/LTO/legacy/LTOCodeGenerator.h
@@ -41,6 +41,7 @@
#include "llvm/ADT/StringSet.h"
#include "llvm/IR/GlobalValue.h"
#include "llvm/IR/Module.h"
+#include "llvm/Support/Error.h"
#include "llvm/Support/ToolOutputFile.h"
#include "llvm/Target/TargetMachine.h"
#include "llvm/Target/TargetOptions.h"
@@ -174,6 +175,10 @@ struct LTOCodeGenerator {
/// Calls \a verifyMergedModuleOnce().
bool compileOptimized(ArrayRef<raw_pwrite_stream *> Out);
+ /// Enable the Freestanding mode: indicate that the optimizer should not
+ /// assume builtins are present on the target.
+ void setFreestanding(bool Enabled) { Freestanding = Enabled; }
+
void setDiagnosticHandler(lto_diagnostic_handler_t, void *);
LLVMContext &getContext() { return Context; }
@@ -206,7 +211,6 @@ private:
void emitError(const std::string &ErrMsg);
void emitWarning(const std::string &ErrMsg);
- bool setupOptimizationRemarks();
void finishOptimizationRemarks();
LLVMContext &Context;
@@ -237,6 +241,7 @@ private:
bool ShouldRestoreGlobalsLinkage = false;
TargetMachine::CodeGenFileType FileType = TargetMachine::CGFT_ObjectFile;
std::unique_ptr<tool_output_file> DiagnosticOutputFile;
+ bool Freestanding = false;
};
}
#endif