summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2013-10-29 17:28:26 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2013-10-29 17:28:26 +0000
commit93cf0939f95b3d580d9c05375a7c84164e1ba72e (patch)
treea96b38da3a97d31cc718f361f15ab79fe2e12270 /include
parentfaf4ed2da85b10eb0b6c506c4a642a2a9395786f (diff)
downloadllvm-93cf0939f95b3d580d9c05375a7c84164e1ba72e.tar.gz
llvm-93cf0939f95b3d580d9c05375a7c84164e1ba72e.tar.bz2
llvm-93cf0939f95b3d580d9c05375a7c84164e1ba72e.tar.xz
Move getSymbol to TargetLoweringObjectFile.
This allows constructing a Mangler with just a TargetMachine. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193630 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/Target/Mangler.h9
-rw-r--r--include/llvm/Target/TargetLoweringObjectFile.h4
2 files changed, 5 insertions, 8 deletions
diff --git a/include/llvm/Target/Mangler.h b/include/llvm/Target/Mangler.h
index e925cd5164..eee7bf6d69 100644
--- a/include/llvm/Target/Mangler.h
+++ b/include/llvm/Target/Mangler.h
@@ -20,7 +20,6 @@ namespace llvm {
class GlobalValue;
class MCContext;
-class MCSymbol;
template <typename T> class SmallVectorImpl;
class TargetMachine;
class Twine;
@@ -34,7 +33,6 @@ public:
};
private:
- MCContext &Context;
const TargetMachine *TM;
/// AnonGlobalIDs - We need to give global values the same name every time
@@ -48,12 +46,7 @@ private:
unsigned NextAnonGlobalID;
public:
- Mangler(MCContext &Context, const TargetMachine *TM)
- : Context(Context), TM(TM), NextAnonGlobalID(1) {}
-
- /// getSymbol - Return the MCSymbol for the specified global value. This
- /// symbol is the main label that is the address of the global.
- MCSymbol *getSymbol(const GlobalValue *GV);
+ Mangler(const TargetMachine *TM) : TM(TM), NextAnonGlobalID(1) {}
/// getNameWithPrefix - Fill OutName with the name of the appropriate prefix
/// and the specified global variable's name. If the global variable doesn't
diff --git a/include/llvm/Target/TargetLoweringObjectFile.h b/include/llvm/Target/TargetLoweringObjectFile.h
index 7f15b74258..284b6bbdb8 100644
--- a/include/llvm/Target/TargetLoweringObjectFile.h
+++ b/include/llvm/Target/TargetLoweringObjectFile.h
@@ -117,6 +117,10 @@ public:
MachineModuleInfo *MMI, unsigned Encoding,
MCStreamer &Streamer) const;
+ /// Return the MCSymbol for the specified global value. This symbol is the
+ /// main label that is the address of the global
+ MCSymbol *getSymbol(Mangler &M, const GlobalValue *GV) const;
+
// getCFIPersonalitySymbol - The symbol that gets passed to .cfi_personality.
virtual MCSymbol *
getCFIPersonalitySymbol(const GlobalValue *GV, Mangler *Mang,