diff options
author | Chris Lattner <sabre@nondot.org> | 2006-05-09 04:59:30 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2006-05-09 04:59:30 +0000 |
commit | f668ffc4c2cf3da8ef0948b316d971c4b41b0e05 (patch) | |
tree | e69f0adea45112f02effb53a75adfb531bd7bbaf | |
parent | 4c15e3394671a87fbbbf21362079d11a4221654c (diff) |
Split SwitchSection into the SwitchTo{Text|Data}Section functions, to better
support assemblers that distinguish the two.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28183 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | include/llvm/CodeGen/AsmPrinter.h | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/include/llvm/CodeGen/AsmPrinter.h b/include/llvm/CodeGen/AsmPrinter.h index 60bfabf29c..5f895b3c3c 100644 --- a/include/llvm/CodeGen/AsmPrinter.h +++ b/include/llvm/CodeGen/AsmPrinter.h @@ -179,16 +179,32 @@ namespace llvm { AsmPrinter(std::ostream &o, TargetMachine &TM); public: - /// SwitchSection - Switch to the specified section of the executable if we - /// are not already in it! If GV is non-null and if the global has an + /// SwitchToTextSection - Switch to the specified section of the executable + /// if we are not already in it! If GV is non-null and if the global has an /// explicitly requested section, we switch to the section indicated for the /// global instead of NewSection. /// /// If the new section is an empty string, this method forgets what the /// current section is, but does not emit a .section directive. /// - void SwitchSection(const char *NewSection, const GlobalValue *GV); + /// This method is used when about to emit executable code. + /// + void SwitchToTextSection(const char *NewSection, const GlobalValue *GV); + /// SwitchToDataSection - Switch to the specified section of the executable + /// if we are not already in it! If GV is non-null and if the global has an + /// explicitly requested section, we switch to the section indicated for the + /// global instead of NewSection. + /// + /// If the new section is an empty string, this method forgets what the + /// current section is, but does not emit a .section directive. + /// + /// This method is used when about to emit data. For most assemblers, this + /// is the same as the SwitchToTextSection method, but not all assemblers + /// are the same. + /// + void SwitchToDataSection(const char *NewSection, const GlobalValue *GV); + /// getPreferredAlignmentLog - Return the preferred alignment of the /// specified global, returned in log form. This includes an explicitly /// requested alignment (if the global has one). |