summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorZachary Turner <zturner@google.com>2016-05-17 23:50:21 +0000
committerZachary Turner <zturner@google.com>2016-05-17 23:50:21 +0000
commit63a2846e84794b1bd381d5a7d2970e1f0595b6f6 (patch)
treee744577a5840aefa01213100ff87f1e638a895b8 /llvm/lib/CodeGen
parentbc619cde52348dcaa9ad5d19a1ca1ff68a60e529 (diff)
downloadbcm5719-llvm-63a2846e84794b1bd381d5a7d2970e1f0595b6f6.tar.gz
bcm5719-llvm-63a2846e84794b1bd381d5a7d2970e1f0595b6f6.zip
[codeview] Some cleanup of Symbol Records.
* Reworks the CVSymbolTypes.def to work similarly to TypeRecords.def. * Moves some enums from SymbolRecords.h to CodeView.h to maintain consistency with how we do type records. * Generalize a few simple things like the record prefix * Define the leaf enum and the kind enum similar to how we do with tyep records. Differential Revision: http://reviews.llvm.org/D20342 Reviewed By: amccarth, rnk llvm-svn: 269867
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp
index 5f1e6714ba7..b5c796a01bd 100644
--- a/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp
@@ -379,7 +379,7 @@ void CodeViewDebug::emitInlinedCallSite(const FunctionInfo &FI,
OS.emitAbsoluteSymbolDiff(InlineEnd, InlineBegin, 2); // RecordLength
OS.EmitLabel(InlineBegin);
OS.AddComment("Record kind: S_INLINESITE");
- OS.EmitIntValue(SymbolRecordKind::S_INLINESITE, 2); // RecordKind
+ OS.EmitIntValue(SymbolKind::S_INLINESITE, 2); // RecordKind
OS.AddComment("PtrParent");
OS.EmitIntValue(0, 4);
@@ -413,7 +413,7 @@ void CodeViewDebug::emitInlinedCallSite(const FunctionInfo &FI,
OS.AddComment("Record length");
OS.EmitIntValue(2, 2); // RecordLength
OS.AddComment("Record kind: S_INLINESITE_END");
- OS.EmitIntValue(SymbolRecordKind::S_INLINESITE_END, 2); // RecordKind
+ OS.EmitIntValue(SymbolKind::S_INLINESITE_END, 2); // RecordKind
}
void CodeViewDebug::emitDebugInfoForFunction(const Function *GV,
@@ -447,7 +447,7 @@ void CodeViewDebug::emitDebugInfoForFunction(const Function *GV,
OS.EmitLabel(ProcRecordBegin);
OS.AddComment("Record kind: S_GPROC32_ID");
- OS.EmitIntValue(unsigned(SymbolRecordKind::S_GPROC32_ID), 2);
+ OS.EmitIntValue(unsigned(SymbolKind::S_GPROC32_ID), 2);
// These fields are filled in by tools like CVPACK which run after the fact.
OS.AddComment("PtrParent");
@@ -495,7 +495,7 @@ void CodeViewDebug::emitDebugInfoForFunction(const Function *GV,
OS.AddComment("Record length");
OS.EmitIntValue(0x0002, 2);
OS.AddComment("Record kind: S_PROC_ID_END");
- OS.EmitIntValue(unsigned(SymbolRecordKind::S_PROC_ID_END), 2);
+ OS.EmitIntValue(unsigned(SymbolKind::S_PROC_ID_END), 2);
}
OS.EmitLabel(SymbolsEnd);
// Every subsection must be aligned to a 4-byte boundary.
@@ -707,18 +707,18 @@ void CodeViewDebug::emitLocalVariable(const LocalVariable &Var) {
OS.EmitLabel(LocalBegin);
OS.AddComment("Record kind: S_LOCAL");
- OS.EmitIntValue(unsigned(SymbolRecordKind::S_LOCAL), 2);
+ OS.EmitIntValue(unsigned(SymbolKind::S_LOCAL), 2);
- uint16_t Flags = 0;
+ LocalSymFlags Flags = LocalSymFlags::None;
if (Var.DIVar->isParameter())
- Flags |= LocalSym::IsParameter;
+ Flags |= LocalSymFlags::IsParameter;
if (Var.DefRanges.empty())
- Flags |= LocalSym::IsOptimizedOut;
+ Flags |= LocalSymFlags::IsOptimizedOut;
OS.AddComment("TypeIndex");
OS.EmitIntValue(TypeIndex::Int32().getIndex(), 4);
OS.AddComment("Flags");
- OS.EmitIntValue(Flags, 2);
+ OS.EmitIntValue(static_cast<uint16_t>(Flags), 2);
// Truncate the name so we won't overflow the record length field.
emitNullTerminatedSymbolName(OS, Var.DIVar->getName());
OS.EmitLabel(LocalEnd);
OpenPOWER on IntegriCloud