[WebAssembly] Remove `using` statements from header files. NFC.

Differential Revision: https://reviews.llvm.org/D54758

llvm-svn: 347621
This commit is contained in:
Sam Clegg 2018-11-27 01:08:16 +00:00
parent 41828e7e52
commit 45218f4af9
10 changed files with 39 additions and 45 deletions

View File

@ -44,6 +44,21 @@ namespace llvm {
class raw_ostream;
// TODO: DenseMap, ...
namespace object {
class WasmObjectFile;
struct WasmSection;
struct WasmSegment;
class WasmSymbol;
}
namespace wasm {
struct WasmFunction;
struct WasmGlobal;
struct WasmGlobalType;
struct WasmRelocation;
struct WasmSignature;
}
}
namespace lld {
@ -69,6 +84,16 @@ namespace lld {
using llvm::Expected;
using llvm::raw_ostream;
using llvm::object::WasmObjectFile;
using llvm::object::WasmSection;
using llvm::object::WasmSegment;
using llvm::object::WasmSymbol;
using llvm::wasm::WasmFunction;
using llvm::wasm::WasmGlobal;
using llvm::wasm::WasmGlobalType;
using llvm::wasm::WasmRelocation;
using llvm::wasm::WasmSignature;
} // end namespace lld.
namespace std {

View File

@ -31,6 +31,7 @@
#define DEBUG_TYPE "lld"
using namespace llvm;
using namespace llvm::object;
using namespace llvm::sys;
using namespace llvm::wasm;

View File

@ -24,18 +24,9 @@
#include "Config.h"
#include "InputFiles.h"
#include "lld/Common/ErrorHandler.h"
#include "lld/Common/LLVM.h"
#include "llvm/Object/Wasm.h"
using llvm::object::WasmSection;
using llvm::object::WasmSegment;
using llvm::wasm::WasmFunction;
using llvm::wasm::WasmRelocation;
using llvm::wasm::WasmSignature;
namespace llvm {
class raw_ostream;
}
namespace lld {
namespace wasm {

View File

@ -20,18 +20,6 @@
#include "llvm/Support/MemoryBuffer.h"
#include <vector>
using llvm::object::Archive;
using llvm::object::WasmObjectFile;
using llvm::object::WasmSection;
using llvm::object::WasmSymbol;
using llvm::wasm::WasmRelocation;
namespace llvm {
namespace lto {
class InputFile;
}
} // namespace llvm
namespace lld {
namespace wasm {
@ -81,12 +69,12 @@ public:
explicit ArchiveFile(MemoryBufferRef M) : InputFile(ArchiveKind, M) {}
static bool classof(const InputFile *F) { return F->kind() == ArchiveKind; }
void addMember(const Archive::Symbol *Sym);
void addMember(const llvm::object::Archive::Symbol *Sym);
void parse() override;
private:
std::unique_ptr<Archive> File;
std::unique_ptr<llvm::object::Archive> File;
llvm::DenseSet<uint64_t> Seen;
};

View File

@ -16,8 +16,6 @@
#include "lld/Common/ErrorHandler.h"
#include "llvm/Object/Wasm.h"
using llvm::wasm::WasmGlobal;
namespace lld {
namespace wasm {

View File

@ -13,11 +13,9 @@
#include "InputChunks.h"
#include "WriterUtils.h"
#include "lld/Common/ErrorHandler.h"
#include "lld/Common/LLVM.h"
#include "llvm/ADT/DenseMap.h"
using llvm::raw_ostream;
using llvm::raw_string_ostream;
namespace lld {
namespace wasm {
@ -82,7 +80,7 @@ public:
std::string Body;
protected:
raw_string_ostream BodyOutputStream;
llvm::raw_string_ostream BodyOutputStream;
};
class CodeSection : public OutputSection {

View File

@ -20,6 +20,7 @@
using namespace llvm;
using namespace llvm::wasm;
using namespace llvm::object;
using namespace lld;
using namespace lld::wasm;

View File

@ -13,12 +13,9 @@
#include "InputFiles.h"
#include "LTO.h"
#include "Symbols.h"
#include "lld/Common/LLVM.h"
#include "llvm/ADT/CachedHashString.h"
#include "llvm/ADT/DenseSet.h"
#include "llvm/Support/raw_ostream.h"
using llvm::wasm::WasmGlobalType;
using llvm::wasm::WasmSignature;
namespace lld {
namespace wasm {
@ -66,7 +63,7 @@ public:
Symbol *addUndefinedGlobal(StringRef Name, uint32_t Flags, InputFile *File,
const WasmGlobalType *Type);
void addLazy(ArchiveFile *F, const Archive::Symbol *Sym);
void addLazy(ArchiveFile *F, const llvm::object::Archive::Symbol *Sym);
bool addComdat(StringRef Name);

View File

@ -15,14 +15,11 @@
#include "llvm/Object/Archive.h"
#include "llvm/Object/Wasm.h"
using llvm::object::Archive;
using llvm::wasm::WasmGlobalType;
using llvm::wasm::WasmSignature;
using llvm::wasm::WasmSymbolType;
namespace lld {
namespace wasm {
using llvm::wasm::WasmSymbolType;
class InputFile;
class InputChunk;
class InputSegment;
@ -272,14 +269,15 @@ public:
class LazySymbol : public Symbol {
public:
LazySymbol(StringRef Name, InputFile *File, const Archive::Symbol &Sym)
LazySymbol(StringRef Name, InputFile *File,
const llvm::object::Archive::Symbol &Sym)
: Symbol(Name, LazyKind, 0, File), ArchiveSymbol(Sym) {}
static bool classof(const Symbol *S) { return S->kind() == LazyKind; }
void fetch();
private:
Archive::Symbol ArchiveSymbol;
llvm::object::Archive::Symbol ArchiveSymbol;
};
// linker-generated symbols

View File

@ -13,9 +13,6 @@
#include "lld/Common/LLVM.h"
#include "llvm/ADT/Twine.h"
#include "llvm/Object/Wasm.h"
#include "llvm/Support/raw_ostream.h"
using llvm::raw_ostream;
namespace lld {
namespace wasm {