Fixing up IRGenModule to handle changes in CodeGenOptions.

DisableFPElim was removed from CGO in cfe r366645. This change fixes the build
for master-next.

(cherry picked from commit 5d0fec6e36)
This commit is contained in:
Puyan Lotfi
2019-07-22 00:59:13 -07:00
committed by Jonas Devlieghere
parent 970eb2f439
commit 333ffb321e

View File

@@ -94,7 +94,9 @@ static clang::CodeGenerator *createClangCodeGenerator(ASTContext &Context,
auto &CGO = Importer->getClangCodeGenOpts();
CGO.OptimizationLevel = Opts.shouldOptimize() ? 3 : 0;
CGO.DisableFPElim = Opts.DisableFPElim;
CGO.setFramePointer(Opts.DisableFPElim
? clang::CodeGenOptions::FramePointerKind::All
: clang::CodeGenOptions::FramePointerKind::None);
CGO.DiscardValueNames = !Opts.shouldProvideValueNames();
switch (Opts.DebugInfoLevel) {
case IRGenDebugInfoLevel::None: