From 19a58df9bb3f8d45b4c5abf465ed6b0347332c69 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. llvm-svn: 145633 --- llvm/lib/ExecutionEngine/TargetSelect.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'llvm/lib/ExecutionEngine/TargetSelect.cpp') diff --git a/llvm/lib/ExecutionEngine/TargetSelect.cpp b/llvm/lib/ExecutionEngine/TargetSelect.cpp index 45480a6d590..cf2d9ff5618 100644 --- a/llvm/lib/ExecutionEngine/TargetSelect.cpp +++ b/llvm/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