[Object] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC).
llvm-svn: 301275
diff --git a/llvm/lib/Object/ELF.cpp b/llvm/lib/Object/ELF.cpp
index 23682e1..e89a4a3 100644
--- a/llvm/lib/Object/ELF.cpp
+++ b/llvm/lib/Object/ELF.cpp
@@ -1,4 +1,4 @@
-//===- ELF.cpp - ELF object file implementation -----------------*- C++ -*-===//
+//===- ELF.cpp - ELF object file implementation ---------------------------===//
//
// The LLVM Compiler Infrastructure
//
@@ -8,15 +8,17 @@
//===----------------------------------------------------------------------===//
#include "llvm/Object/ELF.h"
+#include "llvm/Support/ELF.h"
-namespace llvm {
-namespace object {
+using namespace llvm;
+using namespace object;
#define ELF_RELOC(name, value) \
case ELF::name: \
return #name; \
-StringRef getELFRelocationTypeName(uint32_t Machine, uint32_t Type) {
+StringRef llvm::object::getELFRelocationTypeName(uint32_t Machine,
+ uint32_t Type) {
switch (Machine) {
case ELF::EM_X86_64:
switch (Type) {
@@ -139,6 +141,3 @@
}
#undef ELF_RELOC
-
-} // end namespace object
-} // end namespace llvm