Improve naming style in rustllvm.

As per the LLVM style guide, use CamelCase for all locals and classes,
and camelCase for all non-FFI functions.
Also, make names of variables of commonly used types more consistent.

Fixes #38688.
This commit is contained in:
Ian Kerins 2016-12-31 12:01:23 -05:00
parent 6dcf51aae6
commit e6f97114ca
5 changed files with 446 additions and 443 deletions

View file

@ -106,24 +106,24 @@ typedef struct LLVMOpaqueDebugLoc *LLVMDebugLocRef;
typedef struct LLVMOpaqueSMDiagnostic *LLVMSMDiagnosticRef;
typedef struct LLVMOpaqueRustJITMemoryManager *LLVMRustJITMemoryManagerRef;
extern "C" void rust_llvm_string_write_impl(RustStringRef str, const char *ptr,
size_t size);
extern "C" void LLVMRustStringWriteImpl(RustStringRef Str, const char *Ptr,
size_t Size);
class raw_rust_string_ostream : public llvm::raw_ostream {
RustStringRef str;
uint64_t pos;
class RawRustStringOstream : public llvm::raw_ostream {
RustStringRef Str;
uint64_t Pos;
void write_impl(const char *ptr, size_t size) override {
rust_llvm_string_write_impl(str, ptr, size);
pos += size;
void write_impl(const char *Ptr, size_t Size) override {
LLVMRustStringWriteImpl(Str, Ptr, Size);
Pos += Size;
}
uint64_t current_pos() const override { return pos; }
uint64_t current_pos() const override { return Pos; }
public:
explicit raw_rust_string_ostream(RustStringRef str) : str(str), pos(0) {}
explicit RawRustStringOstream(RustStringRef Str) : Str(Str), Pos(0) {}
~raw_rust_string_ostream() {
~RawRustStringOstream() {
// LLVM requires this.
flush();
}