[lld] r263968 - Fix Clang-tidy modernize-deprecated-headers warnings; other minor fixes.

Eugene Zelenko via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 21 11:32:36 PDT 2016


Author: eugenezelenko
Date: Mon Mar 21 13:32:35 2016
New Revision: 263968

URL: http://llvm.org/viewvc/llvm-project?rev=263968&view=rev
Log:
Fix Clang-tidy modernize-deprecated-headers warnings; other minor fixes.

Differential revision: http://reviews.llvm.org/D18232

Modified:
    lld/trunk/unittests/MachOTests/MachONormalizedFileBinaryReaderTests.cpp
    lld/trunk/unittests/MachOTests/MachONormalizedFileToAtomsTests.cpp
    lld/trunk/unittests/MachOTests/MachONormalizedFileYAMLTests.cpp

Modified: lld/trunk/unittests/MachOTests/MachONormalizedFileBinaryReaderTests.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/unittests/MachOTests/MachONormalizedFileBinaryReaderTests.cpp?rev=263968&r1=263967&r2=263968&view=diff
==============================================================================
--- lld/trunk/unittests/MachOTests/MachONormalizedFileBinaryReaderTests.cpp (original)
+++ lld/trunk/unittests/MachOTests/MachONormalizedFileBinaryReaderTests.cpp Mon Mar 21 13:32:35 2016
@@ -10,8 +10,6 @@
 #include "gtest/gtest.h"
 #include "../../lib/ReaderWriter/MachO/MachONormalizedFile.h"
 #include "llvm/Support/MachO.h"
-#include <assert.h>
-#include <vector>
 
 using llvm::StringRef;
 using llvm::MemoryBuffer;
@@ -75,7 +73,6 @@ TEST(BinaryReaderTest, empty_obj_x86_64)
   EXPECT_TRUE(f->undefinedSymbols.empty());
 }
 
