mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 03:33:20 +01:00
Fix build with gcc-4.4: it doesn't like PICStyle
being both a namespace and a variable name. llvm-svn: 60208
This commit is contained in:
parent
1b70ed5140
commit
7fd4ea5847
@ -239,7 +239,7 @@ static const char *GetCurrentX86CPU() {
|
||||
|
||||
X86Subtarget::X86Subtarget(const Module &M, const std::string &FS, bool is64Bit)
|
||||
: AsmFlavor(AsmWriterFlavor)
|
||||
, PICStyle(PICStyle::None)
|
||||
, PICStyle(PICStyles::None)
|
||||
, X86SSELevel(NoMMXSSE)
|
||||
, X863DNowLevel(NoThreeDNow)
|
||||
, HasX86_64(false)
|
||||
|
@ -23,7 +23,7 @@ class Module;
|
||||
class GlobalValue;
|
||||
class TargetMachine;
|
||||
|
||||
namespace PICStyle {
|
||||
namespace PICStyles {
|
||||
enum Style {
|
||||
Stub, GOT, RIPRel, WinPIC, None
|
||||
};
|
||||
@ -51,7 +51,7 @@ protected:
|
||||
|
||||
/// PICStyle - Which PIC style to use
|
||||
///
|
||||
PICStyle::Style PICStyle;
|
||||
PICStyles::Style PICStyle;
|
||||
|
||||
/// X86SSELevel - MMX, SSE1, SSE2, SSE3, SSSE3, SSE41, SSE42, or
|
||||
/// none supported.
|
||||
@ -114,8 +114,8 @@ public:
|
||||
|
||||
bool is64Bit() const { return Is64Bit; }
|
||||
|
||||
PICStyle::Style getPICStyle() const { return PICStyle; }
|
||||
void setPICStyle(PICStyle::Style Style) { PICStyle = Style; }
|
||||
PICStyles::Style getPICStyle() const { return PICStyle; }
|
||||
void setPICStyle(PICStyles::Style Style) { PICStyle = Style; }
|
||||
|
||||
bool hasMMX() const { return X86SSELevel >= MMX; }
|
||||
bool hasSSE1() const { return X86SSELevel >= SSE1; }
|
||||
@ -160,11 +160,11 @@ public:
|
||||
return std::string(p);
|
||||
}
|
||||
|
||||
bool isPICStyleSet() const { return PICStyle != PICStyle::None; }
|
||||
bool isPICStyleGOT() const { return PICStyle == PICStyle::GOT; }
|
||||
bool isPICStyleStub() const { return PICStyle == PICStyle::Stub; }
|
||||
bool isPICStyleRIPRel() const { return PICStyle == PICStyle::RIPRel; }
|
||||
bool isPICStyleWinPIC() const { return PICStyle == PICStyle:: WinPIC; }
|
||||
bool isPICStyleSet() const { return PICStyle != PICStyles::None; }
|
||||
bool isPICStyleGOT() const { return PICStyle == PICStyles::GOT; }
|
||||
bool isPICStyleStub() const { return PICStyle == PICStyles::Stub; }
|
||||
bool isPICStyleRIPRel() const { return PICStyle == PICStyles::RIPRel; }
|
||||
bool isPICStyleWinPIC() const { return PICStyle == PICStyles:: WinPIC; }
|
||||
|
||||
/// getDarwinVers - Return the darwin version number, 8 = tiger, 9 = leopard.
|
||||
unsigned getDarwinVers() const { return DarwinVers; }
|
||||
|
@ -162,17 +162,17 @@ X86TargetMachine::X86TargetMachine(const Module &M, const std::string &FS,
|
||||
}
|
||||
|
||||
if (Subtarget.isTargetCygMing())
|
||||
Subtarget.setPICStyle(PICStyle::WinPIC);
|
||||
Subtarget.setPICStyle(PICStyles::WinPIC);
|
||||
else if (Subtarget.isTargetDarwin()) {
|
||||
if (Subtarget.is64Bit())
|
||||
Subtarget.setPICStyle(PICStyle::RIPRel);
|
||||
Subtarget.setPICStyle(PICStyles::RIPRel);
|
||||
else
|
||||
Subtarget.setPICStyle(PICStyle::Stub);
|
||||
Subtarget.setPICStyle(PICStyles::Stub);
|
||||
} else if (Subtarget.isTargetELF()) {
|
||||
if (Subtarget.is64Bit())
|
||||
Subtarget.setPICStyle(PICStyle::RIPRel);
|
||||
Subtarget.setPICStyle(PICStyles::RIPRel);
|
||||
else
|
||||
Subtarget.setPICStyle(PICStyle::GOT);
|
||||
Subtarget.setPICStyle(PICStyles::GOT);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user