aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/DebugInfo
diff options
context:
space:
mode:
authorStephen Hines <srhines@google.com>2014-05-29 02:49:00 -0700
committerStephen Hines <srhines@google.com>2014-05-29 02:49:00 -0700
commitdce4a407a24b04eebc6a376f8e62b41aaa7b071f (patch)
treedcebc53f2b182f145a2e659393bf9a0472cedf23 /include/llvm/DebugInfo
parent220b921aed042f9e520c26cffd8282a94c66c3d5 (diff)
downloadexternal_llvm-dce4a407a24b04eebc6a376f8e62b41aaa7b071f.zip
external_llvm-dce4a407a24b04eebc6a376f8e62b41aaa7b071f.tar.gz
external_llvm-dce4a407a24b04eebc6a376f8e62b41aaa7b071f.tar.bz2
Update LLVM for 3.5 rebase (r209712).
Change-Id: I149556c940fb7dc92d075273c87ff584f400941f
Diffstat (limited to 'include/llvm/DebugInfo')
-rw-r--r--include/llvm/DebugInfo/DIContext.h50
-rw-r--r--include/llvm/DebugInfo/DWARFFormValue.h4
2 files changed, 20 insertions, 34 deletions
diff --git a/include/llvm/DebugInfo/DIContext.h b/include/llvm/DebugInfo/DIContext.h
index 69a4f8d..c1aba01 100644
--- a/include/llvm/DebugInfo/DIContext.h
+++ b/include/llvm/DebugInfo/DIContext.h
@@ -16,42 +16,31 @@
#define LLVM_DEBUGINFO_DICONTEXT_H
#include "llvm/ADT/DenseMap.h"
-#include "llvm/ADT/SmallString.h"
#include "llvm/ADT/SmallVector.h"
-#include "llvm/ADT/StringRef.h"
#include "llvm/Object/ObjectFile.h"
#include "llvm/Object/RelocVisitor.h"
#include "llvm/Support/Casting.h"
#include "llvm/Support/DataTypes.h"
+#include <string>
+
namespace llvm {
class raw_ostream;
/// DILineInfo - a format-neutral container for source line information.
-class DILineInfo {
- SmallString<16> FileName;
- SmallString<16> FunctionName;
+struct DILineInfo {
+ std::string FileName;
+ std::string FunctionName;
uint32_t Line;
uint32_t Column;
-public:
+
DILineInfo()
- : FileName("<invalid>"), FunctionName("<invalid>"),
- Line(0), Column(0) {}
- DILineInfo(StringRef fileName, StringRef functionName, uint32_t line,
- uint32_t column)
- : FileName(fileName), FunctionName(functionName), Line(line),
- Column(column) {}
-
- const char *getFileName() { return FileName.c_str(); }
- const char *getFunctionName() { return FunctionName.c_str(); }
- uint32_t getLine() const { return Line; }
- uint32_t getColumn() const { return Column; }
+ : FileName("<invalid>"), FunctionName("<invalid>"), Line(0), Column(0) {}
bool operator==(const DILineInfo &RHS) const {
return Line == RHS.Line && Column == RHS.Column &&
- FileName.equals(RHS.FileName) &&
- FunctionName.equals(RHS.FunctionName);
+ FileName == RHS.FileName && FunctionName == RHS.FunctionName;
}
bool operator!=(const DILineInfo &RHS) const {
return !(*this == RHS);
@@ -79,19 +68,16 @@ class DIInliningInfo {
/// DILineInfoSpecifier - controls which fields of DILineInfo container
/// should be filled with data.
-class DILineInfoSpecifier {
- const uint32_t Flags; // Or'ed flags that set the info we want to fetch.
-public:
- enum Specification {
- FileLineInfo = 1 << 0,
- AbsoluteFilePath = 1 << 1,
- FunctionName = 1 << 2
- };
- // Use file/line info by default.
- DILineInfoSpecifier(uint32_t flags = FileLineInfo) : Flags(flags) {}
- bool needs(Specification spec) const {
- return (Flags & spec) > 0;
- }
+struct DILineInfoSpecifier {
+ enum class FileLineInfoKind { None, Default, AbsoluteFilePath };
+ enum class FunctionNameKind { None, ShortName, LinkageName };
+
+ FileLineInfoKind FLIKind;
+ FunctionNameKind FNKind;
+
+ DILineInfoSpecifier(FileLineInfoKind FLIKind = FileLineInfoKind::Default,
+ FunctionNameKind FNKind = FunctionNameKind::None)
+ : FLIKind(FLIKind), FNKind(FNKind) {}
};
/// Selects which debug sections get dumped.
diff --git a/include/llvm/DebugInfo/DWARFFormValue.h b/include/llvm/DebugInfo/DWARFFormValue.h
index 533d259..d517a72 100644
--- a/include/llvm/DebugInfo/DWARFFormValue.h
+++ b/include/llvm/DebugInfo/DWARFFormValue.h
@@ -36,7 +36,7 @@ public:
private:
struct ValueType {
- ValueType() : data(NULL) {
+ ValueType() : data(nullptr) {
uval = 0;
}
@@ -60,7 +60,7 @@ public:
bool extractValue(DataExtractor data, uint32_t *offset_ptr,
const DWARFUnit *u);
bool isInlinedCStr() const {
- return Value.data != NULL && Value.data == (const uint8_t*)Value.cstr;
+ return Value.data != nullptr && Value.data == (const uint8_t*)Value.cstr;
}
/// getAsFoo functions below return the extracted value as Foo if only