aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/CodeGen/MachineModuleInfo.h
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2019-08-20 20:50:12 +0000
committerDimitry Andric <dim@FreeBSD.org>2019-08-20 20:50:12 +0000
commite6d1592492a3a379186bfb02bd0f4eda0669c0d5 (patch)
tree599ab169a01f1c86eda9adc774edaedde2f2db5b /include/llvm/CodeGen/MachineModuleInfo.h
parent1a56a5ead7a2e84bee8240f5f6b033b5f1707154 (diff)
Diffstat (limited to 'include/llvm/CodeGen/MachineModuleInfo.h')
-rw-r--r--include/llvm/CodeGen/MachineModuleInfo.h32
1 files changed, 10 insertions, 22 deletions
diff --git a/include/llvm/CodeGen/MachineModuleInfo.h b/include/llvm/CodeGen/MachineModuleInfo.h
index 4371420bc7a2..4ff5c7fd013a 100644
--- a/include/llvm/CodeGen/MachineModuleInfo.h
+++ b/include/llvm/CodeGen/MachineModuleInfo.h
@@ -1,9 +1,8 @@
//===-- llvm/CodeGen/MachineModuleInfo.h ------------------------*- C++ -*-===//
//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
//
@@ -114,10 +113,9 @@ class MachineModuleInfo : public ImmutablePass {
/// True if debugging information is available in this module.
bool DbgInfoAvailable;
- /// True if this module calls VarArg function with floating-point arguments.
- /// This is used to emit an undefined reference to _fltused on Windows
- /// targets.
- bool UsesVAFloatArgument;
+ /// True if this module is being built for windows/msvc, and uses floating
+ /// point. This is used to emit an undefined reference to _fltused.
+ bool UsesMSVCFloatingPoint;
/// True if the module calls the __morestack function indirectly, as is
/// required under the large code model on x86. This is used to emit
@@ -152,6 +150,8 @@ public:
bool doInitialization(Module &) override;
bool doFinalization(Module &) override;
+ const LLVMTargetMachine &getTarget() const { return TM; }
+
const MCContext &getContext() const { return Context; }
MCContext &getContext() { return Context; }
@@ -187,13 +187,9 @@ public:
bool hasDebugInfo() const { return DbgInfoAvailable; }
void setDebugInfoAvailability(bool avail) { DbgInfoAvailable = avail; }
- bool usesVAFloatArgument() const {
- return UsesVAFloatArgument;
- }
+ bool usesMSVCFloatingPoint() const { return UsesMSVCFloatingPoint; }
- void setUsesVAFloatArgument(bool b) {
- UsesVAFloatArgument = b;
- }
+ void setUsesMSVCFloatingPoint(bool b) { UsesMSVCFloatingPoint = b; }
bool usesMorestackAddr() const {
return UsesMorestackAddr;
@@ -258,14 +254,6 @@ public:
/// \}
}; // End class MachineModuleInfo
-//===- MMI building helpers -----------------------------------------------===//
-
-/// Determine if any floating-point values are being passed to this variadic
-/// function, and set the MachineModuleInfo's usesVAFloatArgument flag if so.
-/// This flag is used to emit an undefined reference to _fltused on Windows,
-/// which will link in MSVCRT's floating-point support.
-void computeUsesVAFloatArgument(const CallInst &I, MachineModuleInfo &MMI);
-
} // end namespace llvm
#endif // LLVM_CODEGEN_MACHINEMODULEINFO_H