From d95e67dac029d48984b72889a96a1bb389b8ac71 Mon Sep 17 00:00:00 2001 From: Dylan Noblesmith Date: Thu, 1 Dec 2011 21:49:21 +0000 Subject: ExecutionEngine: honor optimization level It was getting ignored after r144788. Also fix an accidental implicit cast from the OptLevel enum to an optional bool argument. MSVC warned on this, but gcc didn't. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145633 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/ExecutionEngine/TargetSelect.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/ExecutionEngine/TargetSelect.cpp') diff --git a/lib/ExecutionEngine/TargetSelect.cpp b/lib/ExecutionEngine/TargetSelect.cpp index 45480a6d59..cf2d9ff561 100644 --- a/lib/ExecutionEngine/TargetSelect.cpp +++ b/lib/ExecutionEngine/TargetSelect.cpp @@ -32,6 +32,7 @@ TargetMachine *EngineBuilder::selectTarget(Module *Mod, const SmallVectorImpl& MAttrs, Reloc::Model RM, CodeModel::Model CM, + CodeGenOpt::Level OL, std::string *ErrorStr) { Triple TheTriple(Mod->getTargetTriple()); if (TheTriple.getTriple().empty()) @@ -87,7 +88,7 @@ TargetMachine *EngineBuilder::selectTarget(Module *Mod, // Allocate a target... TargetMachine *Target = TheTarget->createTargetMachine(TheTriple.getTriple(), MCPU, FeaturesStr, - RM, CM); + RM, CM, OL); assert(Target && "Could not allocate target machine!"); return Target; } -- cgit v1.2.3-70-g09d2