Remove llvm::MemoryBuffer const_casts
authorPavel Labath <labath@google.com>
Wed, 20 Dec 2017 11:34:38 +0000 (11:34 +0000)
committerPavel Labath <labath@google.com>
Wed, 20 Dec 2017 11:34:38 +0000 (11:34 +0000)
commitbf8519b5c9aa2c381b5f4725c21601a99b1b37c2
treefdea5969874603e91207d7bb062d870afb4ed6b1
parent3cfdaa30e28ddd35290fe319a2d2f903977d4233
Remove llvm::MemoryBuffer const_casts

Summary:
llvm has grown a WritableMemoryBuffer class, which is convertible
(inherits from) a MemoryBuffer. We can use it to avoid conts_casting the
buffer contents when we want to write to it.

Reviewers: dblaikie, rsmith

Subscribers: cfe-commits

Differential Revision: https://reviews.llvm.org/D41387

llvm-svn: 321167
clang/lib/Basic/SourceManager.cpp
clang/lib/Lex/Preprocessor.cpp