summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDavid Majnemer <david.majnemer@gmail.com>2016-06-24 19:34:41 +0000
committerDavid Majnemer <david.majnemer@gmail.com>2016-06-24 19:34:41 +0000
commit82c356cae4ef196a06489f7081119052530b511e (patch)
treede807eaa2310f5107265b51c5b2be14b47501837 /include
parent28ea97622f2dc36fdca95951bbe34b9484c139a1 (diff)
[CodeView] Healthy paranoia around strings
Make sure strings don't get too big for a record, truncate them if need-be. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273710 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/DebugInfo/CodeView/ListRecordBuilder.h2
-rw-r--r--include/llvm/DebugInfo/CodeView/TypeRecordBuilder.h1
2 files changed, 1 insertions, 2 deletions
diff --git a/include/llvm/DebugInfo/CodeView/ListRecordBuilder.h b/include/llvm/DebugInfo/CodeView/ListRecordBuilder.h
index cc53b53fe50..00bf03d417a 100644
--- a/include/llvm/DebugInfo/CodeView/ListRecordBuilder.h
+++ b/include/llvm/DebugInfo/CodeView/ListRecordBuilder.h
@@ -50,7 +50,7 @@ private:
return ContinuationOffsets.empty() ? 0 : ContinuationOffsets.back();
}
size_t getLastContinuationEnd() const { return Builder.size(); }
- unsigned getLastContinuationSize() const {
+ size_t getLastContinuationSize() const {
return getLastContinuationEnd() - getLastContinuationStart();
}
diff --git a/include/llvm/DebugInfo/CodeView/TypeRecordBuilder.h b/include/llvm/DebugInfo/CodeView/TypeRecordBuilder.h
index 010d06e5e31..eb7993baab8 100644
--- a/include/llvm/DebugInfo/CodeView/TypeRecordBuilder.h
+++ b/include/llvm/DebugInfo/CodeView/TypeRecordBuilder.h
@@ -40,7 +40,6 @@ public:
void writeEncodedInteger(int64_t Value);
void writeEncodedSignedInteger(int64_t Value);
void writeEncodedUnsignedInteger(uint64_t Value);
- void writeNullTerminatedString(const char *Value);
void writeNullTerminatedString(StringRef Value);
void writeGuid(StringRef Guid);
void writeBytes(StringRef Value) { Stream << Value; }