[llvm-commits] [llvm] r81402 - in /llvm/trunk/lib: MC/MCDisassembler.cpp Support/MemoryObject.cpp
Chris Lattner
sabre at nondot.org
Wed Sep 9 16:46:42 PDT 2009
Author: lattner
Date: Wed Sep 9 18:46:42 2009
New Revision: 81402
URL: http://llvm.org/viewvc/llvm-project?rev=81402&view=rev
Log:
canonicalize namespace gymnastics
Modified:
llvm/trunk/lib/MC/MCDisassembler.cpp
llvm/trunk/lib/Support/MemoryObject.cpp
Modified: llvm/trunk/lib/MC/MCDisassembler.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCDisassembler.cpp?rev=81402&r1=81401&r2=81402&view=diff
==============================================================================
--- llvm/trunk/lib/MC/MCDisassembler.cpp (original)
+++ llvm/trunk/lib/MC/MCDisassembler.cpp Wed Sep 9 18:46:42 2009
@@ -8,9 +8,10 @@
//===----------------------------------------------------------------------===//
#include "llvm/MC/MCDisassembler.h"
+using namespace llvm;
-llvm::MCDisassembler::MCDisassembler() {
+MCDisassembler::MCDisassembler() {
}
-llvm::MCDisassembler::~MCDisassembler() {
+MCDisassembler::~MCDisassembler() {
}
\ No newline at end of file
Modified: llvm/trunk/lib/Support/MemoryObject.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/MemoryObject.cpp?rev=81402&r1=81401&r2=81402&view=diff
==============================================================================
--- llvm/trunk/lib/Support/MemoryObject.cpp (original)
+++ llvm/trunk/lib/Support/MemoryObject.cpp Wed Sep 9 18:46:42 2009
@@ -1,4 +1,4 @@
-//===- MemoryObject.cpp - Abstract memory interface -------------*- C++ -*-===//
+//===- MemoryObject.cpp - Abstract memory interface -----------------------===//
//
// The LLVM Compiler Infrastructure
//
@@ -8,30 +8,27 @@
//===----------------------------------------------------------------------===//
#include "llvm/Support/MemoryObject.h"
-
-namespace llvm {
+using namespace llvm;
- MemoryObject::~MemoryObject() {
- }
+MemoryObject::~MemoryObject() {
+}
+
+int MemoryObject::readBytes(uint64_t address,
+ uint64_t size,
+ uint8_t* buf,
+ uint64_t* copied) const {
+ uint64_t current = address;
+ uint64_t limit = getBase() + getExtent();
- int MemoryObject::readBytes(uint64_t address,
- uint64_t size,
- uint8_t* buf,
- uint64_t* copied) const {
- uint64_t current = address;
- uint64_t limit = getBase() + getExtent();
-
- while (current - address < size && current < limit) {
- if (readByte(current, &buf[(current - address)]))
- return -1;
-
- current++;
- }
+ while (current - address < size && current < limit) {
+ if (readByte(current, &buf[(current - address)]))
+ return -1;
- if (copied)
- *copied = current - address;
-
- return 0;
+ current++;
}
-
+
+ if (copied)
+ *copied = current - address;
+
+ return 0;
}
More information about the llvm-commits
mailing list