From 78ad123c7882f205e51fe0d97a4542eb35f5e29d Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Wed, 14 Jan 2004 18:41:38 +0000 Subject: [PATCH] Be const correct llvm-svn: 10856 --- lib/Bytecode/Writer/WriterPrimitives.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/Bytecode/Writer/WriterPrimitives.h b/lib/Bytecode/Writer/WriterPrimitives.h index b782c1829b5..185fac1d036 100644 --- a/lib/Bytecode/Writer/WriterPrimitives.h +++ b/lib/Bytecode/Writer/WriterPrimitives.h @@ -122,13 +122,13 @@ static inline void output(const std::string &s, std::deque &Out, align32(Out); // Make sure we are now aligned... } -static inline void output_data(void *Ptr, void *End, +static inline void output_data(const void *Ptr, const void *End, std::deque &Out, bool Align = false) { #ifdef ENDIAN_LITTLE - Out.insert(Out.end(), (unsigned char*)Ptr, (unsigned char*)End); + Out.insert(Out.end(), (const unsigned char*)Ptr, (const unsigned char*)End); #else - unsigned char *E = (unsigned char *)End; + const unsigned char *E = (const unsigned char *)End; while (Ptr != E) Out.push_back(*--E); #endif