diff options
author | Dylan Noblesmith <nobled@dreamwidth.org> | 2011-12-01 21:49:21 +0000 |
---|---|---|
committer | Dylan Noblesmith <nobled@dreamwidth.org> | 2011-12-01 21:49:21 +0000 |
commit | d95e67dac029d48984b72889a96a1bb389b8ac71 (patch) | |
tree | 0a3e91fba34be1c4b4556b32121320449ee93fa3 /lib/ExecutionEngine/TargetSelect.cpp | |
parent | 00737bdb488cc7157ca5f7a40d6cd8467ad09a79 (diff) |
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
Diffstat (limited to 'lib/ExecutionEngine/TargetSelect.cpp')
-rw-r--r-- | lib/ExecutionEngine/TargetSelect.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
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<std::string>& 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; } |