mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-13 23:25:06 +00:00
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
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user