diff options
author | Chris Lattner <sabre@nondot.org> | 2009-07-26 07:33:58 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-07-26 07:33:58 +0000 |
commit | f40761d5229322c08701049f89aa10f7f7b8b743 (patch) | |
tree | f2e518e73ea7336cbd533cec5f9f97d7ef6ae666 /include | |
parent | 6468b44d3a300007077ff0d8c70b8cf15ae618e8 (diff) | |
download | external_llvm-f40761d5229322c08701049f89aa10f7f7b8b743.zip external_llvm-f40761d5229322c08701049f89aa10f7f7b8b743.tar.gz external_llvm-f40761d5229322c08701049f89aa10f7f7b8b743.tar.bz2 |
remove a densemap from TargetAsmInfo that was uniquing the targetflags strings,
just use a smallstring instead.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77144 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/Target/ELFTargetAsmInfo.h | 3 | ||||
-rw-r--r-- | include/llvm/Target/TargetAsmInfo.h | 13 |
2 files changed, 9 insertions, 7 deletions
diff --git a/include/llvm/Target/ELFTargetAsmInfo.h b/include/llvm/Target/ELFTargetAsmInfo.h index 854217f..eb24dd1 100644 --- a/include/llvm/Target/ELFTargetAsmInfo.h +++ b/include/llvm/Target/ELFTargetAsmInfo.h @@ -41,7 +41,8 @@ namespace llvm { virtual const Section* SelectSectionForGlobal(const GlobalValue *GV, SectionKind Kind) const; - virtual std::string printSectionFlags(unsigned flags) const; + virtual void getSectionFlags(unsigned Flags, + SmallVectorImpl<char> &Str) const; const Section *DataRelSection; const Section *DataRelLocalSection; diff --git a/include/llvm/Target/TargetAsmInfo.h b/include/llvm/Target/TargetAsmInfo.h index 3a34905..ab28ec1 100644 --- a/include/llvm/Target/TargetAsmInfo.h +++ b/include/llvm/Target/TargetAsmInfo.h @@ -16,12 +16,13 @@ #ifndef LLVM_TARGET_ASM_INFO_H #define LLVM_TARGET_ASM_INFO_H -#include "llvm/ADT/DenseMap.h" #include "llvm/ADT/StringMap.h" #include "llvm/Support/DataTypes.h" #include <string> namespace llvm { + template <typename T> class SmallVectorImpl; + // DWARF encoding query type namespace DwarfEncoding { enum Target { @@ -235,8 +236,6 @@ namespace llvm { static bool isEqual(unsigned LHS, unsigned RHS) { return LHS == RHS; } static bool isPod() { return true; } }; - - typedef DenseMap<unsigned, std::string, KeyInfo> FlagsStringsMapType; } class TargetMachine; @@ -269,7 +268,6 @@ namespace llvm { class TargetAsmInfo { private: mutable StringMap<Section> Sections; - mutable SectionFlags::FlagsStringsMapType FlagsStrings; protected: /// TM - The current TargetMachine. const TargetMachine &TM; @@ -746,8 +744,11 @@ namespace llvm { return 0; } - const std::string &getSectionFlags(unsigned Flags) const; - virtual std::string printSectionFlags(unsigned flags) const { return ""; } + /// Turn the specified flags into a string that can be printed to the + /// assembly file. + virtual void getSectionFlags(unsigned Flags, + SmallVectorImpl<char> &Str) const { + } // FIXME: Eliminate this. virtual const Section* SelectSectionForGlobal(const GlobalValue *GV, |