aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Target/X86
diff options
context:
space:
mode:
authorDuncan Sands <baldrick@free.fr>2008-11-28 09:29:37 +0000
committerDuncan Sands <baldrick@free.fr>2008-11-28 09:29:37 +0000
commitf9a67a894366482cb2aa70a0e4dfeb5d76f91988 (patch)
treebb30df4c67b68f67bcb8b9715bb0162246197871 /lib/Target/X86
parent7605730ba8eaf248a8285bb2055e131f13c15b63 (diff)
downloadexternal_llvm-f9a67a894366482cb2aa70a0e4dfeb5d76f91988.zip
external_llvm-f9a67a894366482cb2aa70a0e4dfeb5d76f91988.tar.gz
external_llvm-f9a67a894366482cb2aa70a0e4dfeb5d76f91988.tar.bz2
Fix build with gcc-4.4: it doesn't like PICStyle
being both a namespace and a variable name. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60208 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/X86')
-rw-r--r--lib/Target/X86/X86Subtarget.cpp2
-rw-r--r--lib/Target/X86/X86Subtarget.h18
-rw-r--r--lib/Target/X86/X86TargetMachine.cpp10
3 files changed, 15 insertions, 15 deletions
diff --git a/lib/Target/X86/X86Subtarget.cpp b/lib/Target/X86/X86Subtarget.cpp
index 871e7af..c17f2dc 100644
--- a/lib/Target/X86/X86Subtarget.cpp
+++ b/lib/Target/X86/X86Subtarget.cpp
@@ -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)
diff --git a/lib/Target/X86/X86Subtarget.h b/lib/Target/X86/X86Subtarget.h
index b95a2e4..f49008a 100644
--- a/lib/Target/X86/X86Subtarget.h
+++ b/lib/Target/X86/X86Subtarget.h
@@ -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; }
diff --git a/lib/Target/X86/X86TargetMachine.cpp b/lib/Target/X86/X86TargetMachine.cpp
index 1e90c0f..ce4b090 100644
--- a/lib/Target/X86/X86TargetMachine.cpp
+++ b/lib/Target/X86/X86TargetMachine.cpp
@@ -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);
}
}