Skip to content
This repository has been archived by the owner on Apr 23, 2020. It is now read-only.

Commit

Permalink
Fix for r280064 that added options for fp denormals and exceptions.
Browse files Browse the repository at this point in the history
These options were forgotten to be copied in setCommandLineOpts.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@282255 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
Sjoerd Meijer committed Sep 23, 2016
1 parent 04f6547 commit c09889b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lib/CodeGen/BackendUtil.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -537,6 +537,12 @@ void EmitAssemblyHelper::CreateTargetMachine(bool MustCreateTM) {
.Case("posix", llvm::ThreadModel::POSIX)
.Case("single", llvm::ThreadModel::Single);

Options.FPDenormalType =
llvm::StringSwitch<llvm::FPDenormal::DenormalType>(CodeGenOpts.FPDenormalMode)
.Case("ieee", llvm::FPDenormal::IEEE)
.Case("preserve-sign", llvm::FPDenormal::PreserveSign)
.Case("positive-zero", llvm::FPDenormal::PositiveZero);

// Set float ABI type.
assert((CodeGenOpts.FloatABI == "soft" || CodeGenOpts.FloatABI == "softfp" ||
CodeGenOpts.FloatABI == "hard" || CodeGenOpts.FloatABI.empty()) &&
Expand Down Expand Up @@ -579,6 +585,7 @@ void EmitAssemblyHelper::CreateTargetMachine(bool MustCreateTM) {
Options.LessPreciseFPMADOption = CodeGenOpts.LessPreciseFPMAD;
Options.NoInfsFPMath = CodeGenOpts.NoInfsFPMath;
Options.NoNaNsFPMath = CodeGenOpts.NoNaNsFPMath;
Options.NoTrappingFPMath = CodeGenOpts.NoTrappingMath;
Options.NoZerosInBSS = CodeGenOpts.NoZeroInitializedInBSS;
Options.UnsafeFPMath = CodeGenOpts.UnsafeFPMath;
Options.StackAlignmentOverride = CodeGenOpts.StackAlignment;
Expand Down

0 comments on commit c09889b

Please sign in to comment.