summaryrefslogtreecommitdiffstats
path: root/llvm/lib/VMCore
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-04-01 06:31:45 +0000
committerChris Lattner <sabre@nondot.org>2010-04-01 06:31:45 +0000
commite4bcde8db5a95fdbcc346dee9d61a1dece0e4f86 (patch)
tree765faea1287fbdbd7d7c983ac2ac6ff16878e490 /llvm/lib/VMCore
parente675d0f9242c4e34f80d7d5a51ef5c5ca30f2c60 (diff)
downloadbcm5719-llvm-e4bcde8db5a95fdbcc346dee9d61a1dece0e4f86.tar.gz
bcm5719-llvm-e4bcde8db5a95fdbcc346dee9d61a1dece0e4f86.zip
switch IRBuilder to use NewDebugLoc for locations instead
of raw mdnodes. This allows frontends to specify debug locations without ever creating an MDNode for the DILocation. This requires a corresponding clang/llvm-gcc change which I'll try to commit as simultaneously as possible. llvm-svn: 100095
Diffstat (limited to 'llvm/lib/VMCore')
-rw-r--r--llvm/lib/VMCore/Core.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/llvm/lib/VMCore/Core.cpp b/llvm/lib/VMCore/Core.cpp
index f4f65c54092..44d487a8e2b 100644
--- a/llvm/lib/VMCore/Core.cpp
+++ b/llvm/lib/VMCore/Core.cpp
@@ -1651,7 +1651,7 @@ LLVMBasicBlockRef LLVMGetInsertBlock(LLVMBuilderRef Builder) {
}
void LLVMClearInsertionPosition(LLVMBuilderRef Builder) {
- unwrap(Builder)->ClearInsertionPoint ();
+ unwrap(Builder)->ClearInsertionPoint();
}
void LLVMInsertIntoBuilder(LLVMBuilderRef Builder, LLVMValueRef Instr) {
@@ -1670,11 +1670,13 @@ void LLVMDisposeBuilder(LLVMBuilderRef Builder) {
/*--.. Metadata builders ...................................................--*/
void LLVMSetCurrentDebugLocation(LLVMBuilderRef Builder, LLVMValueRef L) {
- unwrap(Builder)->SetCurrentDebugLocation(L? unwrap<MDNode>(L) : NULL);
+ MDNode *Loc = L ? unwrap<MDNode>(L) : NULL;
+ unwrap(Builder)->SetCurrentDebugLocation(NewDebugLoc::getFromDILocation(Loc));
}
LLVMValueRef LLVMGetCurrentDebugLocation(LLVMBuilderRef Builder) {
- return wrap(unwrap(Builder)->getCurrentDebugLocation());
+ return wrap(unwrap(Builder)->getCurrentDebugLocation()
+ .getAsMDNode(unwrap(Builder)->getContext()));
}
void LLVMSetInstDebugLocation(LLVMBuilderRef Builder, LLVMValueRef Inst) {
OpenPOWER on IntegriCloud