diff options
author | Simon Pilgrim <llvm-dev@redking.me.uk> | 2020-05-18 16:56:53 +0100 |
---|---|---|
committer | Simon Pilgrim <llvm-dev@redking.me.uk> | 2020-05-19 09:28:13 +0100 |
commit | cdafe59f9528567df2e06c9f92f089791e3b9d5b (patch) | |
tree | 2c9e304fc3fce018d7082976bc6415b8747c4c03 /llvm/lib/Target/TargetLoweringObjectFile.cpp | |
parent | d94bacbcf87a06abc0c1fc3405406399460debc3 (diff) | |
download | llvm-cdafe59f9528567df2e06c9f92f089791e3b9d5b.zip llvm-cdafe59f9528567df2e06c9f92f089791e3b9d5b.tar.gz llvm-cdafe59f9528567df2e06c9f92f089791e3b9d5b.tar.bz2 |
TargetLoweringObjectFile.h - remove unnecessary includes. NFCI.
Replace with forward declarations and move includes down to source files where required.
I also needed to move the TargetLoweringObjectFile::SectionForGlobal wrapper implementation down into TargetLoweringObjectFile.cpp
Diffstat (limited to 'llvm/lib/Target/TargetLoweringObjectFile.cpp')
-rw-r--r-- | llvm/lib/Target/TargetLoweringObjectFile.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/llvm/lib/Target/TargetLoweringObjectFile.cpp b/llvm/lib/Target/TargetLoweringObjectFile.cpp index e7312e7..d48efef 100644 --- a/llvm/lib/Target/TargetLoweringObjectFile.cpp +++ b/llvm/lib/Target/TargetLoweringObjectFile.cpp @@ -19,10 +19,12 @@ #include "llvm/IR/Function.h" #include "llvm/IR/GlobalVariable.h" #include "llvm/IR/Mangler.h" +#include "llvm/IR/Module.h" #include "llvm/MC/MCContext.h" #include "llvm/MC/MCExpr.h" #include "llvm/MC/MCStreamer.h" #include "llvm/MC/MCSymbol.h" +#include "llvm/MC/SectionKind.h" #include "llvm/Support/ErrorHandling.h" #include "llvm/Support/raw_ostream.h" #include "llvm/Target/TargetMachine.h" @@ -271,6 +273,15 @@ MCSection *TargetLoweringObjectFile::SectionForGlobal( return SelectSectionForGlobal(GO, Kind, TM); } +/// This method computes the appropriate section to emit the specified global +/// variable or function definition. This should not be passed external (or +/// available externally) globals. +MCSection * +TargetLoweringObjectFile::SectionForGlobal(const GlobalObject *GO, + const TargetMachine &TM) const { + return SectionForGlobal(GO, getKindForGlobal(GO, TM), TM); +} + MCSection *TargetLoweringObjectFile::getSectionForJumpTable( const Function &F, const TargetMachine &TM) const { unsigned Align = 0; |