Remove redundant 'llvm::' qualifications

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172358 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Dmitri Gribenko
2013-01-13 16:01:15 +00:00
parent a6f10317bf
commit 96f498bd9f
13 changed files with 47 additions and 47 deletions

View File

@ -535,7 +535,7 @@ namespace llvm {
return LHS.compare(RHS) != -1; return LHS.compare(RHS) != -1;
} }
inline std::string &operator+=(std::string &buffer, llvm::StringRef string) { inline std::string &operator+=(std::string &buffer, StringRef string) {
return buffer.append(string.data(), string.size()); return buffer.append(string.data(), string.size());
} }

View File

@ -22,7 +22,7 @@ namespace llvm {
template <class Analysis, bool Simple> template <class Analysis, bool Simple>
class DOTGraphTraitsViewer : public FunctionPass { class DOTGraphTraitsViewer : public FunctionPass {
public: public:
DOTGraphTraitsViewer(llvm::StringRef GraphName, char &ID) DOTGraphTraitsViewer(StringRef GraphName, char &ID)
: FunctionPass(ID), Name(GraphName) {} : FunctionPass(ID), Name(GraphName) {}
virtual bool runOnFunction(Function &F) { virtual bool runOnFunction(Function &F) {
@ -47,7 +47,7 @@ private:
template <class Analysis, bool Simple> template <class Analysis, bool Simple>
class DOTGraphTraitsPrinter : public FunctionPass { class DOTGraphTraitsPrinter : public FunctionPass {
public: public:
DOTGraphTraitsPrinter(llvm::StringRef GraphName, char &ID) DOTGraphTraitsPrinter(StringRef GraphName, char &ID)
: FunctionPass(ID), Name(GraphName) {} : FunctionPass(ID), Name(GraphName) {}
virtual bool runOnFunction(Function &F) { virtual bool runOnFunction(Function &F) {
@ -82,7 +82,7 @@ private:
template <class Analysis, bool Simple> template <class Analysis, bool Simple>
class DOTGraphTraitsModuleViewer : public ModulePass { class DOTGraphTraitsModuleViewer : public ModulePass {
public: public:
DOTGraphTraitsModuleViewer(llvm::StringRef GraphName, char &ID) DOTGraphTraitsModuleViewer(StringRef GraphName, char &ID)
: ModulePass(ID), Name(GraphName) {} : ModulePass(ID), Name(GraphName) {}
virtual bool runOnModule(Module &M) { virtual bool runOnModule(Module &M) {
@ -106,7 +106,7 @@ private:
template <class Analysis, bool Simple> template <class Analysis, bool Simple>
class DOTGraphTraitsModulePrinter : public ModulePass { class DOTGraphTraitsModulePrinter : public ModulePass {
public: public:
DOTGraphTraitsModulePrinter(llvm::StringRef GraphName, char &ID) DOTGraphTraitsModulePrinter(StringRef GraphName, char &ID)
: ModulePass(ID), Name(GraphName) {} : ModulePass(ID), Name(GraphName) {}
virtual bool runOnModule(Module &M) { virtual bool runOnModule(Module &M) {

View File

@ -40,7 +40,7 @@ struct RelocToApply {
/// @brief Base class for object file relocation visitors. /// @brief Base class for object file relocation visitors.
class RelocVisitor { class RelocVisitor {
public: public:
explicit RelocVisitor(llvm::StringRef FileFormat) explicit RelocVisitor(StringRef FileFormat)
: FileFormat(FileFormat), HasError(false) {} : FileFormat(FileFormat), HasError(false) {}
// TODO: Should handle multiple applied relocations via either passing in the // TODO: Should handle multiple applied relocations via either passing in the
@ -83,7 +83,7 @@ public:
bool error() { return HasError; } bool error() { return HasError; }
private: private:
llvm::StringRef FileFormat; StringRef FileFormat;
bool HasError; bool HasError;
/// Operations /// Operations

View File

@ -195,7 +195,7 @@ public:
template <class T> template <class T>
struct has_ScalarTraits struct has_ScalarTraits
{ {
typedef llvm::StringRef (*Signature_input)(llvm::StringRef, void*, T&); typedef StringRef (*Signature_input)(StringRef, void*, T&);
typedef void (*Signature_output)(const T&, void*, llvm::raw_ostream&); typedef void (*Signature_output)(const T&, void*, llvm::raw_ostream&);
template <typename U> template <typename U>
@ -528,73 +528,73 @@ yamlize(IO &io, T &Seq, bool) {
template<> template<>
struct ScalarTraits<bool> { struct ScalarTraits<bool> {
static void output(const bool &, void*, llvm::raw_ostream &); static void output(const bool &, void*, llvm::raw_ostream &);
static llvm::StringRef input(llvm::StringRef , void*, bool &); static StringRef input(StringRef, void*, bool &);
}; };
template<> template<>
struct ScalarTraits<StringRef> { struct ScalarTraits<StringRef> {
static void output(const StringRef &, void*, llvm::raw_ostream &); static void output(const StringRef &, void*, llvm::raw_ostream &);
static llvm::StringRef input(llvm::StringRef , void*, StringRef &); static StringRef input(StringRef, void*, StringRef &);
}; };
template<> template<>
struct ScalarTraits<uint8_t> { struct ScalarTraits<uint8_t> {
static void output(const uint8_t &, void*, llvm::raw_ostream &); static void output(const uint8_t &, void*, llvm::raw_ostream &);
static llvm::StringRef input(llvm::StringRef , void*, uint8_t &); static StringRef input(StringRef, void*, uint8_t &);
}; };
template<> template<>
struct ScalarTraits<uint16_t> { struct ScalarTraits<uint16_t> {
static void output(const uint16_t &, void*, llvm::raw_ostream &); static void output(const uint16_t &, void*, llvm::raw_ostream &);
static llvm::StringRef input(llvm::StringRef , void*, uint16_t &); static StringRef input(StringRef, void*, uint16_t &);
}; };
template<> template<>
struct ScalarTraits<uint32_t> { struct ScalarTraits<uint32_t> {
static void output(const uint32_t &, void*, llvm::raw_ostream &); static void output(const uint32_t &, void*, llvm::raw_ostream &);
static llvm::StringRef input(llvm::StringRef , void*, uint32_t &); static StringRef input(StringRef, void*, uint32_t &);
}; };
template<> template<>
struct ScalarTraits<uint64_t> { struct ScalarTraits<uint64_t> {
static void output(const uint64_t &, void*, llvm::raw_ostream &); static void output(const uint64_t &, void*, llvm::raw_ostream &);
static llvm::StringRef input(llvm::StringRef , void*, uint64_t &); static StringRef input(StringRef, void*, uint64_t &);
}; };
template<> template<>
struct ScalarTraits<int8_t> { struct ScalarTraits<int8_t> {
static void output(const int8_t &, void*, llvm::raw_ostream &); static void output(const int8_t &, void*, llvm::raw_ostream &);
static llvm::StringRef input(llvm::StringRef , void*, int8_t &); static StringRef input(StringRef, void*, int8_t &);
}; };
template<> template<>
struct ScalarTraits<int16_t> { struct ScalarTraits<int16_t> {
static void output(const int16_t &, void*, llvm::raw_ostream &); static void output(const int16_t &, void*, llvm::raw_ostream &);
static llvm::StringRef input(llvm::StringRef , void*, int16_t &); static StringRef input(StringRef, void*, int16_t &);
}; };
template<> template<>
struct ScalarTraits<int32_t> { struct ScalarTraits<int32_t> {
static void output(const int32_t &, void*, llvm::raw_ostream &); static void output(const int32_t &, void*, llvm::raw_ostream &);
static llvm::StringRef input(llvm::StringRef , void*, int32_t &); static StringRef input(StringRef, void*, int32_t &);
}; };
template<> template<>
struct ScalarTraits<int64_t> { struct ScalarTraits<int64_t> {
static void output(const int64_t &, void*, llvm::raw_ostream &); static void output(const int64_t &, void*, llvm::raw_ostream &);
static llvm::StringRef input(llvm::StringRef , void*, int64_t &); static StringRef input(StringRef, void*, int64_t &);
}; };
template<> template<>
struct ScalarTraits<float> { struct ScalarTraits<float> {
static void output(const float &, void*, llvm::raw_ostream &); static void output(const float &, void*, llvm::raw_ostream &);
static llvm::StringRef input(llvm::StringRef , void*, float &); static StringRef input(StringRef, void*, float &);
}; };
template<> template<>
struct ScalarTraits<double> { struct ScalarTraits<double> {
static void output(const double &, void*, llvm::raw_ostream &); static void output(const double &, void*, llvm::raw_ostream &);
static llvm::StringRef input(llvm::StringRef , void*, double &); static StringRef input(StringRef, void*, double &);
}; };
@ -913,25 +913,25 @@ LLVM_YAML_STRONG_TYPEDEF(uint64_t, Hex64)
template<> template<>
struct ScalarTraits<Hex8> { struct ScalarTraits<Hex8> {
static void output(const Hex8 &, void*, llvm::raw_ostream &); static void output(const Hex8 &, void*, llvm::raw_ostream &);
static llvm::StringRef input(llvm::StringRef , void*, Hex8 &); static StringRef input(StringRef, void*, Hex8 &);
}; };
template<> template<>
struct ScalarTraits<Hex16> { struct ScalarTraits<Hex16> {
static void output(const Hex16 &, void*, llvm::raw_ostream &); static void output(const Hex16 &, void*, llvm::raw_ostream &);
static llvm::StringRef input(llvm::StringRef , void*, Hex16 &); static StringRef input(StringRef, void*, Hex16 &);
}; };
template<> template<>
struct ScalarTraits<Hex32> { struct ScalarTraits<Hex32> {
static void output(const Hex32 &, void*, llvm::raw_ostream &); static void output(const Hex32 &, void*, llvm::raw_ostream &);
static llvm::StringRef input(llvm::StringRef , void*, Hex32 &); static StringRef input(StringRef, void*, Hex32 &);
}; };
template<> template<>
struct ScalarTraits<Hex64> { struct ScalarTraits<Hex64> {
static void output(const Hex64 &, void*, llvm::raw_ostream &); static void output(const Hex64 &, void*, llvm::raw_ostream &);
static llvm::StringRef input(llvm::StringRef , void*, Hex64 &); static StringRef input(StringRef, void*, Hex64 &);
}; };

View File

@ -1510,7 +1510,7 @@ static Value *BuildSubAggregate(Value *From, Value* To, Type *IndexedType,
SmallVector<unsigned, 10> &Idxs, SmallVector<unsigned, 10> &Idxs,
unsigned IdxSkip, unsigned IdxSkip,
Instruction *InsertBefore) { Instruction *InsertBefore) {
llvm::StructType *STy = llvm::dyn_cast<llvm::StructType>(IndexedType); llvm::StructType *STy = dyn_cast<llvm::StructType>(IndexedType);
if (STy) { if (STy) {
// Save the original To argument so we can modify it // Save the original To argument so we can modify it
Value *OrigTo = To; Value *OrigTo = To;

View File

@ -865,7 +865,7 @@ void ELFObjectWriter::ComputeSymbolTable(MCAssembler &Asm,
// FIXME: Is this the correct place to do this? // FIXME: Is this the correct place to do this?
// FIXME: Why is an undefined reference to _GLOBAL_OFFSET_TABLE_ needed? // FIXME: Why is an undefined reference to _GLOBAL_OFFSET_TABLE_ needed?
if (NeedsGOT) { if (NeedsGOT) {
llvm::StringRef Name = "_GLOBAL_OFFSET_TABLE_"; StringRef Name = "_GLOBAL_OFFSET_TABLE_";
MCSymbol *Sym = Asm.getContext().GetOrCreateSymbol(Name); MCSymbol *Sym = Asm.getContext().GetOrCreateSymbol(Name);
MCSymbolData &Data = Asm.getOrCreateSymbolData(*Sym); MCSymbolData &Data = Asm.getOrCreateSymbolData(*Sym);
Data.setExternal(true); Data.setExternal(true);

View File

@ -36,7 +36,7 @@
using namespace llvm; using namespace llvm;
namespace { namespace {
typedef llvm::SmallString<COFF::NameSize> name; typedef SmallString<COFF::NameSize> name;
enum AuxiliaryType { enum AuxiliaryType {
ATFunctionDefinition, ATFunctionDefinition,
@ -58,7 +58,7 @@ class COFFSymbol {
public: public:
COFF::symbol Data; COFF::symbol Data;
typedef llvm::SmallVector<AuxSymbol, 1> AuxiliarySymbols; typedef SmallVector<AuxSymbol, 1> AuxiliarySymbols;
name Name; name Name;
int Index; int Index;
@ -69,7 +69,7 @@ public:
MCSymbolData const *MCData; MCSymbolData const *MCData;
COFFSymbol(llvm::StringRef name); COFFSymbol(StringRef name);
size_t size() const; size_t size() const;
void set_name_offset(uint32_t Offset); void set_name_offset(uint32_t Offset);
@ -97,13 +97,13 @@ public:
COFFSymbol *Symbol; COFFSymbol *Symbol;
relocations Relocations; relocations Relocations;
COFFSection(llvm::StringRef name); COFFSection(StringRef name);
static size_t size(); static size_t size();
}; };
// This class holds the COFF string table. // This class holds the COFF string table.
class StringTable { class StringTable {
typedef llvm::StringMap<size_t> map; typedef StringMap<size_t> map;
map Map; map Map;
void update_length(); void update_length();
@ -112,7 +112,7 @@ public:
StringTable(); StringTable();
size_t size() const; size_t size() const;
size_t insert(llvm::StringRef String); size_t insert(StringRef String);
}; };
class WinCOFFObjectWriter : public MCObjectWriter { class WinCOFFObjectWriter : public MCObjectWriter {
@ -144,7 +144,7 @@ public:
COFFSection *createSection(StringRef Name); COFFSection *createSection(StringRef Name);
template <typename object_t, typename list_t> template <typename object_t, typename list_t>
object_t *createCOFFEntity(llvm::StringRef Name, list_t &List); object_t *createCOFFEntity(StringRef Name, list_t &List);
void DefineSection(MCSectionData const &SectionData); void DefineSection(MCSectionData const &SectionData);
void DefineSymbol(MCSymbolData const &SymbolData, MCAssembler &Assembler); void DefineSymbol(MCSymbolData const &SymbolData, MCAssembler &Assembler);
@ -202,7 +202,7 @@ static inline void write_uint8_le(void *Data, uint8_t const &Value) {
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// Symbol class implementation // Symbol class implementation
COFFSymbol::COFFSymbol(llvm::StringRef name) COFFSymbol::COFFSymbol(StringRef name)
: Name(name.begin(), name.end()) : Name(name.begin(), name.end())
, Other(NULL) , Other(NULL)
, Section(NULL) , Section(NULL)
@ -254,7 +254,7 @@ bool COFFSymbol::should_keep() const {
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// Section class implementation // Section class implementation
COFFSection::COFFSection(llvm::StringRef name) COFFSection::COFFSection(StringRef name)
: Name(name) : Name(name)
, MCData(NULL) , MCData(NULL)
, Symbol(NULL) { , Symbol(NULL) {
@ -287,7 +287,7 @@ size_t StringTable::size() const {
/// Add String to the table iff it is not already there. /// Add String to the table iff it is not already there.
/// @returns the index into the string table where the string is now located. /// @returns the index into the string table where the string is now located.
size_t StringTable::insert(llvm::StringRef String) { size_t StringTable::insert(StringRef String) {
map::iterator i = Map.find(String); map::iterator i = Map.find(String);
if (i != Map.end()) if (i != Map.end())
@ -341,14 +341,14 @@ COFFSymbol *WinCOFFObjectWriter::GetOrCreateCOFFSymbol(const MCSymbol * Symbol){
return RetSymbol; return RetSymbol;
} }
COFFSection *WinCOFFObjectWriter::createSection(llvm::StringRef Name) { COFFSection *WinCOFFObjectWriter::createSection(StringRef Name) {
return createCOFFEntity<COFFSection>(Name, Sections); return createCOFFEntity<COFFSection>(Name, Sections);
} }
/// A template used to lookup or create a symbol/section, and initialize it if /// A template used to lookup or create a symbol/section, and initialize it if
/// needed. /// needed.
template <typename object_t, typename list_t> template <typename object_t, typename list_t>
object_t *WinCOFFObjectWriter::createCOFFEntity(llvm::StringRef Name, object_t *WinCOFFObjectWriter::createCOFFEntity(StringRef Name,
list_t &List) { list_t &List) {
object_t *Object = new object_t(Name); object_t *Object = new object_t(Name);

View File

@ -3448,7 +3448,7 @@ void APFloat::toString(SmallVectorImpl<char> &Str,
AdjustToPrecision(significand, exp, FormatPrecision); AdjustToPrecision(significand, exp, FormatPrecision);
llvm::SmallVector<char, 256> buffer; SmallVector<char, 256> buffer;
// Fill the buffer. // Fill the buffer.
unsigned precision = significand.getBitWidth(); unsigned precision = significand.getBitWidth();

View File

@ -46,7 +46,7 @@ void llvm::sys::DynamicLibrary::AddSymbol(StringRef symbolName,
void *symbolValue) { void *symbolValue) {
SmartScopedLock<true> lock(getMutex()); SmartScopedLock<true> lock(getMutex());
if (ExplicitSymbols == 0) if (ExplicitSymbols == 0)
ExplicitSymbols = new llvm::StringMap<void*>(); ExplicitSymbols = new StringMap<void*>();
(*ExplicitSymbols)[symbolName] = symbolValue; (*ExplicitSymbols)[symbolName] = symbolValue;
} }

View File

@ -44,7 +44,7 @@ public:
virtual ~AMDGPUSubtarget(); virtual ~AMDGPUSubtarget();
const InstrItineraryData &getInstrItineraryData() const { return InstrItins; } const InstrItineraryData &getInstrItineraryData() const { return InstrItins; }
virtual void ParseSubtargetFeatures(llvm::StringRef CPU, llvm::StringRef FS); virtual void ParseSubtargetFeatures(StringRef CPU, StringRef FS);
bool isOverride(AMDGPUDeviceInfo::Caps) const; bool isOverride(AMDGPUDeviceInfo::Caps) const;
bool is64bit() const; bool is64bit() const;

View File

@ -104,7 +104,7 @@ public:
static const unsigned int QuarterWavefrontSize = 16; static const unsigned int QuarterWavefrontSize = 16;
protected: protected:
virtual void setCaps(); virtual void setCaps();
llvm::BitVector mHWBits; BitVector mHWBits;
llvm::BitVector mSWBits; llvm::BitVector mSWBits;
AMDGPUSubtarget *mSTM; AMDGPUSubtarget *mSTM;
uint32_t DeviceFlag; uint32_t DeviceFlag;

View File

@ -613,7 +613,7 @@ AMDGPUPeepholeOpt::optimizeBitInsert(Instruction *inst) {
if (isVector) { name += "_v" + itostr(numEle) + "u32"; } else { name += "_u32"; } if (isVector) { name += "_v" + itostr(numEle) + "u32"; } else { name += "_u32"; }
Function *Func = Function *Func =
dyn_cast<Function>(inst->getParent()->getParent()->getParent()-> dyn_cast<Function>(inst->getParent()->getParent()->getParent()->
getOrInsertFunction(llvm::StringRef(name), funcType)); getOrInsertFunction(StringRef(name), funcType));
Value *Operands[4] = { Value *Operands[4] = {
width, width,
offset, offset,
@ -777,7 +777,7 @@ AMDGPUPeepholeOpt::optimizeBitExtract(Instruction *inst) {
// Lets create the function. // Lets create the function.
Function *Func = Function *Func =
dyn_cast<Function>(inst->getParent()->getParent()->getParent()-> dyn_cast<Function>(inst->getParent()->getParent()->getParent()->
getOrInsertFunction(llvm::StringRef(name), funcType)); getOrInsertFunction(StringRef(name), funcType));
Value *Operands[3] = { Value *Operands[3] = {
ShiftInst->getOperand(0), ShiftInst->getOperand(0),
shiftValConst, shiftValConst,
@ -967,7 +967,7 @@ AMDGPUPeepholeOpt::expandSigned24BitOps(CallInst *CI) {
} }
Function *Func = dyn_cast<Function>( Function *Func = dyn_cast<Function>(
CI->getParent()->getParent()->getParent()-> CI->getParent()->getParent()->getParent()->
getOrInsertFunction(llvm::StringRef(name), funcType)); getOrInsertFunction(StringRef(name), funcType));
Value *Operands[3] = { Value *Operands[3] = {
CI->getOperand(0), CI->getOperand(0),
CI->getOperand(1), CI->getOperand(1),
@ -999,7 +999,7 @@ AMDGPUPeepholeOpt::expandSigned24BitOps(CallInst *CI) {
} }
Function *Func = dyn_cast<Function>( Function *Func = dyn_cast<Function>(
CI->getParent()->getParent()->getParent()-> CI->getParent()->getParent()->getParent()->
getOrInsertFunction(llvm::StringRef(name), funcType)); getOrInsertFunction(StringRef(name), funcType));
Value *Operands[2] = { Value *Operands[2] = {
CI->getOperand(0), CI->getOperand(0),
CI->getOperand(1) CI->getOperand(1)

View File

@ -351,7 +351,7 @@ bool DAE::RemoveDeadArgumentsFromCallers(Function &Fn)
if (Fn.use_empty()) if (Fn.use_empty())
return false; return false;
llvm::SmallVector<unsigned, 8> UnusedArgs; SmallVector<unsigned, 8> UnusedArgs;
for (Function::arg_iterator I = Fn.arg_begin(), E = Fn.arg_end(); for (Function::arg_iterator I = Fn.arg_begin(), E = Fn.arg_end();
I != E; ++I) { I != E; ++I) {
Argument *Arg = I; Argument *Arg = I;