From 84ac4d5a2a8fd0e6f95ec46088c0ca7bb63423ac Mon Sep 17 00:00:00 2001 From: "Michael J. Spencer" Date: Sat, 16 Oct 2010 08:25:41 +0000 Subject: 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 --- include/llvm/CodeGen/MachineModuleInfo.h | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'include/llvm/CodeGen/MachineModuleInfo.h') diff --git a/include/llvm/CodeGen/MachineModuleInfo.h b/include/llvm/CodeGen/MachineModuleInfo.h index c0890f4..4376478 100644 --- a/include/llvm/CodeGen/MachineModuleInfo.h +++ b/include/llvm/CodeGen/MachineModuleInfo.h @@ -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. -- cgit v1.1