X86-Windows: Emit an undefined global __fltused symbol when targeting Windows

if any floating point arguments are passed to an external function.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116665 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Michael J. Spencer
2010-10-16 08:25:41 +00:00
parent e70c526d59
commit 84ac4d5a2a
5 changed files with 60 additions and 2 deletions

View File

@@ -157,6 +157,11 @@ class MachineModuleInfo : public ImmutablePass {
/// in this module.
bool DbgInfoAvailable;
/// True if this module calls an external function with floating point
/// arguments. This is used to emit an undefined reference to fltused on
/// Windows targets.
bool CallsExternalFunctionWithFloatingPointArguments;
public:
static char ID; // Pass identification, replacement for typeid
@@ -211,7 +216,15 @@ public:
bool callsUnwindInit() const { return CallsUnwindInit; }
void setCallsUnwindInit(bool b) { CallsUnwindInit = b; }
bool callsExternalFunctionWithFloatingPointArguments() const {
return CallsExternalFunctionWithFloatingPointArguments;
}
void setCallsExternalFunctionWithFloatingPointArguments(bool b) {
CallsExternalFunctionWithFloatingPointArguments = b;
}
/// getFrameMoves - Returns a reference to a list of moves done in the current
/// function's prologue. Used to construct frame maps for debug and exception
/// handling comsumers.