Skip to content

Commit 71660b0

Browse files
committed
Revert "[LLVM-C] Correct The Current Debug Location Accessors"
This reverts commit r358039, which added symbols that conflict with the Go bindings. llvm-svn: 358082
1 parent 651463e commit 71660b0

File tree

2 files changed

+2
-45
lines changed

2 files changed

+2
-45
lines changed

llvm/include/llvm-c/Core.h

Lines changed: 1 addition & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -3510,42 +3510,9 @@ void LLVMInsertIntoBuilderWithName(LLVMBuilderRef Builder, LLVMValueRef Instr,
35103510
void LLVMDisposeBuilder(LLVMBuilderRef Builder);
35113511

35123512
/* Metadata */
3513-
3514-
/**
3515-
* Get location information used by debugging information.
3516-
*
3517-
* @see llvm::IRBuilder::getCurrentDebugLocation()
3518-
*/
3519-
LLVMMetadataRef LLVMGetCurrentDebugLocation2(LLVMBuilderRef Builder);
3520-
3521-
/**
3522-
* Set location information used by debugging information.
3523-
*
3524-
* To clear the location metadata of the given instruction, pass NULL to \p Loc.
3525-
*
3526-
* @see llvm::IRBuilder::SetCurrentDebugLocation()
3527-
*/
3528-
void LLVMSetCurrentDebugLocation2(LLVMBuilderRef Builder, LLVMMetadataRef Loc);
3529-
3530-
/**
3531-
* Attempts to set the debug location for the given instruction using the
3532-
* current debug location for the given builder. If the builder has no current
3533-
* debug location, this function is a no-op.
3534-
*
3535-
* @see llvm::IRBuilder::SetInstDebugLocation()
3536-
*/
3537-
void LLVMSetInstDebugLocation(LLVMBuilderRef Builder, LLVMValueRef Inst);
3538-
3539-
/**
3540-
* Deprecated: Passing the NULL location will crash.
3541-
* Use LLVMGetCurrentDebugLocation2 instead.
3542-
*/
35433513
void LLVMSetCurrentDebugLocation(LLVMBuilderRef Builder, LLVMValueRef L);
3544-
/**
3545-
* Deprecated: Returning the NULL location will crash.
3546-
* Use LLVMGetCurrentDebugLocation2 instead.
3547-
*/
35483514
LLVMValueRef LLVMGetCurrentDebugLocation(LLVMBuilderRef Builder);
3515+
void LLVMSetInstDebugLocation(LLVMBuilderRef Builder, LLVMValueRef Inst);
35493516

35503517
/* Terminators */
35513518
LLVMValueRef LLVMBuildRetVoid(LLVMBuilderRef);

llvm/lib/IR/Core.cpp

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3006,17 +3006,6 @@ void LLVMDisposeBuilder(LLVMBuilderRef Builder) {
30063006

30073007
/*--.. Metadata builders ...................................................--*/
30083008

3009-
LLVMMetadataRef LLVMGetCurrentDebugLocation2(LLVMBuilderRef Builder) {
3010-
return wrap(unwrap(Builder)->getCurrentDebugLocation().getAsMDNode());
3011-
}
3012-
3013-
void LLVMSetCurrentDebugLocation2(LLVMBuilderRef Builder, LLVMMetadataRef Loc) {
3014-
if (Loc)
3015-
unwrap(Builder)->SetCurrentDebugLocation(DebugLoc(unwrap<MDNode>(Loc)));
3016-
else
3017-
unwrap(Builder)->SetCurrentDebugLocation(DebugLoc());
3018-
}
3019-
30203009
void LLVMSetCurrentDebugLocation(LLVMBuilderRef Builder, LLVMValueRef L) {
30213010
MDNode *Loc =
30223011
L ? cast<MDNode>(unwrap<MetadataAsValue>(L)->getMetadata()) : nullptr;
@@ -3033,6 +3022,7 @@ void LLVMSetInstDebugLocation(LLVMBuilderRef Builder, LLVMValueRef Inst) {
30333022
unwrap(Builder)->SetInstDebugLocation(unwrap<Instruction>(Inst));
30343023
}
30353024

3025+
30363026
/*--.. Instruction builders ................................................--*/
30373027

30383028
LLVMValueRef LLVMBuildRetVoid(LLVMBuilderRef B) {

0 commit comments

Comments
 (0)