Remove redundant 'llvm::' qualifications

llvm-svn: 172358
This commit is contained in:
Dmitri Gribenko 2013-01-13 16:01:15 +00:00
parent cf73a60f87
commit 1584888148
13 changed files with 47 additions and 47 deletions

View File

@ -535,7 +535,7 @@ namespace llvm {
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());
}

View File

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

View File

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

View File

@ -195,7 +195,7 @@ public:
template <class T>
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&);
template <typename U>
@ -528,73 +528,73 @@ yamlize(IO &io, T &Seq, bool) {
template<>
struct ScalarTraits<bool> {
static void output(const bool &, void*, llvm::raw_ostream &);
static llvm::StringRef input(llvm::StringRef , void*, bool &);
static StringRef input(StringRef, void*, bool &);
};
template<>
struct ScalarTraits<StringRef> {
static void output(const StringRef &, void*, llvm::raw_ostream &);
static llvm::StringRef input(llvm::StringRef , void*, StringRef &);
static StringRef input(StringRef, void*, StringRef &);
};
template<>
struct ScalarTraits<uint8_t> {
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<>
struct ScalarTraits<uint16_t> {
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<>
struct ScalarTraits<uint32_t> {
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<>
struct ScalarTraits<uint64_t> {
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<>
struct ScalarTraits<int8_t> {
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<>
struct ScalarTraits<int16_t> {
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<>
struct ScalarTraits<int32_t> {
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<>
struct ScalarTraits<int64_t> {
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<>
struct ScalarTraits<float> {
static void output(const float &, void*, llvm::raw_ostream &);
static llvm::StringRef input(llvm::StringRef , void*, float &);
static StringRef input(StringRef, void*, float &);
};
template<>
struct ScalarTraits<double> {
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<>
struct ScalarTraits<Hex8> {
static void output(const Hex8 &, void*, llvm::raw_ostream &);
static llvm::StringRef input(llvm::StringRef , void*, Hex8 &);
static StringRef input(StringRef, void*, Hex8 &);
};
template<>
struct ScalarTraits<Hex16> {
static void output(const Hex16 &, void*, llvm::raw_ostream &);
static llvm::StringRef input(llvm::StringRef , void*, Hex16 &);
static StringRef input(StringRef, void*, Hex16 &);
};
template<>
struct ScalarTraits<Hex32> {
static void output(const Hex32 &, void*, llvm::raw_ostream &);
static llvm::StringRef input(llvm::StringRef , void*, Hex32 &);
static StringRef input(StringRef, void*, Hex32 &);
};
template<>
struct ScalarTraits<Hex64> {
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,
unsigned IdxSkip,
Instruction *InsertBefore) {
llvm::StructType *STy = llvm::dyn_cast<llvm::StructType>(IndexedType);
llvm::StructType *STy = dyn_cast<llvm::StructType>(IndexedType);
if (STy) {
// Save the original To argument so we can modify it
Value *OrigTo = To;

View File

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

View File

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

View File

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

View File

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

View File

@ -44,7 +44,7 @@ public:
virtual ~AMDGPUSubtarget();
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 is64bit() const;

View File

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

View File

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

View File

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