summaryrefslogtreecommitdiffstats
path: root/llvm/unittests/DebugInfo/DWARF/DWARFDebugInfoTest.cpp
diff options
context:
space:
mode:
authorEugene Zelenko <eugene.zelenko@gmail.com>2017-02-09 01:09:54 +0000
committerEugene Zelenko <eugene.zelenko@gmail.com>2017-02-09 01:09:54 +0000
commit44d951226ed135bc4273a74444f94edf24f603e5 (patch)
tree1ae623f1756af7b5f941611a0e8dcc826032f742 /llvm/unittests/DebugInfo/DWARF/DWARFDebugInfoTest.cpp
parent60fc1dd532e06b5b0c37caff308d33daed1b58e5 (diff)
downloadbcm5719-llvm-44d951226ed135bc4273a74444f94edf24f603e5.tar.gz
bcm5719-llvm-44d951226ed135bc4273a74444f94edf24f603e5.zip
[MC] Fix some Clang-tidy modernize and Include What You Use warnings in SubtargetFeature; other minor fixes (NFC).
Same changes in files affected by reduced SubtargetFeature.h dependencies. llvm-svn: 294548
Diffstat (limited to 'llvm/unittests/DebugInfo/DWARF/DWARFDebugInfoTest.cpp')
-rw-r--r--llvm/unittests/DebugInfo/DWARF/DWARFDebugInfoTest.cpp24
1 files changed, 14 insertions, 10 deletions
diff --git a/llvm/unittests/DebugInfo/DWARF/DWARFDebugInfoTest.cpp b/llvm/unittests/DebugInfo/DWARF/DWARFDebugInfoTest.cpp
index 1adc0aafdc2..dafa77bff16 100644
--- a/llvm/unittests/DebugInfo/DWARF/DWARFDebugInfoTest.cpp
+++ b/llvm/unittests/DebugInfo/DWARF/DWARFDebugInfoTest.cpp
@@ -8,18 +8,27 @@
//===----------------------------------------------------------------------===//
#include "DwarfGenerator.h"
-#include "llvm/DebugInfo/DWARF/DWARFAbbreviationDeclaration.h"
+#include "llvm/ADT/ArrayRef.h"
+#include "llvm/ADT/Optional.h"
+#include "llvm/ADT/StringRef.h"
+#include "llvm/ADT/Triple.h"
+#include "llvm/Config/llvm-config.h"
+#include "llvm/DebugInfo/DWARF/DWARFCompileUnit.h"
#include "llvm/DebugInfo/DWARF/DWARFContext.h"
#include "llvm/DebugInfo/DWARF/DWARFDie.h"
#include "llvm/DebugInfo/DWARF/DWARFFormValue.h"
-#include "llvm/DebugInfo/DWARF/DWARFUnit.h"
+#include "llvm/Object/ObjectFile.h"
#include "llvm/ObjectYAML/DWARFYAML.h"
#include "llvm/ObjectYAML/DWARFEmitter.h"
#include "llvm/Support/Dwarf.h"
-#include "llvm/Support/Host.h"
+#include "llvm/Support/Error.h"
+#include "llvm/Support/MemoryBuffer.h"
#include "llvm/Support/TargetSelect.h"
#include "gtest/gtest.h"
#include <climits>
+#include <cstdint>
+#include <cstring>
+#include <string>
using namespace llvm;
using namespace dwarf;
@@ -54,7 +63,7 @@ Triple getHostTripleForAddrSize(uint8_t AddrSize) {
template <typename T>
static bool HandleExpectedError(T &Expected) {
std::string ErrorMsg;
- handleAllErrors(Expected.takeError(), [&](const llvm::ErrorInfoBase &EI) {
+ handleAllErrors(Expected.takeError(), [&](const ErrorInfoBase &EI) {
ErrorMsg = EI.message();
});
if (!ErrorMsg.empty()) {
@@ -853,8 +862,7 @@ template <uint16_t Version, class AddrType> void TestAddresses() {
OptU64 = SubprogramDieNoPC.getHighPC(ActualLowPC);
EXPECT_FALSE((bool)OptU64);
EXPECT_FALSE(SubprogramDieNoPC.getLowAndHighPC(LowPC, HighPC));
-
-
+
// Verify the that our subprogram with only a low PC value succeeds when
// we ask for the Low PC, but fails appropriately when asked for the high PC
// or both low and high PC values.
@@ -872,7 +880,6 @@ template <uint16_t Version, class AddrType> void TestAddresses() {
EXPECT_FALSE((bool)OptU64);
EXPECT_FALSE(SubprogramDieLowPC.getLowAndHighPC(LowPC, HighPC));
-
// Verify the that our subprogram with only a low PC value succeeds when
// we ask for the Low PC, but fails appropriately when asked for the high PC
// or both low and high PC values.
@@ -1075,7 +1082,6 @@ TEST(DWARFDebugInfo, TestRelations) {
}
TEST(DWARFDebugInfo, TestDWARFDie) {
-
// Make sure a default constructed DWARFDie doesn't have any parent, sibling
// or child;
DWARFDie DefaultDie;
@@ -1365,7 +1371,6 @@ TEST(DWARFDebugInfo, TestDwarfToFunctions) {
EXPECT_EQ(InvalidU64, toSectionOffset(FormValOpt, InvalidU64));
EXPECT_EQ(InvalidS64, toSigned(FormValOpt, InvalidS64));
-
// Test successful and unsuccessful address decoding.
uint64_t Address = 0x100000000ULL;
FormVal.setForm(DW_FORM_addr);
@@ -1536,7 +1541,6 @@ TEST(DWARFDebugInfo, TestFindAttrs) {
auto NameOpt = FuncDie.findRecursively(Attrs);
EXPECT_TRUE(NameOpt.hasValue());
EXPECT_EQ(DieMangled, toString(NameOpt, ""));
-
}
} // end anonymous namespace
OpenPOWER on IntegriCloud