aboutsummaryrefslogtreecommitdiff
path: root/utils/TableGen/CodeGenTarget.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-08-01 03:55:39 +0000
committerChris Lattner <sabre@nondot.org>2004-08-01 03:55:39 +0000
commit2082ebe8b3a5db302748828ab4f79a36d239c1d9 (patch)
tree5bab7643155a37133b11ae955f1f49a4adbf1990 /utils/TableGen/CodeGenTarget.cpp
parent1ab7c5b5e891804411d85d98403536f705d82fcc (diff)
Finegrainify namespacification
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15381 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/TableGen/CodeGenTarget.cpp')
-rw-r--r--utils/TableGen/CodeGenTarget.cpp13
1 files changed, 5 insertions, 8 deletions
diff --git a/utils/TableGen/CodeGenTarget.cpp b/utils/TableGen/CodeGenTarget.cpp
index 842294a037..fe4ad2634d 100644
--- a/utils/TableGen/CodeGenTarget.cpp
+++ b/utils/TableGen/CodeGenTarget.cpp
@@ -16,16 +16,15 @@
#include "CodeGenWrappers.h"
#include "Record.h"
-
-namespace llvm {
+using namespace llvm;
/// getValueType - Return the MCV::ValueType that the specified TableGen record
/// corresponds to.
-MVT::ValueType getValueType(Record *Rec) {
+MVT::ValueType llvm::getValueType(Record *Rec) {
return (MVT::ValueType)Rec->getValueAsInt("Value");
}
-std::string getName(MVT::ValueType T) {
+std::string llvm::getName(MVT::ValueType T) {
switch (T) {
case MVT::Other: return "UNKNOWN";
case MVT::i1: return "i1";
@@ -43,7 +42,7 @@ std::string getName(MVT::ValueType T) {
}
}
-std::string getEnumName(MVT::ValueType T) {
+std::string llvm::getEnumName(MVT::ValueType T) {
switch (T) {
case MVT::Other: return "Other";
case MVT::i1: return "i1";
@@ -62,12 +61,11 @@ std::string getEnumName(MVT::ValueType T) {
}
-std::ostream &operator<<(std::ostream &OS, MVT::ValueType T) {
+std::ostream &llvm::operator<<(std::ostream &OS, MVT::ValueType T) {
return OS << getName(T);
}
-
/// getTarget - Return the current instance of the Target class.
///
CodeGenTarget::CodeGenTarget() : PointerType(MVT::Other) {
@@ -99,4 +97,3 @@ Record *CodeGenTarget::getInstructionSet() const {
return TargetRec->getValueAsDef("InstructionSet");
}
-} // End llvm namespace