[vmkit-commits] [vmkit] r101295 - in /vmkit/trunk/lib/J3/Compiler: ExceptionsCheck.inc JavaJIT.cpp JavaJIT.h
Nicolas Geoffray
nicolas.geoffray at lip6.fr
Wed Apr 14 15:07:51 PDT 2010
Author: geoffray
Date: Wed Apr 14 17:07:51 2010
New Revision: 101295
URL: http://llvm.org/viewvc/llvm-project?rev=101295&view=rev
Log:
Use DebugLoc instead of DILocation.
Modified:
vmkit/trunk/lib/J3/Compiler/ExceptionsCheck.inc
vmkit/trunk/lib/J3/Compiler/JavaJIT.cpp
vmkit/trunk/lib/J3/Compiler/JavaJIT.h
Modified: vmkit/trunk/lib/J3/Compiler/ExceptionsCheck.inc
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/J3/Compiler/ExceptionsCheck.inc?rev=101295&r1=101294&r2=101295&view=diff
==============================================================================
--- vmkit/trunk/lib/J3/Compiler/ExceptionsCheck.inc (original)
+++ vmkit/trunk/lib/J3/Compiler/ExceptionsCheck.inc Wed Apr 14 17:07:51 2010
@@ -4,8 +4,8 @@
Instruction* res = CallInst::Create(F, args.begin(), args.end(), Name,
InsertAtEnd);
-
- res->setMetadata("dbg", CreateLocation());
+ DebugLoc DL = CreateLocation();
+ res->setDebugLoc(DL);
if (TheCompiler->hasExceptionsEnabled()) {
Value* threadId = getCurrentThread(intrinsics->JavaThreadType);
@@ -63,7 +63,8 @@
BasicBlock *InsertAtEnd) {
Instruction* res = CallInst::Create(F, arg1, Name, InsertAtEnd);
- res->setMetadata("dbg", CreateLocation());
+ DebugLoc DL = CreateLocation();
+ res->setDebugLoc(DL);
if (TheCompiler->hasExceptionsEnabled()) {
Value* threadId = getCurrentThread(intrinsics->JavaThreadType);
@@ -115,7 +116,8 @@
Value* args[2] = { arg1, arg2 };
Instruction* res = CallInst::Create(F, args, args + 2, Name, InsertAtEnd);
- res->setMetadata("dbg", CreateLocation());
+ DebugLoc DL = CreateLocation();
+ res->setDebugLoc(DL);
if (TheCompiler->hasExceptionsEnabled()) {
Value* threadId = getCurrentThread(intrinsics->JavaThreadType);
@@ -164,7 +166,8 @@
Instruction* JavaJIT::invoke(Value *F, const char* Name,
BasicBlock *InsertAtEnd) {
Instruction* res = llvm::CallInst::Create(F, Name, InsertAtEnd);
- res->setMetadata("dbg", CreateLocation());
+ DebugLoc DL = CreateLocation();
+ res->setDebugLoc(DL);
if (TheCompiler->hasExceptionsEnabled()) {
Value* threadId = getCurrentThread(intrinsics->JavaThreadType);
@@ -212,7 +215,8 @@
void JavaJIT::throwException(llvm::Function* F, Value* arg1) {
Instruction* obj = CallInst::Create(F, arg1, "", currentBlock);
- obj->setMetadata("dbg", CreateLocation());
+ DebugLoc DL = CreateLocation();
+ obj->setDebugLoc(DL);
if (currentExceptionBlock != endExceptionBlock) {
Instruction* insn = currentExceptionBlock->begin();
@@ -254,7 +258,8 @@
void JavaJIT::throwException(llvm::Function* F, Value** args,
uint32 nbArgs) {
Instruction* obj = CallInst::Create(F, args, args + nbArgs, "", currentBlock);
- obj->setMetadata("dbg", CreateLocation());
+ DebugLoc DL = CreateLocation();
+ obj->setDebugLoc(DL);
if (currentExceptionBlock != endExceptionBlock) {
Instruction* insn = currentExceptionBlock->begin();
Modified: vmkit/trunk/lib/J3/Compiler/JavaJIT.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/J3/Compiler/JavaJIT.cpp?rev=101295&r1=101294&r2=101295&view=diff
==============================================================================
--- vmkit/trunk/lib/J3/Compiler/JavaJIT.cpp (original)
+++ vmkit/trunk/lib/J3/Compiler/JavaJIT.cpp Wed Apr 14 17:07:51 2010
@@ -782,7 +782,6 @@
Instruction* JavaJIT::inlineCompile(BasicBlock*& curBB,
BasicBlock* endExBlock,
std::vector<Value*>& args) {
-
DbgSubprogram = TheCompiler->GetDbgSubprogram(compilingMethod);
PRINT_DEBUG(JNJVM_COMPILE, 1, COLOR_NORMAL, "inline compile %s.%s\n",
@@ -2608,13 +2607,11 @@
currentBlock = label_return;
}
-MDNode* JavaJIT::CreateLocation() {
+DebugLoc JavaJIT::CreateLocation() {
LineInfo LI = { currentLineNumber, currentCtpIndex, currentBytecodeIndex };
codeInfo.push_back(LI);
- DILocation Location = TheCompiler->getDebugFactory()->CreateLocation(
- callNumber, 0, DIScope(DbgSubprogram));
- callNumber++;
- return Location.getNode();
+ DebugLoc DL = DebugLoc::get(callNumber++, 0, DbgSubprogram);
+ return DL;
}
#ifdef DWARF_EXCEPTIONS
Modified: vmkit/trunk/lib/J3/Compiler/JavaJIT.h
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/J3/Compiler/JavaJIT.h?rev=101295&r1=101294&r2=101295&view=diff
==============================================================================
--- vmkit/trunk/lib/J3/Compiler/JavaJIT.h (original)
+++ vmkit/trunk/lib/J3/Compiler/JavaJIT.h Wed Apr 14 17:07:51 2010
@@ -20,6 +20,7 @@
#include "llvm/Metadata.h"
#include "llvm/Type.h"
#include "llvm/Value.h"
+#include "llvm/Support/DebugLoc.h"
#include "llvm/Analysis/DebugInfo.h"
#include "types.h"
@@ -167,7 +168,7 @@
uint16 callNumber;
/// CreateLocation - Create debug information for a call.
- llvm::MDNode* CreateLocation();
+ llvm::DebugLoc CreateLocation();
// codeInfo - List of LineInfo for this method.
std::vector<LineInfo> codeInfo;
More information about the vmkit-commits
mailing list