* Delete blank comment lines
* Eliminate space between function name and open-paren ( to be consistent
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10059
91177308-0d34-0410-b5e6-
96231b3b80d8
#include "VM.h"
#include "llvm/Function.h"
#include "llvm/ModuleProvider.h"
#include "VM.h"
#include "llvm/Function.h"
#include "llvm/ModuleProvider.h"
-#include "llvm/CodeGen/MachineFunction.h"
#include "llvm/CodeGen/MachineCodeEmitter.h"
#include "llvm/CodeGen/MachineCodeEmitter.h"
+#include "llvm/CodeGen/MachineFunction.h"
#include "llvm/Target/TargetMachine.h"
namespace llvm {
#include "llvm/Target/TargetMachine.h"
namespace llvm {
// Turn the machine code intermediate representation into bytes in memory that
// may be executed.
// Turn the machine code intermediate representation into bytes in memory that
// may be executed.
if (TM.addPassesToEmitMachineCode(PM, *MCE)) {
std::cerr << "lli: target '" << TM.getName()
<< "' doesn't support machine code emission!\n";
if (TM.addPassesToEmitMachineCode(PM, *MCE)) {
std::cerr << "lli: target '" << TM.getName()
<< "' doesn't support machine code emission!\n";
/// just-in-time compilation passes on F, hopefully filling in
/// GlobalAddress[F] with the address of F's machine code.
///
/// just-in-time compilation passes on F, hopefully filling in
/// GlobalAddress[F] with the address of F's machine code.
///
-void VM::runJITOnFunction (Function *F) {
+void VM::runJITOnFunction(Function *F) {
static bool isAlreadyCodeGenerating = false;
static bool isAlreadyCodeGenerating = false;
- assert(!isAlreadyCodeGenerating && "ERROR: RECURSIVE COMPILATION DETECTED!");
+ assert(!isAlreadyCodeGenerating && "Error: Recursive compilation detected!");
// JIT the function
isAlreadyCodeGenerating = true;
// JIT the function
isAlreadyCodeGenerating = true;
if (F->isExternal())
return Addr = getPointerToNamedFunction(F->getName());
if (F->isExternal())
return Addr = getPointerToNamedFunction(F->getName());
assert(Addr && "Code generation didn't add function to GlobalAddress table!");
return Addr;
}
assert(Addr && "Code generation didn't add function to GlobalAddress table!");
return Addr;
}
void *OldAddr = Addr;
Addr = 0;
void *OldAddr = Addr;
Addr = 0;
- MachineFunction::destruct (F);
- runJITOnFunction (F);
+ MachineFunction::destruct(F);
+ runJITOnFunction(F);
assert(Addr && "Code generation didn't add function to GlobalAddress table!");
assert(Addr && "Code generation didn't add function to GlobalAddress table!");
- TM.replaceMachineCodeForFunction (OldAddr, Addr);
+ TM.replaceMachineCodeForFunction(OldAddr, Addr);