Update mclinker for LLVM rebase to r222494.
This corresponds to the following upstream mclinker change:
commit b2f1691276052c4215abf36715d43248d6337cf8
Author: Diana Chen <[email protected]>
Date: Tue Nov 25 14:03:29 2014 +0800
option: Allow `-hash-style' can be specified zero or more times
Change-Id: I332546680bb45cf9692adfa2c2d3dcdc84361afc
diff --git a/include/mcld/Support/FileOutputBuffer.h b/include/mcld/Support/FileOutputBuffer.h
index 6b48e14..afe670f 100644
--- a/include/mcld/Support/FileOutputBuffer.h
+++ b/include/mcld/Support/FileOutputBuffer.h
@@ -6,13 +6,15 @@
// license. see license.txt for details.
//
//===----------------------------------------------------------------------===//
-#ifndef MCLD_SUPPORT_FILEOUTPUTBUFFER_H
-#define MCLD_SUPPORT_FILEOUTPUTBUFFER_H
+#ifndef MCLD_SUPPORT_FILEOUTPUTBUFFER_H_
+#define MCLD_SUPPORT_FILEOUTPUTBUFFER_H_
-#include <mcld/Support/MemoryRegion.h>
+#include "mcld/Support/MemoryRegion.h"
+
#include <llvm/ADT/StringRef.h>
#include <llvm/Support/DataTypes.h>
#include <llvm/Support/FileSystem.h>
+
#include <system_error>
namespace mcld {
@@ -22,7 +24,7 @@
/// FileOutputBuffer - This interface is borrowed from llvm bassically, and we
/// may use ostream to emit output later.
class FileOutputBuffer {
-public:
+ public:
/// Factory method to create an OutputBuffer object which manages a read/write
/// buffer of the specified size. When committed, the buffer will be written
/// to the file at the specified path.
@@ -32,18 +34,16 @@
/// Returns a pointer to the start of the buffer.
uint8_t* getBufferStart() {
- return (uint8_t*)m_pRegion->data();
+ return reinterpret_cast<uint8_t*>(m_pRegion->data());
}
/// Returns a pointer to the end of the buffer.
uint8_t* getBufferEnd() {
- return (uint8_t*)m_pRegion->data() + m_pRegion->size();
+ return reinterpret_cast<uint8_t*>(m_pRegion->data()) + m_pRegion->size();
}
/// Returns size of the buffer.
- size_t getBufferSize() const {
- return m_pRegion->size();
- }
+ size_t getBufferSize() const { return m_pRegion->size(); }
MemoryRegion request(size_t pOffset, size_t pLength);
@@ -52,9 +52,9 @@
~FileOutputBuffer();
-private:
- FileOutputBuffer(const FileOutputBuffer &);
- FileOutputBuffer &operator=(const FileOutputBuffer &);
+ private:
+ FileOutputBuffer(const FileOutputBuffer&);
+ FileOutputBuffer& operator=(const FileOutputBuffer&);
FileOutputBuffer(llvm::sys::fs::mapped_file_region* pRegion,
FileHandle& pFileHandle);
@@ -63,6 +63,6 @@
FileHandle& m_FileHandle;
};
-} // namespace mcld
+} // namespace mcld
-#endif
+#endif // MCLD_SUPPORT_FILEOUTPUTBUFFER_H_