mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-04 02:24:29 +00:00
Remove NoFramePointerElim and NoFramePointerElimOverride from TargetOptions and
remove ExecutionEngine's dependence on CodeGen. NFC. This is a follow-up to r238080. Differential Revision: http://reviews.llvm.org/D9830 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238244 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -177,15 +177,19 @@ LLVMBool LLVMCreateMCJITCompilerForModule(
|
||||
memcpy(&options, PassedOptions, SizeOfPassedOptions);
|
||||
|
||||
TargetOptions targetOptions;
|
||||
targetOptions.NoFramePointerElim = options.NoFramePointerElim;
|
||||
targetOptions.EnableFastISel = options.EnableFastISel;
|
||||
std::unique_ptr<Module> Mod(unwrap(M));
|
||||
|
||||
if (Mod)
|
||||
// Set function attribute "no-frame-pointer-elim" based on
|
||||
// NoFramePointerElim.
|
||||
setFunctionAttributes(/* CPU */ "", /* Features */ "", targetOptions, *Mod,
|
||||
/* AlwaysRecordAttrs */ true);
|
||||
for (auto &F : *Mod) {
|
||||
auto Attrs = F.getAttributes();
|
||||
auto Value = options.NoFramePointerElim ? "true" : "false";
|
||||
Attrs = Attrs.addAttribute(F.getContext(), AttributeSet::FunctionIndex,
|
||||
"no-frame-pointer-elim", Value);
|
||||
F.setAttributes(Attrs);
|
||||
}
|
||||
|
||||
std::string Error;
|
||||
EngineBuilder builder(std::move(Mod));
|
||||
|
Reference in New Issue
Block a user