summaryrefslogtreecommitdiffstats
path: root/llvm/lib/DebugInfo/CodeView
diff options
context:
space:
mode:
authorReid Kleckner <rnk@google.com>2016-06-24 17:23:49 +0000
committerReid Kleckner <rnk@google.com>2016-06-24 17:23:49 +0000
commit33848faa5ec44821f982b91eebea183052b8d30c (patch)
treeebe360ffa0333717069c7248289231174a8e1f38 /llvm/lib/DebugInfo/CodeView
parente2185fda8fe194f41c168dc8a924ce258601da8c (diff)
downloadbcm5719-llvm-33848faa5ec44821f982b91eebea183052b8d30c.tar.gz
bcm5719-llvm-33848faa5ec44821f982b91eebea183052b8d30c.zip
[codeview] Use one byte for S_FRAMECOOKIE CookieKind and add flags byte
We bailed out while printing codeview for an MSVC compiled SemaExprCXX.cpp that used this record. The MS reference headers look incorrect here, which is probably why we had this bug. They use a 32-bit enum as the field type, but the actual record appears to use one byte for the cookie kind followed by a flags byte. llvm-svn: 273691
Diffstat (limited to 'llvm/lib/DebugInfo/CodeView')
-rw-r--r--llvm/lib/DebugInfo/CodeView/EnumTables.cpp4
-rw-r--r--llvm/lib/DebugInfo/CodeView/SymbolDumper.cpp1
2 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/DebugInfo/CodeView/EnumTables.cpp b/llvm/lib/DebugInfo/CodeView/EnumTables.cpp
index d71fec61344..d59271b2367 100644
--- a/llvm/lib/DebugInfo/CodeView/EnumTables.cpp
+++ b/llvm/lib/DebugInfo/CodeView/EnumTables.cpp
@@ -101,7 +101,7 @@ static const EnumEntry<uint16_t> LocalFlags[] = {
CV_ENUM_CLASS_ENT(LocalSymFlags, IsEnregisteredStatic),
};
-static const EnumEntry<uint32_t> FrameCookieKinds[] = {
+static const EnumEntry<uint8_t> FrameCookieKinds[] = {
CV_ENUM_CLASS_ENT(FrameCookieKind, Copy),
CV_ENUM_CLASS_ENT(FrameCookieKind, XorStackPointer),
CV_ENUM_CLASS_ENT(FrameCookieKind, XorFramePointer),
@@ -334,7 +334,7 @@ ArrayRef<EnumEntry<uint8_t>> getProcSymFlagNames() {
ArrayRef<EnumEntry<uint16_t>> getLocalFlagNames() {
return makeArrayRef(LocalFlags);
}
-ArrayRef<EnumEntry<uint32_t>> getFrameCookieKindNames() {
+ArrayRef<EnumEntry<uint8_t>> getFrameCookieKindNames() {
return makeArrayRef(FrameCookieKinds);
}
ArrayRef<EnumEntry<SourceLanguage>> getSourceLanguageNames() {
diff --git a/llvm/lib/DebugInfo/CodeView/SymbolDumper.cpp b/llvm/lib/DebugInfo/CodeView/SymbolDumper.cpp
index c2881546c0c..133f9fac19f 100644
--- a/llvm/lib/DebugInfo/CodeView/SymbolDumper.cpp
+++ b/llvm/lib/DebugInfo/CodeView/SymbolDumper.cpp
@@ -396,6 +396,7 @@ void CVSymbolDumperImpl::visitFrameCookieSym(SymbolKind Kind,
W.printHex("Register", FrameCookie.Header.Register);
W.printEnum("CookieKind", uint16_t(FrameCookie.Header.CookieKind),
getFrameCookieKindNames());
+ W.printHex("Flags", FrameCookie.Header.Flags);
}
void CVSymbolDumperImpl::visitFrameProcSym(SymbolKind Kind,
OpenPOWER on IntegriCloud