mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-10-05 11:17:53 +00:00
Don't reach into the middle of TargetMachine and cache one of its ivars.
Not only does this break encapsulation, it's gross. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182876 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -17,12 +17,13 @@
|
||||
#include "llvm/ADT/DenseMap.h"
|
||||
|
||||
namespace llvm {
|
||||
class Twine;
|
||||
|
||||
class GlobalValue;
|
||||
template <typename T> class SmallVectorImpl;
|
||||
class MCContext;
|
||||
class MCSymbol;
|
||||
class DataLayout;
|
||||
template <typename T> class SmallVectorImpl;
|
||||
class TargetMachine;
|
||||
class Twine;
|
||||
|
||||
class Mangler {
|
||||
public:
|
||||
@@ -34,7 +35,7 @@ public:
|
||||
|
||||
private:
|
||||
MCContext &Context;
|
||||
const DataLayout &TD;
|
||||
const TargetMachine *TM;
|
||||
|
||||
/// AnonGlobalIDs - We need to give global values the same name every time
|
||||
/// they are mangled. This keeps track of the number we give to anonymous
|
||||
@@ -47,8 +48,8 @@ private:
|
||||
unsigned NextAnonGlobalID;
|
||||
|
||||
public:
|
||||
Mangler(MCContext &context, const DataLayout &td)
|
||||
: Context(context), TD(td), NextAnonGlobalID(1) {}
|
||||
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.
|
||||
|
Reference in New Issue
Block a user