diff options
author | Chris Lattner <sabre@nondot.org> | 2006-10-05 00:35:16 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2006-10-05 00:35:16 +0000 |
commit | f5b10ec509d7e27df12372e53adeda59051dfc30 (patch) | |
tree | 1e4ddb5d89a71dd23a442cd2dd9c57fdda356386 | |
parent | fea13d33e50a9d6777237e76bb59b3be5422bdbc (diff) |
Give TargetAsmInfo a virtual dtor, add a new getSectionForFunction method.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30732 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | include/llvm/Target/TargetAsmInfo.h | 12 | ||||
-rw-r--r-- | lib/Target/TargetAsmInfo.cpp | 3 |
2 files changed, 13 insertions, 2 deletions
diff --git a/include/llvm/Target/TargetAsmInfo.h b/include/llvm/Target/TargetAsmInfo.h index 9c3a5ab0f2..003f00a7a5 100644 --- a/include/llvm/Target/TargetAsmInfo.h +++ b/include/llvm/Target/TargetAsmInfo.h @@ -262,10 +262,18 @@ namespace llvm { /// const char *DwarfMacInfoSection; // Defaults to ".debug_macinfo". - public: TargetAsmInfo(); - + virtual ~TargetAsmInfo(); + + /// getSectionForFunction - Return the section that we should emit the + /// specified function body into. This defaults to 'TextSection'. This + /// should most likely be overridden by the target to put linkonce/weak + /// functions into special sections. + virtual const char *getSectionForFunction(const Function &F) const { + return TextSection; + } + // // Accessors. // diff --git a/lib/Target/TargetAsmInfo.cpp b/lib/Target/TargetAsmInfo.cpp index c085eb4db0..3aa2999601 100644 --- a/lib/Target/TargetAsmInfo.cpp +++ b/lib/Target/TargetAsmInfo.cpp @@ -74,3 +74,6 @@ TargetAsmInfo::TargetAsmInfo() : DwarfRangesSection(".debug_ranges"), DwarfMacInfoSection(".debug_macinfo") {} + +TargetAsmInfo::~TargetAsmInfo() { +} |