-
 TEST(BinaryReaderTest, empty_obj_x86) {
   FILEBYTES = {
       0xce, 0xfa, 0xed, 0xfe, 0x07, 0x00, 0x00, 0x00,
@@ -107,7 +104,6 @@ TEST(BinaryReaderTest, empty_obj_x86) {
   EXPECT_TRUE(f->undefinedSymbols.empty());
 }
 
-
 TEST(BinaryReaderTest, empty_obj_ppc) {
   FILEBYTES = {
       0xfe, 0xed, 0xfa, 0xce, 0x00, 0x00, 0x00, 0x12,
@@ -139,7 +135,6 @@ TEST(BinaryReaderTest, empty_obj_ppc) {
   EXPECT_TRUE(f->undefinedSymbols.empty());
 }
 
-
 TEST(BinaryReaderTest, empty_obj_armv7) {
   FILEBYTES = {
       0xce, 0xfa, 0xed, 0xfe, 0x0c, 0x00, 0x00, 0x00,
@@ -326,7 +321,6 @@ TEST(BinaryReaderTest, hello_obj_x86_64)
   EXPECT_EQ(printfLabel.scope, SymbolScope(N_EXT));
 }
 
-
 TEST(BinaryReaderTest, hello_obj_x86) {
   FILEBYTES = {
     0xCE, 0xFA, 0xED, 0xFE, 0x07, 0x00, 0x00, 0x00,
@@ -458,7 +452,6 @@ TEST(BinaryReaderTest, hello_obj_x86) {
   EXPECT_EQ(printfLabel.scope, SymbolScope(N_EXT));
 }
 
-
 TEST(BinaryReaderTest, hello_obj_armv7) {
   FILEBYTES = {
     0xCE, 0xFA, 0xED, 0xFE, 0x0C, 0x00, 0x00, 0x00,
@@ -600,7 +593,6 @@ TEST(BinaryReaderTest, hello_obj_armv7)
   EXPECT_EQ(printfLabel.scope, SymbolScope(N_EXT));
 }
 
-
 TEST(BinaryReaderTest, hello_obj_ppc) {
   FILEBYTES = {
     0xFE, 0xED, 0xFA, 0xCE, 0x00, 0x00, 0x00, 0x12,
@@ -744,5 +736,4 @@ TEST(BinaryReaderTest, hello_obj_ppc) {
   EXPECT_EQ(printfLabel.scope, SymbolScope(N_EXT));
 
   writeBinary(*f, "/tmp/foo.o");
-
 }

Modified: lld/trunk/unittests/MachOTests/MachONormalizedFileToAtomsTests.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/unittests/MachOTests/MachONormalizedFileToAtomsTests.cpp?rev=263968&r1=263967&r2=263968&view=diff
==============================================================================
--- lld/trunk/unittests/MachOTests/MachONormalizedFileToAtomsTests.cpp (original)
+++ lld/trunk/unittests/MachOTests/MachONormalizedFileToAtomsTests.cpp Mon Mar 21 13:32:35 2016
@@ -10,8 +10,6 @@
 #include "gtest/gtest.h"
 #include "../../lib/ReaderWriter/MachO/MachONormalizedFile.h"
 #include "llvm/Support/MachO.h"
-#include <assert.h>
-#include <vector>
 
 using llvm::ErrorOr;
 

Modified: lld/trunk/unittests/MachOTests/MachONormalizedFileYAMLTests.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/unittests/MachOTests/MachONormalizedFileYAMLTests.cpp?rev=263968&r1=263967&r2=263968&view=diff
==============================================================================
--- lld/trunk/unittests/MachOTests/MachONormalizedFileYAMLTests.cpp (original)
+++ lld/trunk/unittests/MachOTests/MachONormalizedFileYAMLTests.cpp Mon Mar 21 13:32:35 2016
@@ -10,8 +10,6 @@
 #include "gtest/gtest.h"
 #include "../../lib/ReaderWriter/MachO/MachONormalizedFile.h"
 #include "llvm/Support/MachO.h"
-#include <assert.h>
-#include <vector>
 
 using llvm::StringRef;
 using llvm::MemoryBuffer;
@@ -21,7 +19,6 @@ using lld::mach_o::normalized::Symbol;
 using lld::mach_o::normalized::Section;
 using lld::mach_o::normalized::Relocation;
 
-
 static std::unique_ptr<NormalizedFile> fromYAML(StringRef str) {
   std::unique_ptr<MemoryBuffer> mb(MemoryBuffer::getMemBuffer(str));
   ErrorOr<std::unique_ptr<NormalizedFile>> r
@@ -36,7 +33,6 @@ static void toYAML(const NormalizedFile
   EXPECT_TRUE(!ec);
 }
 
-
 // ppc is no longer supported, but it is here to test endianness handling.
 TEST(ObjectFileYAML, empty_ppc) {
   std::unique_ptr<NormalizedFile> f = fromYAML(
@@ -134,7 +130,6 @@ TEST(ObjectFileYAML, empty_armv7s) {
   EXPECT_TRUE(f->undefinedSymbols.empty());
 }
 
-
 TEST(ObjectFileYAML, roundTrip) {
   std::string intermediate;
   {
@@ -157,7 +152,6 @@ TEST(ObjectFileYAML, roundTrip) {
   }
 }
 
-
 TEST(ObjectFileYAML, oneSymbol) {
   std::unique_ptr<NormalizedFile> f = fromYAML(
     "---\n"
@@ -186,7 +180,6 @@ TEST(ObjectFileYAML, oneSymbol) {
   EXPECT_EQ((uint64_t)sym.value, 0x100ULL);
 }
 
-
 TEST(ObjectFileYAML, oneSection) {
   std::unique_ptr<NormalizedFile> f = fromYAML(
     "---\n"
@@ -220,7 +213,6 @@ TEST(ObjectFileYAML, oneSection) {
   EXPECT_EQ((int)(sect.content[1]), 0x90);
 }
 
-
 TEST(ObjectFileYAML, hello_x86_64) {
   std::unique_ptr<NormalizedFile> f = fromYAML(
     "---\n"
@@ -349,7 +341,6 @@ TEST(ObjectFileYAML, hello_x86_64) {
   EXPECT_EQ((uint64_t)sym3.value, 0x0ULL);
 }
 
-
 TEST(ObjectFileYAML, hello_x86) {
   std::unique_ptr<NormalizedFile> f = fromYAML(
     "---\n"
@@ -607,8 +598,6 @@ TEST(ObjectFileYAML, hello_armv6) {
   EXPECT_EQ((uint64_t)sym2.value, 0x0ULL);
 }
 
-
-
 TEST(ObjectFileYAML, hello_armv7) {
   std::unique_ptr<NormalizedFile> f = fromYAML(
     "---\n"




More information about the llvm-commits mailing list