forked from OSchip/llvm-project
[sanitizer][NFC] Fix compilation error on Windows
And remove unnecessary const_cast in ubsan.
This commit is contained in:
parent
cbd7eabea8
commit
9adc907363
|
@ -605,6 +605,7 @@ class InternalScopedString {
|
|||
}
|
||||
void append(const char *format, ...);
|
||||
const char *data() const { return buffer_.data(); }
|
||||
char *data() { return buffer_.data(); }
|
||||
|
||||
private:
|
||||
InternalMmapVector<char> buffer_;
|
||||
|
|
|
@ -54,7 +54,7 @@ void __ubsan::__ubsan_get_current_report_data(const char **OutIssueKind,
|
|||
// lowercase letter.
|
||||
char FirstChar = *Buf.data();
|
||||
if (FirstChar >= 'a' && FirstChar <= 'z')
|
||||
*const_cast<char *>(Buf.data()) += 'A' - 'a';
|
||||
*Buf.data() += 'A' - 'a';
|
||||
|
||||
*OutIssueKind = CurrentUBR->IssueKind;
|
||||
*OutMessage = Buf.data();
|
||||
|
|
Loading…
Reference in New Issue