summaryrefslogtreecommitdiffstats
path: root/llvm/lib/ExecutionEngine/TargetSelect.cpp
diff options
context:
space:
mode:
authorDylan Noblesmith <nobled@dreamwidth.org>2011-12-01 21:49:21 +0000
committerDylan Noblesmith <nobled@dreamwidth.org>2011-12-01 21:49:21 +0000
commit19a58df9bb3f8d45b4c5abf465ed6b0347332c69 (patch)
tree3789f79586459f694b2614a7bad83bc84da162ca /llvm/lib/ExecutionEngine/TargetSelect.cpp
parent5dfa4da0b92a7587d79ea17524cf25969d2353e1 (diff)
downloadbcm5719-llvm-19a58df9bb3f8d45b4c5abf465ed6b0347332c69.tar.gz
bcm5719-llvm-19a58df9bb3f8d45b4c5abf465ed6b0347332c69.zip
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
Diffstat (limited to 'llvm/lib/ExecutionEngine/TargetSelect.cpp')
-rw-r--r--llvm/lib/ExecutionEngine/TargetSelect.cpp3
1 files changed, 2 insertions, 1 deletions
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<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;
}
OpenPOWER on IntegriCloud